@Override @AttributeProperty public Date getExpirationDate() { return this.expirationDate; }
private Map<String, Attribute> getAttributes(IdentityContext identityContext, AttributedType identityType) { Map<String, Attribute> attributes = new HashMap<String, Attribute>(); for (Attribute attribute : identityType.getAttributes()) { attributes.put(attribute.getName(), attribute); } List<Property<Object>> properties = PropertyQueries.createQuery(identityType.getClass()) .addCriteria(new AnnotatedPropertyCriteria(AttributeProperty.class)) .getResultList(); for (Property property : properties) { AttributeProperty attributeProperty = property.getAnnotatedElement().getAnnotation(AttributeProperty.class); if (attributeProperty.managed()) { String attributeName = property.getName(); Object attributeValue = property.getValue(identityType); if (attributeValue != null) { attributes.put(attributeName, new Attribute(attributeName, (Serializable) attributeValue)); } else { attributes.remove(attributeName); } } } return attributes; }
private Map<String, Attribute> getAttributes(IdentityContext identityContext, AttributedType identityType) { Map<String, Attribute> attributes = new HashMap<String, Attribute>(); for (Attribute attribute : identityType.getAttributes()) { attributes.put(attribute.getName(), attribute); } List<Property<Object>> properties = PropertyQueries.createQuery(identityType.getClass()) .addCriteria(new AnnotatedPropertyCriteria(AttributeProperty.class)) .getResultList(); for (Property property : properties) { AttributeProperty attributeProperty = property.getAnnotatedElement().getAnnotation(AttributeProperty.class); if (attributeProperty.managed()) { String attributeName = property.getName(); Object attributeValue = property.getValue(identityType); if (attributeValue != null) { attributes.put(attributeName, new Attribute(attributeName, (Serializable) attributeValue)); } else { attributes.remove(attributeName); } } } return attributes; }
@Override @AttributeProperty public String getName() { return name; }
private void loadManagedAttributes(AttributedType attributedType) { for (Attribute attribute : attributedType.getAttributes()) { List<Property<Object>> properties = PropertyQueries.createQuery(attributedType.getClass()) .addCriteria(new AnnotatedPropertyCriteria(AttributeProperty.class)) .getResultList(); for (Property property : properties) { AttributeProperty attributeProperty = property.getAnnotatedElement().getAnnotation(AttributeProperty.class); if (property.getName().equals(attribute.getName()) && attributeProperty.managed()) { Object value = null; if (attribute != null) { value = attribute.getValue(); } property.setValue(attributedType, value); if (isTraceEnabled()) { IDENTITY_STORE_LOGGER.tracef("Managed attribute [%s] loaded into type [%s] with identifier [%s] and value [%s]", attribute.getName(), attributedType.getClass(), attributedType.getId(), attribute.getValue()); } } } } }
@Override @AttributeProperty public String getName() { return name; }
private void loadManagedAttributes(AttributedType attributedType) { for (Attribute attribute : attributedType.getAttributes()) { List<Property<Object>> properties = PropertyQueries.createQuery(attributedType.getClass()) .addCriteria(new AnnotatedPropertyCriteria(AttributeProperty.class)) .getResultList(); for (Property property : properties) { AttributeProperty attributeProperty = property.getAnnotatedElement().getAnnotation(AttributeProperty.class); if (property.getName().equals(attribute.getName()) && attributeProperty.managed()) { Object value = null; if (attribute != null) { value = attribute.getValue(); } property.setValue(attributedType, value); if (isTraceEnabled()) { IDENTITY_STORE_LOGGER.tracef("Managed attribute [%s] loaded into type [%s] with identifier [%s] and value [%s]", attribute.getName(), attributedType.getClass(), attributedType.getId(), attribute.getValue()); } } } } }
@AttributeProperty public void setParentGroup(Group group) { this.parentGroup = group; }
@Override @AttributeProperty public Date getCreatedDate() { return this.createdDate; }
@Override @AttributeProperty public Date getCreatedDate() { return this.createdDate; }
@Override @AttributeProperty public Date getExpirationDate() { return this.expirationDate; }
@AttributeProperty public void setParentGroup(Group group) { this.parentGroup = group; }
@InheritsPrivileges @AttributeProperty public Group getParentGroup() { return this.parentGroup; }
@AttributeProperty @StereotypeProperty(IDENTITY_GROUP_NAME) public String getName() { return name; }
@InheritsPrivileges @AttributeProperty public Group getParentGroup() { return this.parentGroup; }
@AttributeProperty @StereotypeProperty(IDENTITY_GROUP_NAME) public String getName() { return name; }
@AttributeProperty private String firstName; @AttributeProperty private String lastName; @AttributeProperty private String email;
@AttributeProperty private String firstName; @AttributeProperty private String lastName; @AttributeProperty private String email;
@AttributeProperty @Unique public String getPath() { this.path = buildPath(this); return this.path; }
@AttributeProperty @StereotypeProperty(IDENTITY_USER_NAME) @Unique public String getLoginName() { return loginName; }