use of com.scaleset.cfbuilder.ec2.Instance in project TOSCAna by StuPro-TOSCAna.
the class OperationHandler method addCreate.
/**
* Manually adds a create command with the given input variables and file path to the given EC2 instance.
*
* @param filePath path to the artifact
* @param serverName name of the Instance
*/
public void addCreate(String filePath, String serverName) {
markUtilFile(filePath);
CFNFile cfnFile = handleOperationFile(filePath, MODE_500, serverName);
CFNCommand cfnCommand = handleOperationCommand(filePath, new HashSet<>());
// Add file to config and execution command
cfnModule.getCFNInit(serverName).getOrAddConfig(CONFIG_SETS, CONFIG_CREATE).putFile(cfnFile).putCommand(cfnCommand);
}
use of com.scaleset.cfbuilder.ec2.Instance in project omegat by omegat-org.
the class FilterMaster method getDefaultSettingsFromFilter.
/**
* Create default filter's config.
*
* @param filterClassname
* filter's classname
* @return default filter's config
*/
public static Filter getDefaultSettingsFromFilter(final String filterClassname) {
IFilter f = getFilterInstance(filterClassname);
if (f == null) {
return null;
}
Filter fc = new Filter();
fc.setClassName(f.getClass().getName());
fc.setEnabled(true);
for (Instance ins : f.getDefaultInstances()) {
Files ff = new Files();
ff.setSourceEncoding(ins.getSourceEncoding());
ff.setSourceFilenameMask(ins.getSourceFilenameMask());
ff.setTargetEncoding(ins.getTargetEncoding());
ff.setTargetFilenamePattern(ins.getTargetFilenamePattern());
fc.getFiles().add(ff);
}
return fc;
}
Aggregations