Class SystemPropertyConstants

java.lang.Object
com.sun.enterprise.util.SystemPropertyConstants

public class SystemPropertyConstants extends Object
  • Field Details

  • Constructor Details

    • SystemPropertyConstants

      public SystemPropertyConstants()
  • Method Details

    • getPropertyAsValue

      public static final 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 final 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 final boolean isSystemPropertySyntax(String s)
    • getDocRootDefaultValue

      public static final 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 final 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 final 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 final String getAsAdminScriptLocation(String installRoot)
    • getAdminScriptLocation

      public static final String getAdminScriptLocation(String installRoot)
    • getComponentName

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

      public static final Integer getDefaultAdminTimeout()
      Returns the default timeout in milliseconds used in some Admin commands.
      Returns:
      The value of the system property DEFAULT_ADMIN_TIMEOUT_PROPERTY or the value DEFAULT_ADMIN_TIMEOUT_VALUE if the system property not set.