Class SystemPropertyConstants


  • public class SystemPropertyConstants
    extends Object
    • Constructor Detail

      • SystemPropertyConstants

        public SystemPropertyConstants()
    • Method Detail

      • getPropertyAsValue

        public static String getPropertyAsValue​(String name)
        A method that returns the passed String as a property that can be replaced at run time.
        Parameters:
        name - String that represents a property, e.g INSTANCE_ROOT_PROPERTY in this class. The String may not be null.
        Returns:
        a String that represents the replaceable value of passed String. Generally speaking it will be decorated with a pair of braces with $ in the front (e.g. "a" will be returned as "${a}").
        Throws:
        IllegalArgumentException - if the passed String is null
      • unSystemProperty

        public static String unSystemProperty​(String sp)
        Returns the string removing the "system-property syntax" from it. If the given string is not in "system-property syntax" the same string is returned. The "system-propery syntax" is "${...}" The given String may not be null. The returned String may be an empty String, if it is of the form "${}" (rarely so).
      • isSystemPropertySyntax

        public static boolean isSystemPropertySyntax​(String s)
      • getDocRootDefaultValue

        public static String getDocRootDefaultValue()
        Returns the default value (as would appear in the domain.xml on installation) of docroot of a virtual server, as a String. Never returns a null. Returned String contains no backslashes. Note that it is not the absolute value of the path on a file system.
      • getAccessLogDefaultValue

        public static String getAccessLogDefaultValue()
        Returns the default value (as would appear in the domain.xml on installation) of file where the acess log of a virtual server is stored, as a String. Never returns a null. Returned String contains no backslashes. Note that it is not the absolute value of the path on a file system.
      • getAsAdminScriptLocation

        public static String getAsAdminScriptLocation()
        Returns the system specific file.separator delimited path to the asadmin script. Any changes to file layout should be reflected here. The path will contain '/' as the separator character, regardless of operating platform. Never returns a null. Assumes the the property "INSTALL_ROOT_PROPERTY" is set in the VM before calling this. As of now (September 2005) all the server instances and asadmin VM itself has this property set. The method does not guarantee that the script exists on the given system. It should only be used when caller wants to know the location of the script. Caller should make sure it exists.
        Returns:
        String representing the Path to asadmin script. Might return a string beginning with "null", if the INSTALL_ROOT_PROPERTY is not defined
      • getAsAdminScriptLocation

        public static String getAsAdminScriptLocation​(String installRoot)
      • getAdminScriptLocation

        public static String getAdminScriptLocation​(String installRoot)
      • getComponentName

        public static String getComponentName()
        Returns the component identifier associated with the INSTALL_ROOT. For example if INSTALL_ROOT is /home/glassfish4/glassfish the component name will "glassfish".
        Returns:
        String representing the component identifier.