Class EntitiesModelImpl

    • Constructor Detail

      • EntitiesModelImpl

        public EntitiesModelImpl​(jakarta.servlet.http.HttpServletRequest req,
                                 Map map)
    • Method Detail

      • getEntityType

        public String getEntityType()
        Returns the type of entity object for which the model was constructed.
        Specified by:
        getEntityType in interface EntitiesModel
        Returns:
        type of entity object being used.
      • setEndUser

        public void setEndUser​(boolean endUser)
        Set end user flag.
        Specified by:
        setEndUser in interface EntitiesModel
        Parameters:
        endUser - end user flag.
      • getAttributeValues

        public Map getAttributeValues​(String universalId,
                                      boolean bCreate)
                               throws AMConsoleException
        Returns attribute values of an entity object.
        Specified by:
        getAttributeValues in interface EntitiesModel
        Parameters:
        universalId - Universal ID of the entity.
        bCreate - true for creation page
        Returns:
        attribute values of an entity object.
        Throws:
        AMConsoleException - if object cannot located.
      • getPropertyXMLString

        public String getPropertyXMLString​(String realmName,
                                           String idType,
                                           String agentType,
                                           boolean bCreate,
                                           String viewbeanClassName)
                                    throws AMConsoleException
        Returns property sheet XML for Entity Profile.
        Specified by:
        getPropertyXMLString in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        idType - Type of Entity.
        agentType - agent type.
        bCreate - true for creation operation.
        viewbeanClassName - Class Name of View Bean.
        Returns:
        property sheet XML for Entity Profile.
        Throws:
        AMConsoleException - if XML cannot be obtained.
      • createEntity

        public void createEntity​(String realmName,
                                 String entityName,
                                 String idType,
                                 Map values)
                          throws AMConsoleException
        Creates an entity.
        Specified by:
        createEntity in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        entityName - Name of Entity.
        idType - Type of Entity.
        values - Map of attribute name to Set of attribute values.
        Throws:
        AMConsoleException - if entity cannot be created.
      • modifyEntity

        public void modifyEntity​(String realmName,
                                 String universalId,
                                 Map values)
                          throws AMConsoleException
        Modifies profile of entity.
        Specified by:
        modifyEntity in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        universalId - Universal ID of the entity.
        values - Map of attribute name to set of attribute values.
        Throws:
        AMConsoleException - if entity cannot be located or modified.
      • canAssignService

        public boolean canAssignService​(String realmName,
                                        String idType)
        Returns true if services can be assigned to this entity type.
        Specified by:
        canAssignService in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        idType - Type of Entity.
        Returns:
        true if services can be assigned to this entity type.
      • getIdTypeMemberOf

        public Set getIdTypeMemberOf​(String realmName,
                                     String idType)
                              throws AMConsoleException
        Returns a set of entity types of which a given type can have member of.
        Specified by:
        getIdTypeMemberOf in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        idType - Type of Entity.
        Returns:
        a set of entity types of which a given type can have member of.
        Throws:
        AMConsoleException - if idType is not supported.
      • getIdTypeBeMemberOf

        public Set getIdTypeBeMemberOf​(String realmName,
                                       String idType)
                                throws AMConsoleException
        Returns a set of entity types that can be member of a given type.
        Specified by:
        getIdTypeBeMemberOf in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        idType - Type of Entity.
        Returns:
        a set of entity types that can be member of a given type.
        Throws:
        AMConsoleException - if idType is not supported.
      • canAddMember

        public boolean canAddMember​(String realmName,
                                    String idType,
                                    String containerIDType)
                             throws AMConsoleException
        Returns true of members can be added to a type.
        Specified by:
        canAddMember in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        idType - Type of Entity.
        containerIDType - Type of Entity of Container.
        Returns:
        true of members can be added to a type.
        Throws:
        AMConsoleException
      • getServiceNameForIdType

        public String getServiceNameForIdType​(String idType,
                                              String agentType)
        Returns service name of a given ID type.
        Specified by:
        getServiceNameForIdType in interface EntitiesModel
        Parameters:
        idType - ID Type.
        agentType - Agent Type.
        Returns:
        service name of a given ID type.
      • getMembership

        public Set getMembership​(String realmName,
                                 String universalId,
                                 String type)
                          throws AMConsoleException
        Returns membership of an entity.
        Specified by:
        getMembership in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        universalId - Universal ID of the entity.
        type - Type of membership.
        Returns:
        membership of an entity.
        Throws:
        AMConsoleException - if members cannot be returned.
      • getMembers

        public Set getMembers​(String realmName,
                              String universalId,
                              String type)
                       throws AMConsoleException
        Returns members of an entity.
        Specified by:
        getMembers in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        universalId - Universal ID of the entity.
        type - Type of membership.
        Returns:
        members of an entity.
        Throws:
        AMConsoleException - if members cannot be returned.
      • addMemberships

        public void addMemberships​(String universalId,
                                   Set membership)
                            throws AMConsoleException
        Adds an entity to a set of membership.
        Specified by:
        addMemberships in interface EntitiesModel
        Parameters:
        universalId - Universal ID of the entity.
        membership - Set of Universal ID of membership.
        Throws:
        AMConsoleException - if membership addition fails.
      • addMembers

        public void addMembers​(String universalId,
                               Set names)
                        throws AMConsoleException
        Adds an entities to a membership.
        Specified by:
        addMembers in interface EntitiesModel
        Parameters:
        universalId - Universal ID of the membership.
        names - Set of Universal ID of entities.
        Throws:
        AMConsoleException - if membership addition fails.
      • removeMemberships

        public void removeMemberships​(String universalId,
                                      Set membership)
                               throws AMConsoleException
        Removes an entity from a set of memberships.
        Specified by:
        removeMemberships in interface EntitiesModel
        Parameters:
        universalId - Universal ID of the entity.
        membership - Set of Universal ID of membership.
        Throws:
        AMConsoleException - if membership removal fails.
      • removeMembers

        public void removeMembers​(String universalId,
                                  Set names)
                           throws AMConsoleException
        Removes a set of entities from a membership.
        Specified by:
        removeMembers in interface EntitiesModel
        Parameters:
        universalId - Universal ID of the membership.
        names - Set of Universal ID of entities.
        Throws:
        AMConsoleException - if membership removal fails.
      • getServicePropertySheetXML

        public String getServicePropertySheetXML​(String realmName,
                                                 String serviceName,
                                                 IdType idType,
                                                 boolean bCreate,
                                                 String viewbeanClassName)
                                          throws AMConsoleException
        Returns the XML for property sheet view component.
        Specified by:
        getServicePropertySheetXML in interface EntitiesModel
        Parameters:
        realmName - Name of Realm.
        serviceName - Name of service.
        idType - type of Identity.
        bCreate - true if the property sheet is for identity creation.
        viewbeanClassName - Class Name of View Bean.
        Returns:
        the XML for property sheet view component.
        Throws:
        AMConsoleException - if XML cannot be created.
      • assignService

        public void assignService​(String universalId,
                                  String serviceName,
                                  Map values)
                           throws AMConsoleException
        Assigns service to an entity.
        Specified by:
        assignService in interface EntitiesModel
        Parameters:
        universalId - Universal ID of the entity.
        serviceName - Name of service names.
        values - Attribute Values of the service.
        Throws:
        AMConsoleException - if service cannot be assigned.
      • unassignServices

        public void unassignServices​(String universalId,
                                     Set serviceNames)
                              throws AMConsoleException
        Unassigns services from an entity.
        Specified by:
        unassignServices in interface EntitiesModel
        Parameters:
        universalId - Universal ID of the entity.
        serviceNames - Set of service names to be unassigned.
        Throws:
        AMConsoleException - if services cannot be unassigned.
      • getPropertiesViewBean

        public String getPropertiesViewBean​(String name)
        Returns properties view bean URL for an attribute schema.
        Specified by:
        getPropertiesViewBean in interface EntitiesModel
        Parameters:
        name - Name of attribute schema.
        Returns:
        properties view bean URL for an attribute schema.
      • getServiceAttributeValues

        public Map getServiceAttributeValues​(String universalId,
                                             String serviceName)
                                      throws AMConsoleException
        Returns service attribute values of an entity.
        Specified by:
        getServiceAttributeValues in interface EntitiesModel
        Parameters:
        universalId - Universal ID of the entity.
        serviceName - Name of service name.
        Returns:
        service attribute values of entity.
        Throws:
        AMConsoleException - if values cannot be returned.
      • hasUserAttributeSchema

        public boolean hasUserAttributeSchema​(String serviceName)
        Returns true if service has displayable user attributes.
        Specified by:
        hasUserAttributeSchema in interface EntitiesModel
        Parameters:
        serviceName - Name of service.
        Returns:
        true if service has user attribute schema.
      • hasDisplayableAttributes

        public boolean hasDisplayableAttributes​(String serviceName)
        This is a convenience method to check if there is displayable attributes for a given service.
        Specified by:
        hasDisplayableAttributes in interface EntitiesModel
        Parameters:
        serviceName - name of service being displayed.
        Returns:
        true if the service schema has at least one attribute to display.
      • isServicesSupported

        public boolean isServicesSupported()
        Returns true if services is supported for the identity.
        Specified by:
        isServicesSupported in interface EntitiesModel
        Returns:
        true if services is supported for the identity.