Class LogicalSubject

    • Constructor Detail

      • LogicalSubject

        public LogicalSubject()
        Constructor.
      • LogicalSubject

        public LogicalSubject​(Set<EntitlementSubject> eSubjects)
        Constructor.
        Parameters:
        eSubjects - wrapped EntitlementSubject(s)
      • LogicalSubject

        public LogicalSubject​(Set<EntitlementSubject> eSubjects,
                              String pSubjectName)
        Constructor.
        Parameters:
        eSubjects - wrapped EntitlementSubject(s)
        pSubjectName - subject name as used in OpenAM policy, this is relevant only when UserESubject was created from OpenAM policy Subject
    • Method Detail

      • setState

        public void setState​(String state)
        Sets state of the object
        Specified by:
        setState in interface EntitlementSubject
        Parameters:
        state - State of the object encoded as string
      • getState

        public String getState()
        Returns state of the object
        Specified by:
        getState in interface EntitlementSubject
        Returns:
        state of the object encoded as string
      • setESubjects

        public void setESubjects​(Set<EntitlementSubject> eSubjects)
        Sets the nested EntitlementSubject(s)
        Parameters:
        eSubjects - the nested EntitlementSubject(s)
      • getESubjects

        public Set<EntitlementSubject> getESubjects()
        Returns the nested EntitlementSubject(s)
        Returns:
        the nested EntitlementSubject(s)
      • setPSubjectName

        public void setPSubjectName​(String pSubjectName)
        Sets OpenAM policy Subject name
        Parameters:
        pSubjectName - subject name as used in OpenAM policy, this is relevant only when UserESubject was created from OpenAM policy Subject
      • getPSubjectName

        public String getPSubjectName()
        Returns OpenAM policy Subject name
        Returns:
        subject name as used in OpenAM policy, this is relevant only when UserESubject was created from OpenAM policy Subject
      • toJSONObject

        public org.json.JSONObject toJSONObject()
                                         throws org.json.JSONException
        Returns JSONObject mapping of the object
        Returns:
        JSONObject mapping of the object
        Throws:
        org.json.JSONException - if can not map to JSONObject
      • toString

        public String toString()
        Returns string representation of the object
        Overrides:
        toString in class Object
        Returns:
        string representation of the object
      • equals

        public boolean equals​(Object obj)
        Returns true if the passed in object is equal to this object
        Overrides:
        equals in class Object
        Parameters:
        obj - object to check for equality
        Returns:
        true if the passed in object is equal to this object
      • hashCode

        public int hashCode()
        Returns hash code of the object
        Overrides:
        hashCode in class Object
        Returns:
        hash code of the object
      • isIdentity

        public boolean isIdentity()
        Returns true is this subject is an identity object.
        Specified by:
        isIdentity in interface EntitlementSubject
        Returns:
        true is this subject is an identity object.