Class User

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.DateComparable, edu.uiuc.ncsa.security.core.Identifiable, Serializable, Cloneable

    public class User
    extends edu.uiuc.ncsa.security.storage.monitored.Monitored

    Created by Jeff Gaynor
    on Mar 11, 2010 at 3:21:45 PM

    See Also:
    Serialized Form
    • Constructor Detail

      • User

        public User​(edu.uiuc.ncsa.security.core.Identifier id,
                    SerialStrings ss)
    • Method Detail

      • getUserMultiKey

        public UserMultiID getUserMultiKey()
      • setUserMultiKey

        public void setUserMultiKey​(UserMultiID userMultiKey)
      • clone

        public User clone()
        Returns a completely new user whose information is identical to this user.
        Specified by:
        clone in interface edu.uiuc.ncsa.security.core.Identifiable
        Overrides:
        clone in class edu.uiuc.ncsa.security.storage.monitored.Monitored
        Returns:
      • copyTo

        public void copyTo​(User u2,
                           boolean copyID)
        Copy this user into the given user. This replaces the current user's values with the arguments. Mostly this is of use in certain recovery utilities and it is logical that the user class manage this. Optionally, reset the target's identifier to this on
        Parameters:
        u2 -
        copyID - whether or not to copy this user's id to the target.
      • getFirstName

        public String getFirstName()
      • setFirstName

        public void setFirstName​(String firstName)
      • getLastName

        public String getLastName()
      • setLastName

        public void setLastName​(String lastName)
      • getEmail

        public String getEmail()
      • setEmail

        public void setEmail​(String email)
      • getIDPName

        public String getIDPName()
      • setIDPName

        public void setIDPName​(String iDPName)
      • getIdP

        public String getIdP()
      • setIdP

        public void setIdP​(String idP)
      • getAttr_json

        public String getAttr_json()
        This is used in cases where the member of information is sent via a call to the getUser DB endpoint.
        Returns:
      • setAttr_json

        public void setAttr_json​(String attr_json)
      • isUseUSinDN

        public boolean isUseUSinDN()
      • setUseUSinDN

        public void setUseUSinDN​(boolean useUSinDN)
      • getSerialString

        public String getSerialString()
      • canGetCert

        public boolean canGetCert()
      • isNotTrivial

        public boolean isNotTrivial​(String x)
      • setSerialString

        public void setSerialString​(String serialString)
      • setRemoteUser

        public void setRemoteUser​(RemoteUserName remoteUser)
      • getSerialIdentifier

        public edu.uiuc.ncsa.security.core.Identifier getSerialIdentifier()
      • setSerialIdentifier

        public void setSerialIdentifier​(edu.uiuc.ncsa.security.core.Identifier serialIdentifier)
      • getCertName

        public String[] getCertName()
        Only call this if canGetCert() is true.
        Returns:
      • getState

        public net.sf.json.JSONObject getState()
        A general JSON object for storing state about a user. Since we are getting more and more types of users with often custom information it makes sense to have a soft structure to hold it (vs. changing the user API generally for every special case).
        Returns:
      • setState

        public void setState​(net.sf.json.JSONObject state)
      • getDNState

        public DNState getDNState()
      • setDNState

        public void setDNState​(DNState dnState)
      • checkEquals

        public boolean checkEquals​(String x,
                                   String y)
      • equals

        public boolean equals​(Object obj)
        Note especially that this compares users as java objects, not a logical users. The method compare(User) should be user for comparing users. See the note there.
        Overrides:
        equals in class edu.uiuc.ncsa.security.storage.monitored.Monitored
        Parameters:
        obj -
        Returns:
      • compare

        public boolean compare​(String idpDisplayName,
                               String firstName,
                               String lastName,
                               String email)
        Compare the IDP display name, first & last names and email with this user. These are the items that go into the certificate so if there is a change in these, this method will return true.
        Parameters:
        idpDisplayName -
        firstName -
        lastName -
        email -
        Returns:
      • compare

        public boolean compare​(User user)
        This compares the 6 major keys of the given user to this. This is important, since equals compares Java objects. We have to compare the actual 6 parameters to see if, for instance, a user should be archived and issued a new serial string.
        Parameters:
        user -
        Returns:
      • setPairwiseId

        public void setPairwiseId​(PairwiseID pairwiseID)
      • setSubjectId

        public void setSubjectId​(SubjectID subjectID)
      • getOpenID

        public OpenID getOpenID()
      • setOpenID

        public void setOpenID​(OpenID openID)
      • getSubjectID

        public SubjectID getSubjectID()
      • getPairwiseID

        public PairwiseID getPairwiseID()
      • setOpenIDConnect

        public void setOpenIDConnect​(OpenIDConnect openIDConnect)
      • hasOpenIDConnect

        public boolean hasOpenIDConnect()
      • hasEPPN

        public boolean hasEPPN()
      • hasEPTID

        public boolean hasEPTID()
      • hasRemoteUser

        public boolean hasRemoteUser()
      • hasOpenID

        public boolean hasOpenID()
      • hasSubjectID

        public boolean hasSubjectID()
      • hasPairwiseID

        public boolean hasPairwiseID()
      • getAffiliation

        public String getAffiliation()
      • setAffiliation

        public void setAffiliation​(String affiliation)
      • getDisplayName

        public String getDisplayName()
      • setDisplayName

        public void setDisplayName​(String displayName)
      • getOrganizationalUnit

        public String getOrganizationalUnit()
      • setOrganizationalUnit

        public void setOrganizationalUnit​(String organizationalUnit)