Class CustomAttributeAction

  • All Implemented Interfaces:
    java.io.Serializable

    @ConversationScoped
    @Named
    public class CustomAttributeAction
    extends java.lang.Object
    implements java.io.Serializable
    Action class for work with custom attributes
    Author:
    Yuriy Movchan Date: 12/24/2012
    See Also:
    Serialized Form
    • Constructor Detail

      • CustomAttributeAction

        public CustomAttributeAction()
    • Method Detail

      • initCustomAttributes

        public void initCustomAttributes​(java.util.List<org.gluu.model.GluuAttribute> attributes,
                                         java.util.List<GluuCustomAttribute> customAttributes,
                                         java.util.List<java.lang.String> origins,
                                         java.lang.String[] objectClassTypes,
                                         java.lang.String[] objectClassDisplayNames)
      • groupAttributesByOrigin

        public java.util.Map<java.lang.String,​java.util.List<org.gluu.model.GluuAttribute>> groupAttributesByOrigin​(java.util.List<org.gluu.model.GluuAttribute> attributes)
      • containsCustomAttribute

        public boolean containsCustomAttribute​(org.gluu.model.GluuAttribute attribute)
      • addCustomAttribute

        public void addCustomAttribute​(java.lang.String inum,
                                       boolean mandatory)
      • addMultiValuesInAttributes

        public void addMultiValuesInAttributes​(java.lang.String inum,
                                               boolean mandatory)
      • removeMultiValuesInAttributes

        public void removeMultiValuesInAttributes​(java.lang.String inum,
                                                  boolean mandatory,
                                                  java.lang.String removeValue)
      • addCustomAttribute

        public void addCustomAttribute​(java.lang.String inum)
      • addCustomAttributes

        public void addCustomAttributes​(java.util.List<GluuCustomAttribute> newCustomAttributes)
      • removeCustomAttribute

        public void removeCustomAttribute​(java.lang.String inum)
      • handleMultiValuedAttributeRemoval

        public void handleMultiValuedAttributeRemoval​(java.lang.String inum,
                                                      boolean canRemove)
      • refreshCustomAttributes

        public void refreshCustomAttributes​(java.util.List<GluuCustomAttribute> newCustomAttributes)
      • getOriginForAttribute

        public java.lang.String getOriginForAttribute​(org.gluu.model.GluuAttribute attribute)
        Override this method if you need to organize attributes to some specific set of origins.
        Parameters:
        attribute -
        Returns:
        attribute.getOrigin()
      • getCustomAttribute

        public GluuCustomAttribute getCustomAttribute​(java.lang.String inum)
      • getCustomAttribute

        public org.gluu.model.GluuAttribute getCustomAttribute​(java.lang.String origin,
                                                               java.lang.String name)
      • detectRemovedAttributes

        public java.util.List<GluuCustomAttribute> detectRemovedAttributes()
      • updateOriginCustomAttributes

        public void updateOriginCustomAttributes()
      • getAttributes

        public java.util.List<org.gluu.model.GluuAttribute> getAttributes()
      • getAttributeIds

        public java.util.Map<org.gluu.model.GluuAttribute,​java.lang.String> getAttributeIds()
      • setAttributeIds

        public void setAttributeIds​(java.util.Map<org.gluu.model.GluuAttribute,​java.lang.String> attributeIds)
      • getAttributeByOrigin

        public java.util.Map<java.lang.String,​java.util.List<org.gluu.model.GluuAttribute>> getAttributeByOrigin()
      • getAttributeByOriginKeyList

        public java.util.List<java.lang.String> getAttributeByOriginKeyList()
      • setAttributeByOrigin

        public void setAttributeByOrigin​(java.util.Map<java.lang.String,​java.util.List<org.gluu.model.GluuAttribute>> attributeByOrigin)
      • getOriginDisplayNames

        public java.util.Map<java.lang.String,​java.lang.String> getOriginDisplayNames()
      • getActiveOrigin

        public java.lang.String getActiveOrigin()
      • setActiveOrigin

        public void setActiveOrigin​(java.lang.String activeOrigin)
      • renderAttribute

        public void renderAttribute​(javax.faces.event.ComponentSystemEvent event)
      • validateAttributeValues

        public void validateAttributeValues​(javax.faces.event.ComponentSystemEvent event)