use of com.sequenceiq.cloudbreak.domain.ConstraintTemplate in project cloudbreak by hortonworks.
the class ConstraintTemplateService method delete.
public void delete(String name, IdentityUser user) {
ConstraintTemplate constraintTemplate = constraintTemplateRepository.findByNameInAccount(name, user.getAccount(), user.getUserId());
if (constraintTemplate == null) {
throw new NotFoundException(String.format(CONSTRAINT_NOT_FOUND_MSG, name));
}
delete(constraintTemplate);
}
use of com.sequenceiq.cloudbreak.domain.ConstraintTemplate in project cloudbreak by hortonworks.
the class ConstraintTemplateService method get.
public ConstraintTemplate get(Long id) {
ConstraintTemplate constraintTemplate = constraintTemplateRepository.findOne(id);
if (constraintTemplate == null) {
throw new NotFoundException(String.format(CONSTRAINT_NOT_FOUND_MSG, id));
}
authorizationService.hasReadPermission(constraintTemplate);
return constraintTemplate;
}
Aggregations