use of org.kuali.kfs.coreservice.api.parameter.ParameterKey in project cu-kfs by CU-CommunityApps.
the class ParameterRepositoryServiceImpl method createParameter.
@CacheEvict(value = Parameter.CACHE_NAME, allEntries = true)
@Override
public Parameter createParameter(Parameter parameter) {
if (parameter == null) {
throw new IllegalArgumentException("parameter is null");
}
final ParameterKey key = ParameterKey.create(parameter.getNamespaceCode(), parameter.getComponentCode(), parameter.getName());
final Parameter existing = getParameter(key);
if (existing != null) {
throw new IllegalStateException("the parameter to create already exists: " + parameter);
}
return businessObjectService.save(parameter);
}
use of org.kuali.kfs.coreservice.api.parameter.ParameterKey in project cu-kfs by CU-CommunityApps.
the class ParameterRepositoryServiceImpl method updateParameter.
@CacheEvict(value = Parameter.CACHE_NAME, allEntries = true)
@Override
public Parameter updateParameter(Parameter parameter) {
if (parameter == null) {
throw new IllegalArgumentException("parameter is null");
}
final ParameterKey key = ParameterKey.create(parameter.getNamespaceCode(), parameter.getComponentCode(), parameter.getName());
final Parameter existing = getParameter(key);
if (existing == null) {
throw new IllegalStateException("the parameter does not exist: " + parameter);
}
return businessObjectService.save(parameter);
}
Aggregations