use of org.platformlayer.ops.filesystem.DownloadFileByHash in project platformlayer by platformlayer.
the class UserAuthInstall method addChildren.
@Override
protected void addChildren() throws OpsException {
super.addChildren();
for (String extension : template.getExtensions()) {
String key = extension;
DownloadFileByHash download = addChild(DownloadFileByHash.class);
download.filePath = new File(template.getExtensionsPath(), key + ".jar");
download.specifier = "platformlayerplus:production:" + key + "-1.0-SNAPSHOT.jar";
}
}
use of org.platformlayer.ops.filesystem.DownloadFileByHash in project platformlayer by platformlayer.
the class PlatformLayerInstall method addService.
private void addService(String key) throws OpsException {
DownloadFileByHash download = addChild(DownloadFileByHash.class);
download.filePath = new File(template.getServicesPath(), key + ".tar.gz");
download.specifier = "platformlayerplus:production:" + key + "-1.0-SNAPSHOT-service-package.tar.gz";
// TODO: Only unzip if newly downloaded
ExpandArchive unzip = addChild(ExpandArchive.class);
unzip.archiveFile = download.filePath;
unzip.extractPath = template.getServicesPath();
}
use of org.platformlayer.ops.filesystem.DownloadFileByHash in project platformlayer by platformlayer.
the class SimpleApp method buildDownload.
protected DownloadFileByHash buildDownload() {
DownloadFileByHash download = injected(DownloadFileByHash.class);
download.filePath = new File(jettyTemplate.getWarsStagingDir(), getWarName());
download.specifier = context.source;
return download;
}
use of org.platformlayer.ops.filesystem.DownloadFileByHash 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")));
}
Aggregations