Package com.sun.enterprise.admin.util

Examples of com.sun.enterprise.admin.util.LineTokenReplacer.replace()


        if (trace)
            printOut("Manifest validated: " + manifestPath);
    }
    private void tokenReplaceTemplateAtDestination(final SMFService smf) throws Exception {
        final LineTokenReplacer tr = new LineTokenReplacer(map2Set(smf.tokensAndValues()));
        tr.replace(smf.getManifestFileTemplatePath(), smf.getManifestFilePath());
        if (trace)
            printOut("Manifest configured: " + smf.getManifestFilePath());
    }
   
    private TokenValueSet map2Set(final Map<String, String> map) throws Exception {
View Full Code Here


      
    protected void generateFromTemplate(TokenValueSet tokens,
        File template, File destinationFile) throws IOException
    {
        LineTokenReplacer replacer = new LineTokenReplacer(tokens, "UTF-8");
        replacer.replace(template, destinationFile);
    }
       
    protected boolean repositoryExists(RepositoryConfig config)
    {
        return FileUtils.safeGetCanonicalFile(getRepositoryDir(config)).exists();
View Full Code Here

            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);
            tmpFile.delete();
        }
        catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

      
    protected void generateFromTemplate(TokenValueSet tokens,
        File template, File destinationFile) throws IOException
    {
        LineTokenReplacer replacer = new LineTokenReplacer(tokens, "UTF-8");
        replacer.replace(template, destinationFile);
    }
       
    protected boolean repositoryExists(RepositoryConfig config)
    {
        return FileUtils.safeGetCanonicalFile(getRepositoryDir(config)).exists();
View Full Code Here

   
    static void tokenReplaceTemplateAtDestination(
                Map<String,String> map, String templatePath, String targetPath) {

        final LineTokenReplacer tr = new LineTokenReplacer(map2Set(map));
        tr.replace(templatePath, targetPath);
    }

    static void appendTextToFile(File to, String what) {

        // todo - this should be a high-level utility
View Full Code Here

    }

    protected void generateFromTemplate(TokenValueSet tokens,
            File template, File destinationFile) throws IOException {
        LineTokenReplacer replacer = new LineTokenReplacer(tokens, "UTF-8");
        replacer.replace(template, destinationFile);
    }

    protected boolean repositoryExists(RepositoryConfig config) {
        return FileUtils.safeGetCanonicalFile(getRepositoryDir(config)).exists();
    }
View Full Code Here

      
    protected void generateFromTemplate(TokenValueSet tokens,
        File template, File destinationFile) throws IOException
    {
        LineTokenReplacer replacer = new LineTokenReplacer(tokens, "UTF-8");
        replacer.replace(template, destinationFile);
    }
       
    protected boolean repositoryExists(RepositoryConfig config)
    {
        return FileUtils.safeGetCanonicalFile(getRepositoryDir(config)).exists();
View Full Code Here

   
    static void tokenReplaceTemplateAtDestination(
                Map<String,String> map, String templatePath, String targetPath) {

        final LineTokenReplacer tr = new LineTokenReplacer(map2Set(map));
        tr.replace(templatePath, targetPath);
    }

    static void appendTextToFile(File to, String what) {

        // todo - this should be a high-level utility
View Full Code Here

    }

    protected void generateFromTemplate(TokenValueSet tokens,
            File template, File destinationFile) throws IOException {
        LineTokenReplacer replacer = new LineTokenReplacer(tokens, "UTF-8");
        replacer.replace(template, destinationFile);
    }

    protected boolean repositoryExists(RepositoryConfig config) {
        return FileUtils.safeGetCanonicalFile(getRepositoryDir(config)).exists();
    }
View Full Code Here

    }

    protected void generateFromTemplate(TokenValueSet tokens,
            File template, File destinationFile) throws IOException {
        LineTokenReplacer replacer = new LineTokenReplacer(tokens, "UTF-8");
        replacer.replace(template, destinationFile);
    }

    protected boolean repositoryExists(RepositoryConfig config) {
        return FileUtils.safeGetCanonicalFile(getRepositoryDir(config)).exists();
    }
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.