FileDocCategorySizeDatePackage
SystemPropertyConstants.javaAPI DocGlassfish v2 API12917Fri Jun 22 16:38:54 BST 2007com.sun.enterprise.util

SystemPropertyConstants

public class SystemPropertyConstants extends Object

Fields Summary
public static final String
UNIX_ASENV_FILENAME
Field
public static final String
WINDOWS_ASENV_FILENAME
Field
public static final String
WEB_SERVICES_LIB_PROPERTY
Field
public static final String
PERL_ROOT_PROPERTY
Field
public static final String
IMQ_LIB_PROPERTY
Field
public static final String
IMQ_BIN_PROPERTY
Field
public static final String
CONFIG_ROOT_PROPERTY
Field
public static final String
INSTALL_ROOT_PROPERTY
Field
public static final String
JAVA_ROOT_PROPERTY
Field
public static final String
ICU_LIB_PROPERTY
Field
public static final String
DEFAULT_LOCALE_PROPERTY
Field
public static final String
DOMAINS_ROOT_PROPERTY
Field
public static final String
INSTANCE_ROOT_PROPERTY
Field
public static final String
AGENT_CERT_NICKNAME
The certificate nick name specified in the System-Jmx-Conenctor of the DAS with which a Node Agent synchronizes
public static final String
AGENT_ROOT_PROPERTY
public static final String
AGENT_NAME_PROPERTY
public static final String
WEBCONSOLE_LIB_PROPERTY
Field
public static final String
WEBCONSOLE_APP_PROPERTY
public static final String
JATO_ROOT_PROPERTY
public static final String
ANT_ROOT_PROPERTY
public static final String
ANT_LIB_PROPERTY
public static final String
JHELP_ROOT_PROPERTY
public static final String
SERVER_NAME
name of the server instance key
public static final String
CLUSTER_NAME
name of the server's cluster
public static final String
HADB_ROOT_PROPERTY
name of the HADB location property
public static final String
NSS_ROOT_PROPERTY
public static final String
NSS_BIN_PROPERTY
public static final String
NATIVE_LAUNCHER
public static final String
NATIVE_LAUNCHER_LIB_PREFIX
public static final String
KEYSTORE_PROPERTY
public static final String
KEYSTORE_PASSWORD_PROPERTY
public static final String
JKS_KEYSTORE
public static final String
TRUSTSTORE_PROPERTY
public static final String
TRUSTSTORE_PASSWORD_PROPERTY
public static final String
JKS_TRUSTSTORE
public static final String
ADMIN_REALM
public static final String
NSS_DB_PROPERTY
public static final String
NSS_DB_PASSWORD_PROPERTY
public static final String
CLIENT_TRUSTSTORE_PROPERTY
public static final String
CLIENT_TRUSTSTORE_PASSWORD_PROPERTY
public static final String
PID_FILE
public static final String
REF_TS_FILE
public static final String
KILLSERV_SCRIPT
public static final String
KILL_SERV_UNIX
public static final String
KILL_SERV_WIN
public static final String
KILL_SERV_OS
public static final String
DEFAULT_SERVER_INSTANCE_NAME
public static final String
JDMK_HOME_PROPERTY
public static final String
DERBY_ROOT_PROPERTY
public static final String
MFWK_HOME_PROPERTY
Java ES Monitoring Framework install directory
public static final String
DOMAIN_NAME
name of the domain key
public static final String
HOST_NAME_PROPERTY
public static final String
CONFIG_NAME_PROPERTY
public static final String
DOCROOT_PROPERTY
public static final String
ACCESSLOG_PROPERTY
public static final String
DEFAULT_SERVER_SOCKET_ADDRESS
public static final String
CLUSTER_AWARE_FEATURE_FACTORY_CLASS
public static final String
TEMPLATE_CONFIG_NAME
Name of the default config that determines the configuration for the instances
private static final com.sun.enterprise.util.i18n.StringManager
sm
public static final String
OPEN
public static final String
CLOSE
Constructors Summary
Methods Summary
public static final java.lang.StringgetAccessLogDefaultValue()
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.

        final StringBuffer sb = new StringBuffer(getPropertyAsValue(INSTANCE_ROOT_PROPERTY));
        return ( sb.append("/logs/access").toString() );
    
public static final java.lang.StringgetAsAdminScriptLocation()
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.

return
String representing the Path to asadmin script. Might return a string beginning with "null", if the INSTALL_ROOT_PROPERTY is not defined

        final StringBuilder sb = new StringBuilder();
        final String ext = OS.isWindows() ? OS.WINDOWS_BATCH_FILE_EXTENSION : "";
        final String ASADMIN = "asadmin";
        final String suffix = new StringBuilder("bin").append(System.getProperty("file.separator")).append(ASADMIN).append(ext).toString();
        sb.append(System.getProperty(SystemPropertyConstants.INSTALL_ROOT_PROPERTY));
        final String fs = System.getProperty("file.separator");
        if (!sb.toString().endsWith(fs))
            sb.append(fs);
        sb.append(suffix);
        
        return ( sb.toString() );
    
public static final java.lang.StringgetDocRootDefaultValue()
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.

        final StringBuffer sb = new StringBuffer(getPropertyAsValue(INSTANCE_ROOT_PROPERTY));
        return ( sb.append("/docroot").toString() );
    
public static final java.lang.StringgetPropertyAsValue(java.lang.String name)
A method that returns the passed String as a property that can be replaced at run time.

param
a String that represents a property, e.g INSTANCE_ROOT_PROPERTY in this class. The String may not be null.
return
a String that represents the replaceable value of passed String. Generally speaking it will be decorated with a pair of braces.
throws
IllegalArgumentException if the passed String is null



                                                                          
	       
        if (name == null) {
            final String pn = "spc.null_name";
            final String pv = "property";
            throw new IllegalArgumentException(sm.getString(pn, pv));
        }
        final StringBuffer sb   = new StringBuffer();
        sb.append(OPEN).append(name).append(CLOSE);
        return ( sb.toString() );
	
public static final booleanisSystemPropertySyntax(java.lang.String s)

            if ( s == null)
                throw new IllegalArgumentException ("null_arg");
            boolean sp = false;
            if (s.startsWith(OPEN) && s.endsWith(CLOSE))
                sp = true;
            return ( sp );
        
public static final java.lang.StringunSystemProperty(java.lang.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).

        
                                                                     
               
            if (sp == null) 
                throw new IllegalArgumentException ("null_arg");
            String ret = sp;
            if (isSystemPropertySyntax(sp)) {
                ret = sp.substring(2, sp.length() - 1);
            }
            return ( ret );