FileDocCategorySizeDatePackage
IndexHtmlTokens.javaAPI DocGlassfish v2 API3952Fri May 04 22:24:32 BST 2007com.sun.enterprise.admin.servermgmt.pe

IndexHtmlTokens

public final class IndexHtmlTokens extends Object
This class defines the tokens required by the startserv & stopserv scripts.

Fields Summary
public static final String
VERSION_TOKEN_NAME
public static final String
DOMAIN_NAME_TOKEN_NAME
public static final String
INSTALL_ROOT_TOKEN_NAME
public static final String
INSTALL_ROOT_DEFAULT_VALUE
Constructors Summary
private IndexHtmlTokens()

    
    

      
        //disallow;
    
Methods Summary
private static com.sun.enterprise.admin.util.TokenValuegetDomainName(com.sun.enterprise.admin.servermgmt.DomainConfig dc)

        final String dn     = dc.getDomainName();
        final TokenValue tv = new TokenValue(DOMAIN_NAME_TOKEN_NAME, dn);
        return ( tv );
    
private static com.sun.enterprise.admin.util.TokenValuegetInstallRoot(PEFileLayout lo)

        String ir;
        try {
            ir = lo.getInstallRootDir().getAbsolutePath();
        } catch(final Exception e) {
            ir = INSTALL_ROOT_DEFAULT_VALUE;
        }
        final TokenValue tv = new TokenValue(INSTALL_ROOT_TOKEN_NAME, ir);
        return ( tv );
    
static final com.sun.enterprise.admin.util.TokenValueSetgetTokenValueSet(com.sun.enterprise.admin.servermgmt.DomainConfig dc)

return
Returns the TokenValueSet that has the (token, value) pairs for index.html file.
param
domainConfig

        final PEFileLayout lo = new PEFileLayout(dc);

        final TokenValueSet tokens = new TokenValueSet();

        tokens.add(getInstallRoot(lo));
        tokens.add(getVersion());
        tokens.add(getDomainName(dc));
        return ( tokens );
    
private static com.sun.enterprise.admin.util.TokenValuegetVersion()

        final String version = Version.getFullVersion();
        final TokenValue tv = new TokenValue(VERSION_TOKEN_NAME, version);
        return ( tv );