Class User
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.IdentifiableImpl
-
- edu.uiuc.ncsa.security.storage.monitored.Monitored
-
- org.cilogon.oauth2.servlet.storage.user.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.MonitoredCreated by Jeff Gaynor
on Mar 11, 2010 at 3:21:45 PM- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanGetCert()booleancheckEquals(String x, String y)booleancheckEquals(PersonName x, PersonName y)Userclone()Returns a completely new user whose information is identical to this user.booleancompare(String idpDisplayName, String firstName, String lastName, String email)Compare the IDP display name, first & last names and email with this user.booleancompare(User user)This compares the 6 major keys of the given user to this.voidcopyTo(User u2, boolean copyID)Copy this user into the given user.booleanequals(Object obj)Note especially that this compares users as java objects, not a logical users.StringgetAffiliation()StringgetAttr_json()This is used in cases where the member of information is sent via a call to the getUser DB endpoint.String[]getCertName()Only call this ifcanGetCert()is true.StringgetDisplayName()StringgetDN(AbstractCILServiceTransaction transaction, boolean returnEmail)DNStategetDNState()StringgetEmail()EduPersonPrincipleNamegetePPN()EduPersonTargetedIDgetePTID()StringgetFirstName()StringgetIdP()StringgetIDPName()StringgetLastName()OpenIDgetOpenID()OpenIDConnectgetOpenIDConnect()StringgetOrganizationalUnit()PairwiseIDgetPairwiseID()RemoteUserNamegetRemoteUser()edu.uiuc.ncsa.security.core.IdentifiergetSerialIdentifier()StringgetSerialString()net.sf.json.JSONObjectgetState()A general JSON object for storing state about a user.SubjectIDgetSubjectID()UserMultiIDgetUserMultiKey()booleanhasEPPN()booleanhasEPTID()booleanhasOpenID()booleanhasOpenIDConnect()booleanhasPairwiseID()booleanhasRemoteUser()booleanhasSubjectID()booleanisNotTrivial(String x)booleanisUseUSinDN()voidsetAffiliation(String affiliation)voidsetAttr_json(String attr_json)voidsetDisplayName(String displayName)voidsetDNState(DNState dnState)voidsetEmail(String email)voidsetePPN(EduPersonPrincipleName ePPN)voidsetePTID(EduPersonTargetedID ePTID)voidsetFirstName(String firstName)voidsetIdP(String idP)voidsetIDPName(String iDPName)voidsetLastName(String lastName)voidsetOpenID(OpenID openID)voidsetOpenIDConnect(OpenIDConnect openIDConnect)voidsetOrganizationalUnit(String organizationalUnit)voidsetPairwiseId(PairwiseID pairwiseID)voidsetRemoteUser(RemoteUserName remoteUser)voidsetSerialIdentifier(edu.uiuc.ncsa.security.core.Identifier serialIdentifier)voidsetSerialString(String serialString)voidsetState(net.sf.json.JSONObject state)voidsetSubjectId(SubjectID subjectID)voidsetUserMultiKey(UserMultiID userMultiKey)voidsetUseUSinDN(boolean useUSinDN)StringtoString()StringtoString(int indent)-
Methods inherited from class edu.uiuc.ncsa.security.storage.monitored.Monitored
getCreationTS, getLastAccessed, getLastModifiedTS, setCreationTS, setLastAccessed, setLastModifiedTS
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
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:
clonein interfaceedu.uiuc.ncsa.security.core.Identifiable- Overrides:
clonein classedu.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)
-
getRemoteUser
public RemoteUserName getRemoteUser()
-
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 ifcanGetCert()is true.- Returns:
-
getDN
public String getDN(AbstractCILServiceTransaction transaction, boolean returnEmail)
-
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)
-
toString
public String toString(int indent)
-
checkEquals
public boolean checkEquals(PersonName x, PersonName y)
-
equals
public boolean equals(Object obj)
Note especially that this compares users as java objects, not a logical users. The methodcompare(User)should be user for comparing users. See the note there.- Overrides:
equalsin classedu.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:
-
getePPN
public EduPersonPrincipleName getePPN()
-
setePPN
public void setePPN(EduPersonPrincipleName ePPN)
-
getePTID
public EduPersonTargetedID getePTID()
-
setePTID
public void setePTID(EduPersonTargetedID ePTID)
-
setPairwiseId
public void setPairwiseId(PairwiseID pairwiseID)
-
setSubjectId
public void setSubjectId(SubjectID subjectID)
-
getOpenID
public OpenID getOpenID()
-
setOpenID
public void setOpenID(OpenID openID)
-
getOpenIDConnect
public OpenIDConnect getOpenIDConnect()
-
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)
-
-