propertyMap.put(entry.getKey(), coder.decode(entry.getValue(), Object.class));
} catch (CoderException ce) {
String errorMessage = "error decoding property JSON value read from database: key=" + entry.getKey()
propertyMap.put(entry.getKey(), coder.decode(entry.getValue(), Object.class));
} catch (CoderException ce) {
String errorMessage = "error decoding property JSON value read from database: key=" + entry.getKey()
- type.setVersion(PfKey.NULL_KEY_VERSION);
+ throw new PfModelRuntimeException(Response.Status.BAD_REQUEST,
+ "PolicyType version not specified, the version of the PolicyType for this policy must be specified in "
+ + "the type_version field");
properties.put(propertyEntry.getKey(), coder.encode(propertyEntry.getValue()));
} catch (CoderException ce) {
String errorMessage = "error encoding property JSON value for database: key="
properties.put(propertyEntry.getKey(), coder.encode(propertyEntry.getValue()));
} catch (CoderException ce) {
String errorMessage = "error encoding property JSON value for database: key="
if (PfKey.NULL_KEY_VERSION.equals(getKey().getVersion())) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
if (PfKey.NULL_KEY_VERSION.equals(getKey().getVersion())) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
}
if (type == null || type.isNullKey()) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
}
if (type == null || type.isNullKey()) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
for (Entry<String, String> propertyEntry : properties.entrySet()) {
if (!ParameterValidationUtils.validateStringParameter(propertyEntry.getKey())) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
for (Entry<String, String> propertyEntry : properties.entrySet()) {
if (!ParameterValidationUtils.validateStringParameter(propertyEntry.getKey())) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
} else if (propertyEntry.getValue() == null) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
} else if (propertyEntry.getValue() == null) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
for (PfConceptKey target : targets) {
if (target == null) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
for (PfConceptKey target : targets) {
if (target == null) {
result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,