Search in sources :

Example 1 with PropertiesConfigFile

use of org.platformlayer.ops.standardservice.PropertiesConfigFile in project platformlayer by platformlayer.

the class SimpleApp method addChildren.

@Override
protected void addChildren() throws OpsException {
    DownloadFileByHash download = addChild(buildDownload());
    File deployed = new File(jettyTemplate.getWarsDeployDir(), getWarName());
    addChild(ManagedSymlink.build(deployed, download.filePath));
    addChild(ManagedDirectory.build(getWorkDir(), "0700"));
    {
        PropertiesConfigFile conf = addChild(PropertiesConfigFile.class);
        conf.filePath = getConfigurationFilePath();
        conf.propertiesSupplier = new OpsProvider<Map<String, String>>() {

            @Override
            public Map<String, String> get() throws OpsException {
                return getConfigurationProperties();
            }
        };
    }
    File contextDir = jettyTemplate.getContextDir();
    ContextTemplate contextTemplate = new ContextTemplate();
    addChild(TemplatedFile.build(contextTemplate, new File(contextDir, "context.xml")));
}
Also used : DownloadFileByHash(org.platformlayer.ops.filesystem.DownloadFileByHash) PropertiesConfigFile(org.platformlayer.ops.standardservice.PropertiesConfigFile) OpsProvider(org.platformlayer.ops.OpsProvider) TemplatedFile(org.platformlayer.ops.filesystem.TemplatedFile) PropertiesConfigFile(org.platformlayer.ops.standardservice.PropertiesConfigFile) File(java.io.File)

Aggregations

File (java.io.File)1 OpsProvider (org.platformlayer.ops.OpsProvider)1 DownloadFileByHash (org.platformlayer.ops.filesystem.DownloadFileByHash)1 TemplatedFile (org.platformlayer.ops.filesystem.TemplatedFile)1 PropertiesConfigFile (org.platformlayer.ops.standardservice.PropertiesConfigFile)1