Examples of TokenValue


Examples of com.sun.enterprise.admin.util.TokenValue

        String instanceName = (String)domainConfig.get(DomainConfig.K_SERVERID);
        if((instanceName == null) || (instanceName.equals("")))
            instanceName = PEFileLayout.DEFAULT_INSTANCE_NAME;

        TokenValue tv = new TokenValue(CONFIG_MODEL_NAME_TOKEN_NAME,
                                    CONFIG_MODEL_NAME_TOKEN_VALUE);
        tokens.add(tv);

        tv = new TokenValue(HOST_NAME_TOKEN_NAME,
                (String)domainConfig.get(DomainConfig.K_HOST_NAME));
        tokens.add(tv);

        final Integer adminPort =
            (Integer)domainConfig.get(DomainConfig.K_ADMIN_PORT);
        tv = new TokenValue(ADMIN_PORT_TOKEN_NAME, adminPort.toString());
        tokens.add(tv);

        final Integer httpPort =
            (Integer)domainConfig.get(DomainConfig.K_INSTANCE_PORT);
        tv = new TokenValue(HTTP_PORT_TOKEN_NAME, httpPort.toString());
        tokens.add(tv);

        final Integer orbPort =
            (Integer)domainConfig.get(DomainConfig.K_ORB_LISTENER_PORT);
        tv = new TokenValue(ORB_LISTENER_PORT_TOKEN_NAME, orbPort.toString());
        tokens.add(tv);

        tv = new TokenValue(JMS_PROVIDER_PASSWORD_TOKEN_NAME,
              (String)domainConfig.get(DomainConfig.K_JMS_PASSWORD));
        tokens.add(tv);

        final Integer jmsPort =
            (Integer)domainConfig.get(DomainConfig.K_JMS_PORT);
        tv = new TokenValue(JMS_PROVIDER_PORT_TOKEN_NAME, jmsPort.toString());
        tokens.add(tv);

        tv = new TokenValue(JMS_PROVIDER_USERID_TOKEN_NAME,
              (String)domainConfig.get(DomainConfig.K_JMS_USER));
        tokens.add(tv);

        tv = new TokenValue(SERVER_ID_TOKEN_NAME,
                                instanceName);
        tokens.add(tv);
        final Integer httpSslPort =
            (Integer)domainConfig.get(DomainConfig.K_HTTP_SSL_PORT);
        tv = new TokenValue(HTTP_SSL_PORT_TOKEN_NAME, httpSslPort.toString());
        tokens.add(tv);

        final Integer orbSslPort =
            (Integer)domainConfig.get(DomainConfig.K_IIOP_SSL_PORT);
        tv = new TokenValue(ORB_SSL_PORT_TOKEN_NAME, orbSslPort.toString());
        tokens.add(tv);

        final Integer orbMutualAuthPort =
            (Integer)domainConfig.get(DomainConfig.K_IIOP_MUTUALAUTH_PORT);
        tv = new TokenValue(ORB_MUTUALAUTH_PORT_TOKEN_NAME, orbMutualAuthPort.toString());
        tokens.add(tv);

        final Integer jmxPort =
            (Integer)domainConfig.get(DomainConfig.K_JMX_PORT);
        tv = new TokenValue(JMX_SYSTEM_CONNECTOR_PORT_TOKEN_NAME, jmxPort.toString());
        tokens.add(tv);

        tv = new TokenValue(DOMAIN_NAME_TOKEN_NAME, domainConfig.getRepositoryName());
        tokens.add(tv);

       
        return ( tokens );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

        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 );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

        final TokenValue tv = new TokenValue(INSTALL_ROOT_TOKEN_NAME, ir);
        return ( tv );
    }
    private static TokenValue getVersion() {
        final String version = Version.getFullVersion();
        final TokenValue tv = new TokenValue(VERSION_TOKEN_NAME, version);
        return ( tv );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

        final TokenValue tv = new TokenValue(VERSION_TOKEN_NAME, version);
        return ( tv );
    }
    private static TokenValue getDomainName(final DomainConfig dc) {
        final String dn     = dc.getDomainName();
        final TokenValue tv = new TokenValue(DOMAIN_NAME_TOKEN_NAME, dn);
        return ( tv );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

                    break;
                }
            }
            msg = strMgr.getString("processingToken", new String[] {t, v});
            System.out.println(msg);
            final TokenValue tv = new TokenValue(t, v); //default delimiter
            set.add(tv);
        }
        return ( set );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

   
    public String toString() {
        StringBuffer buf = new StringBuffer();
        Iterator<TokenValue> iter = this.iterator();
        while(iter.hasNext()) {
            TokenValue tv = iter.next();
            buf.append(tv.toString());
            buf.append(System.getProperty("line.separator"));
        }
        return ( buf.toString() );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

   
    private String replaceLine(String lineWithTokens) {
        String tokenFreeString = lineWithTokens;
       
        for (int i = 0 ; i < tokenArray.length ; i++) {
            TokenValue aPair        = tokenArray[i];
            //System.out.println("To replace: " + aPair.delimitedToken);
            //System.out.println("Value replace: " + aPair.value);
            tokenFreeString = tokenFreeString.replaceAll(aPair.delimitedToken,
                aPair.value);
        }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new FileReader(fileName));
            String line = null;
            while ((line = reader.readLine()) != null) {
                final TokenValue tv = getTokenValue(line);
                tokens.add(tv);
            }
            reader.close();
            reader = null;
        }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

        int i = 0;
        while(parser.hasMoreTokens()) {
            output[i++] = parser.nextToken();
        }
        final String DELIM = "%%%";
        TokenValue tv = new TokenValue(output[0], output[1], DELIM);
        return ( tv );
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.TokenValue

            final File tmpFile          = File.createTempFile("temp", ".xml");
            final String tmpFilePath    = tmpFile.getAbsolutePath();
            FileUtils.copy(serverXmlPath, tmpFilePath);

            final TokenValue tv = new TokenValue(DOCTYPE_TOKEN, dtdPath);
            System.out.println("TV = " + tv);
            final TokenValueSet ts = new TokenValueSet();
            ts.add(tv);
            final LineTokenReplacer replacer = new LineTokenReplacer(ts);
            replacer.replace(tmpFilePath, serverXmlPath);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.