60 log.trace(
"SimpleExpression.evaluate.");
61 String msg=String.format(
"%s%s",
65 if (attrAnnot==null) {
70 log.error(
"SimpleExpression.evaluate. Attribute '{}' is not recognized in {}",
attribute, msg);
72 attrType = field.getAttributeDefinitionType();
76 attrType = attrAnnot.type();
79 log.error(
"SimpleExpression.evaluate. Could not determine type of attribute '{}' in {}",
attribute, msg);
82 String errMsg=FilterUtil.checkFilterConsistency(
attribute, attrType,
type,
operator);
85 Object currentAttrValue=item.get(
attribute);
87 if (
type.equals(CompValueType.NULL)) {
88 log.trace(
"SimpleExpression.evaluate. Using null as compare value");
89 val=
operator.equals(ScimOperator.EQUAL) ? currentAttrValue==null : currentAttrValue!=null;
92 if (currentAttrValue==null){
94 log.trace(
"SimpleExpression.evaluate. Attribute \"{}\" is absent in resource data",
attribute);
98 if (Type.STRING.equals(attrType) || Type.REFERENCE.equals(attrType))
101 if (Type.INTEGER.equals(attrType) || Type.DECIMAL.equals(attrType))
104 if (Type.BOOLEAN.equals(attrType))
107 if (Type.DATETIME.equals(attrType))
111 log.error(
"SimpleExpression.evaluate. {}", errMsg);
String parentAttribute
Definition: SimpleExpression.java:37
Boolean evaluateDateTimeAttribute(Type attrType, Object valueInItemObj)
Definition: SimpleExpression.java:117
Boolean evaluateBooleanAttribute(Type attrType, Object valueInItemObj)
Definition: SimpleExpression.java:158
ExtensionField getFieldOfExtendedAttribute(Class<? extends BaseScimResource > cls, String attribute)
Definition: ExtensionService.java:172
Logger log
Definition: SimpleExpression.java:29
ExtensionService extService
Definition: SimpleExpression.java:30
Attribute getAttributeAnnotation()
Definition: SimpleExpression.java:257
String attribute
Definition: SimpleExpression.java:32
CompValueType type
Definition: SimpleExpression.java:34
Boolean evaluateStringAttribute(boolean caseExact, Object valueInItemObj)
Definition: SimpleExpression.java:212
Boolean evaluateNumericAttribute(Type attrType, Object valueInItemObj)
Definition: SimpleExpression.java:178
Class<? extends BaseScimResource > resourceClass
Definition: SimpleExpression.java:38