Package com.sun.enterprise.admin.util

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


    protected void createJBIInstance(String instanceName,
        RepositoryConfig config) throws RepositoryException
    {
        final PEFileLayout layout = getFileLayout(config);
        layout.createJBIDirectories();
        final TokenValueSet tvSet = new TokenValueSet();
        final String tvDelimiter = "@";
        final String tJbiInstanceName = "JBI_INSTANCE_NAME";
        final String tJbiInstanceRoot = "JBI_INSTANCE_ROOT";
        try {

            final TokenValue tvJbiInstanceName = new TokenValue(tJbiInstanceName,
                  instanceName, tvDelimiter);
            final TokenValue tvJbiInstanceRoot = new TokenValue(tJbiInstanceRoot,
                  layout.getRepositoryDir().getCanonicalPath(),tvDelimiter);
            tvSet.add(tvJbiInstanceName);
            tvSet.add(tvJbiInstanceRoot);
            final File src = layout.getJbiTemplateFile();
            final File dest = layout.getJbiRegistryFile();

            generateFromTemplate(tvSet, src, dest);
           
            final File httpConfigSrc = layout.getHttpBcConfigTemplate();
            final File httpConfigDest = layout.getHttpBcConfigFile();
            //tokens will be added in a follow-up integration
            final TokenValueSet httpTvSet = new TokenValueSet();           
            generateFromTemplate(httpTvSet, httpConfigSrc, httpConfigDest);
           
            createHttpBCInstallRoot(layout);
            createJavaEESEInstallRoot(layout);
            createWSDLSLInstallRoot(layout);
View Full Code Here


     */
    final static TokenValueSet getTokenValueSet(final DomainConfig dc)
    {
        final PEFileLayout lo = new PEFileLayout(dc);

        final TokenValueSet tokens = new TokenValueSet();

        tokens.add(getInstallRoot(lo));
        tokens.add(getVersion());
        tokens.add(getDomainName(dc));
        return ( tokens );
    }
View Full Code Here

        for (final String key : keys) {
            final String value      = map.get(key);
            final TokenValue tv     = new TokenValue(key, value);
            set.add(tv);
        }
        final TokenValueSet tvset = new TokenValueSet(set);
        return ( tvset );
    }
View Full Code Here

     */
    protected void createJBIInstance(String instanceName,
            RepositoryConfig config) throws RepositoryException {
        final PEFileLayout layout = getFileLayout(config);
        layout.createJBIDirectories();
        final TokenValueSet tvSet = new TokenValueSet();
        final String tvDelimiter = "@";
        final String tJbiInstanceName = "JBI_INSTANCE_NAME";
        final String tJbiInstanceRoot = "JBI_INSTANCE_ROOT";
        try {

            final TokenValue tvJbiInstanceName = new TokenValue(tJbiInstanceName,
                    instanceName, tvDelimiter);
            final TokenValue tvJbiInstanceRoot = new TokenValue(tJbiInstanceRoot,
                    layout.getRepositoryDir().getCanonicalPath(), tvDelimiter);
            tvSet.add(tvJbiInstanceName);
            tvSet.add(tvJbiInstanceRoot);
            final File src = layout.getJbiTemplateFile();
            final File dest = layout.getJbiRegistryFile();

            generateFromTemplate(tvSet, src, dest);

            final File httpConfigSrc = layout.getHttpBcConfigTemplate();
            final File httpConfigDest = layout.getHttpBcConfigFile();
            //tokens will be added in a follow-up integration
            final TokenValueSet httpTvSet = new TokenValueSet();
            generateFromTemplate(httpTvSet, httpConfigSrc, httpConfigDest);

            createHttpBCInstallRoot(layout);
            createJavaEESEInstallRoot(layout);
            createWSDLSLInstallRoot(layout);
View Full Code Here

   
    /** Creates a new instance of TokenReplacementTester */
    private final LineTokenReplacer replacer;
   
    public TokenReplacementTester(String tokensFileName, String fromFile, String toFile) {
        final TokenValueSet tokens = getTokensFromFile(tokensFileName);
        replacer = new LineTokenReplacer(tokens);
        replacer.replace(fromFile, toFile);
    }
View Full Code Here

        replacer = new LineTokenReplacer(tokens);
        replacer.replace(fromFile, toFile);
    }
   
    private TokenValueSet getTokensFromFile(String fileName) {
        final TokenValueSet tokens  = new TokenValueSet();
        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;
        }
        catch(Exception e) {
View Full Code Here

    {
        try
        {
            final PEFileLayout layout = getFileLayout(domainConfig);
            final File dx = layout.getDomainConfigFile();
            TokenValueSet tokens = getDomainXmlTokens(domainConfig);
            String tn = (String)domainConfig.get(DomainConfig.K_TEMPLATE_NAME);
            if((tn == null)||(tn.equals(""))) {
                File tr = new File(layout.getTemplatesDir(), PEFileLayout.DOMAIN_XML_FILE);
                generateFromTemplate(tokens, tr, dx);
            }
View Full Code Here

    }

    protected void createScripts(DomainConfig domainConfig)
        throws DomainException
    {
        final TokenValueSet tokens = PEScriptsTokens.getTokenValueSet(domainConfig);
        createStartServ(domainConfig, tokens);
        createStopServ(domainConfig, tokens);
    }
View Full Code Here

        {
            final PEFileLayout layout = getFileLayout(domainConfig);
            for (Map.Entry<File,File> accXmlTemplateFileEntry : layout.getAppClientContainerTemplateAndXml().entrySet()) {
                final File accXmlTemplate = accXmlTemplateFileEntry.getKey();
                final File accXml = accXmlTemplateFileEntry.getValue();
                TokenValueSet tokens = PEAccXmlTokens.getTokenValueSet(domainConfig);
                generateFromTemplate(tokens, accXmlTemplate, accXml);
            }
        }
        catch(Exception e)
        {
View Full Code Here

        final PEFileLayout layout = getFileLayout(domainConfig);
        final File src = layout.getIndexFileTemplate();
        final File dest = layout.getIndexFile();
        try
        {
            final TokenValueSet tokens = IndexHtmlTokens.getTokenValueSet(domainConfig);
            generateFromTemplate(tokens, src, dest);
            handleLocalizedIndexHtmls(layout, tokens);
        }
        catch (IOException ioe)
        {
View Full Code Here

TOP

Related Classes of com.sun.enterprise.admin.util.TokenValueSet

Copyright © 2018 www.massapicom. 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.