| | |
| | | public static final String POINT_VERSION = "Point Version"; |
| | | /** Revision number in SVN. */ |
| | | public static final String REVISION_NUMBER = "Revision Number"; |
| | | /** the SVN url repository. */ |
| | | /** The SVN url repository. */ |
| | | public static final String URL_REPOSITORY = "URL Repository"; |
| | | /** The version qualifier. */ |
| | | public static final String VERSION_QUALIFIER = "Version Qualifier"; |
| | |
| | | } |
| | | } |
| | | |
| | | if (!baseDNs.isEmpty() && (numEntries > 0)) |
| | | if (!baseDNs.isEmpty() && numEntries > 0) |
| | | { |
| | | lines.add("template: person"); |
| | | lines.add("rdnAttr: uid"); |
| | |
| | | * @return {@code true} if the provided port is a privileged port, |
| | | * {@code false} otherwise. |
| | | */ |
| | | public static boolean isPriviledgedPort(int port) |
| | | public static boolean isPrivilegedPort(int port) |
| | | { |
| | | return (port <= 1024) && !OperatingSystem.isWindows(); |
| | | return port <= 1024 && !OperatingSystem.isWindows(); |
| | | } |
| | | |
| | | /** |
| | |
| | | public static String getScriptPath(String script) |
| | | { |
| | | String s = script; |
| | | if (OperatingSystem.isWindows()) |
| | | if (OperatingSystem.isWindows() |
| | | && s != null && (!s.startsWith("\"") || !s.endsWith("\""))) |
| | | { |
| | | if (s != null) |
| | | { |
| | | if (!s.startsWith("\"") || !s.endsWith("\"")) |
| | | { |
| | | s = "\""+script+"\""; |
| | | } |
| | | } |
| | | return "\"" + script + "\""; |
| | | } |
| | | return s; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /* The next two methods are used to generate the random password for the |
| | | * self-signed certificate. */ |
| | | /** |
| | | * The next two methods are used to generate the random password for the |
| | | * self-signed certificate. |
| | | */ |
| | | private static char getRandomChar(Random random, int type) |
| | | { |
| | | char generatedChar; |
| | |
| | | d = next % 10; |
| | | if (d < 0) |
| | | { |
| | | d = d * (-1); |
| | | d = d * -1; |
| | | } |
| | | generatedChar = (char) (d+48); |
| | | break; |
| | |
| | | d = next % 26; |
| | | if (d < 0) |
| | | { |
| | | d = d * (-1); |
| | | d = d * -1; |
| | | } |
| | | generatedChar = (char) (d + 97); |
| | | break; |
| | | default: |
| | | // Will return a capital letter |
| | | d = (next % 26); |
| | | d = next % 26; |
| | | if (d < 0) |
| | | { |
| | | d = d * (-1); |
| | | d = d * -1; |
| | | } |
| | | generatedChar = (char) (d + 65) ; |
| | | } |
| | |
| | | |
| | | private static int getRandomInt(Random random,int modulo) |
| | | { |
| | | return (random.nextInt() & modulo); |
| | | return random.nextInt() & modulo; |
| | | } |
| | | |
| | | /** |