@Override public <V extends Serializable> Attribute<V> getAttribute(IdentityContext context, AttributedType attributedType, String attributeName) { loadAttributes(context, attributedType); return attributedType.getAttribute(attributeName); }
@Override public String getValue(Object instance) { if (!(instance instanceof AttributedType)) { throw new IllegalStateException("Instance [ " + instance + " ] not an instance of AttributedType"); } AttributedType attributedType = (AttributedType) instance; Attribute<String> attr = attributedType.getAttribute(bindingPropertyName); return attr!=null ? attr.getValue() : null; }
@Override public <V extends Serializable> Attribute<V> getAttribute(IdentityContext context, AttributedType attributedType, String attributeName) { loadAttributes(context, attributedType); return attributedType.getAttribute(attributeName); }
@Override public String getValue(Object instance) { if (!(instance instanceof AttributedType)) { throw new IllegalStateException("Instance [ " + instance + " ] not an instance of AttributedType"); } AttributedType attributedType = (AttributedType) instance; Attribute<String> attr = attributedType.getAttribute(bindingPropertyName); return attr!=null ? attr.getValue() : null; }
private boolean matchAttribute(AttributedType attributedType, String parameterName, Object[] valuesToCompare) { Attribute<Serializable> userAttribute = attributedType.getAttribute(parameterName); Serializable userAttributeValue = null; if (userAttribute != null) { userAttributeValue = userAttribute.getValue(); } if (userAttributeValue != null) { int count = valuesToCompare.length; for (Object value : valuesToCompare) { if (userAttributeValue.getClass().isArray()) { Object[] userValues = (Object[]) userAttributeValue; for (Object object : userValues) { if (object.equals(value)) { count--; } } } else { if (value.equals(userAttributeValue)) { count--; } } } return count <= 0; } return false; }
private boolean matchAttribute(AttributedType attributedType, String parameterName, Object[] valuesToCompare) { Attribute<Serializable> userAttribute = attributedType.getAttribute(parameterName); Serializable userAttributeValue = null; if (userAttribute != null) { userAttributeValue = userAttribute.getValue(); } if (userAttributeValue != null) { int count = valuesToCompare.length; for (Object value : valuesToCompare) { if (userAttributeValue.getClass().isArray()) { Object[] userValues = (Object[]) userAttributeValue; for (Object object : userValues) { if (object.equals(value)) { count--; } } } else { if (value.equals(userAttributeValue)) { count--; } } } return count <= 0; } return false; }
} else { org.picketlink.idm.model.Attribute<?> attribute = attributedType.getAttribute(propertyName); if (attribute != null) { propertyValue = attribute.getValue();
} else { org.picketlink.idm.model.Attribute<?> attribute = attributedType.getAttribute(propertyName); if (attribute != null) { propertyValue = attribute.getValue();