12 package com.freerdp.freerdpcore.domain;
16 public static final String PATH_MANUAL_BOOKMARK_ID =
"MBMID/";
17 public static final String PATH_HOSTNAME =
"HOST/";
18 public static final String PATH_PLACEHOLDER =
"PLCHLD/";
19 public static final String PATH_FILE =
"FILE/";
21 public static String getManualBookmarkReference(
long bookmarkId)
23 return (PATH_MANUAL_BOOKMARK_ID + bookmarkId);
26 public static String getHostnameReference(String hostname)
28 return (PATH_HOSTNAME + hostname);
31 public static String getPlaceholderReference(String name)
33 return (PATH_PLACEHOLDER + name);
36 public static String getFileReference(String uri)
38 return (PATH_FILE + uri);
41 public static boolean isBookmarkReference(String refStr)
43 return refStr.startsWith(PATH_MANUAL_BOOKMARK_ID);
46 public static boolean isManualBookmarkReference(String refStr)
48 return refStr.startsWith(PATH_MANUAL_BOOKMARK_ID);
51 public static boolean isHostnameReference(String refStr)
53 return refStr.startsWith(PATH_HOSTNAME);
56 public static boolean isPlaceholderReference(String refStr)
58 return refStr.startsWith(PATH_PLACEHOLDER);
61 public static boolean isFileReference(String refStr)
63 return refStr.startsWith(PATH_FILE);
66 public static long getManualBookmarkId(String refStr)
68 return Integer.parseInt(refStr.substring(PATH_MANUAL_BOOKMARK_ID.length()));
71 public static String getHostname(String refStr)
73 return refStr.substring(PATH_HOSTNAME.length());
76 public static String getPlaceholder(String refStr)
78 return refStr.substring(PATH_PLACEHOLDER.length());
81 public static String getFile(String refStr)
83 return refStr.substring(PATH_FILE.length());