use of org.estatio.dom.valuetypes.ApplicationTenancyLevel in project estatio by estatio.
the class Api method putApplicationTenancy.
// //////////////////////////////////////
@ActionSemantics(Of.IDEMPOTENT)
public void putApplicationTenancy(@Named("path") final String path, @Named("name") final String name) {
ApplicationTenancy applicationTenancy = applicationTenancies.findTenancyByPath(path);
if (applicationTenancy == null) {
final ApplicationTenancyLevel parentLevel = ApplicationTenancyLevel.of(path).parent();
final ApplicationTenancy parentApplicationTenancy = parentLevel != null ? applicationTenancies.findTenancyByPath(parentLevel.getPath()) : null;
applicationTenancy = applicationTenancies.newTenancy(name, path, parentApplicationTenancy);
}
applicationTenancy.setName(name);
// TODO: EST-467, to remove
getContainer().flush();
}
Aggregations