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.Monitored
Created 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 long
serialVersionUID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canGetCert()
boolean
checkEquals(String x, String y)
boolean
checkEquals(PersonName x, PersonName y)
User
clone()
Returns a completely new user whose information is identical to this user.boolean
compare(String idpDisplayName, String firstName, String lastName, String email)
Compare the IDP display name, first & last names and email with this user.boolean
compare(User user)
This compares the 6 major keys of the given user to this.void
copyTo(User u2, boolean copyID)
Copy this user into the given user.boolean
equals(Object obj)
Note especially that this compares users as java objects, not a logical users.String
getAffiliation()
String
getAttr_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.String
getDisplayName()
String
getDN(AbstractCILServiceTransaction transaction, boolean returnEmail)
DNState
getDNState()
String
getEmail()
EduPersonPrincipleName
getePPN()
EduPersonTargetedID
getePTID()
String
getFirstName()
String
getIdP()
String
getIDPName()
String
getLastName()
OpenID
getOpenID()
OpenIDConnect
getOpenIDConnect()
String
getOrganizationalUnit()
PairwiseID
getPairwiseID()
RemoteUserName
getRemoteUser()
edu.uiuc.ncsa.security.core.Identifier
getSerialIdentifier()
String
getSerialString()
net.sf.json.JSONObject
getState()
A general JSON object for storing state about a user.SubjectID
getSubjectID()
UserMultiID
getUserMultiKey()
boolean
hasEPPN()
boolean
hasEPTID()
boolean
hasOpenID()
boolean
hasOpenIDConnect()
boolean
hasPairwiseID()
boolean
hasRemoteUser()
boolean
hasSubjectID()
boolean
isNotTrivial(String x)
boolean
isUseUSinDN()
void
setAffiliation(String affiliation)
void
setAttr_json(String attr_json)
void
setDisplayName(String displayName)
void
setDNState(DNState dnState)
void
setEmail(String email)
void
setePPN(EduPersonPrincipleName ePPN)
void
setePTID(EduPersonTargetedID ePTID)
void
setFirstName(String firstName)
void
setIdP(String idP)
void
setIDPName(String iDPName)
void
setLastName(String lastName)
void
setOpenID(OpenID openID)
void
setOpenIDConnect(OpenIDConnect openIDConnect)
void
setOrganizationalUnit(String organizationalUnit)
void
setPairwiseId(PairwiseID pairwiseID)
void
setRemoteUser(RemoteUserName remoteUser)
void
setSerialIdentifier(edu.uiuc.ncsa.security.core.Identifier serialIdentifier)
void
setSerialString(String serialString)
void
setState(net.sf.json.JSONObject state)
void
setSubjectId(SubjectID subjectID)
void
setUserMultiKey(UserMultiID userMultiKey)
void
setUseUSinDN(boolean useUSinDN)
String
toString()
-
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:
clone
in interfaceedu.uiuc.ncsa.security.core.Identifiable
- Overrides:
clone
in 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)
-
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:
equals
in 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)
-
-