Package org.dspace.eperson
Class EPerson
java.lang.Object
org.dspace.content.DSpaceObject
org.dspace.content.CacheableDSpaceObject
org.dspace.eperson.EPerson
- All Implemented Interfaces:
Serializable,DSpaceObjectLegacySupport,ReloadableEntity<UUID>
Class representing an e-person.
- Author:
- David Stuve
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe e-mail field (for sorting)protected EPersonServicestatic final intThe e-mail field (for sorting)static final intThe e-mail field (for sorting)static final intThe last name (for sorting)static final intThe netid field (for sorting)Fields inherited from class org.dspace.content.DSpaceObject
id, predefinedUUID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEPerson()Protected constructor, create object using:EPersonService.create(Context) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanLogIn()Can the user log in?booleanReturn true if this object equals obj, false otherwise.getEmail()Get the e-person's email addressGet the eperson's first name.Get the e-person's full name, combining first and last name in a displayable string.Get the e-person's languageGet the EPerson's last-active stamp.Get the eperson's last name.getName()getNetid()Get the e-person's netidbooleanGet require certificate or notbooleanIs the user self-registered?intgetType()Get the type of this object, found in ConstantsinthashCode()Return a hash code for this object.booleanvoidsetCanLogIn(boolean login) Indicate whether the user can log invoidSet the EPerson's emailvoidsetFirstName(Context context, String firstname) Set the eperson's first namevoidsetLanguage(Context context, String language) Set the EPerson's language.voidsetLastActive(Instant when) Stamp the EPerson's last-active date.voidsetLastName(Context context, String lastname) Set the eperson's last namevoidSet the EPerson's netidvoidsetRequireCertificate(boolean isrequired) Set require cert yes/novoidsetSelfRegistered(boolean sr) Indicate whether the user self-registeredvoidsetSessionSalt(String sessionSalt) Methods inherited from class org.dspace.content.DSpaceObject
addDetails, addHandle, addMetadata, clearDetails, clearModified, getDetails, getHandle, getHandles, getID, getMetadata, getPredefinedUUID, getResourcePolicies, isMetadataModified, isModified, removeMetadata, removeMetadata, setMetadata, setMetadataModified, setModified
-
Field Details
-
EMAIL
public static final int EMAILThe e-mail field (for sorting)- See Also:
-
LASTNAME
public static final int LASTNAMEThe last name (for sorting)- See Also:
-
ID
public static final int IDThe e-mail field (for sorting)- See Also:
-
NETID
public static final int NETIDThe netid field (for sorting)- See Also:
-
LANGUAGE
public static final int LANGUAGEThe e-mail field (for sorting)- See Also:
-
ePersonService
-
-
Constructor Details
-
EPerson
protected EPerson()Protected constructor, create object using:EPersonService.create(Context)
-
-
Method Details
-
getLegacyId
- Specified by:
getLegacyIdin interfaceDSpaceObjectLegacySupport- Returns:
- the old integer based legacy identifier
-
equals
Return true if this object equals obj, false otherwise. -
hashCode
public int hashCode()Return a hash code for this object. -
getLanguage
Get the e-person's language- Returns:
- language code (or null if the column is an SQL NULL)
-
setLanguage
Set the EPerson's language. Value is expected to be a Unix/POSIX Locale specification of the form {language} or {language}_{territory}, e.g. "en", "en_US", "pt_BR" (the latter is Brazilian Portuguese).- Parameters:
context- The relevant DSpace Context.language- language code- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
getEmail
Get the e-person's email address- Returns:
- their email address (or null if the column is an SQL NULL)
-
setEmail
Set the EPerson's email- Parameters:
s- the new email
-
getNetid
Get the e-person's netid- Returns:
- their netid (DB constraints ensure it's never NULL)
-
setNetid
Set the EPerson's netid- Parameters:
netid- the new netid
-
getFullName
Get the e-person's full name, combining first and last name in a displayable string.- Returns:
- their full name (first + last name; if both are NULL, returns email)
-
getFirstName
Get the eperson's first name.- Returns:
- their first name (or null if the column is an SQL NULL)
-
setFirstName
Set the eperson's first name- Parameters:
context- The relevant DSpace Context.firstname- the person's first name- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
getLastName
Get the eperson's last name.- Returns:
- their last name (or null if the column is an SQL NULL)
-
setLastName
Set the eperson's last name- Parameters:
context- The relevant DSpace Context.lastname- the person's last name- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
setCanLogIn
public void setCanLogIn(boolean login) Indicate whether the user can log in- Parameters:
login- boolean yes/no
-
canLogIn
public boolean canLogIn()Can the user log in?- Returns:
- boolean, yes/no
-
setRequireCertificate
public void setRequireCertificate(boolean isrequired) Set require cert yes/no- Parameters:
isrequired- boolean yes/no
-
getRequireCertificate
public boolean getRequireCertificate()Get require certificate or not- Returns:
- boolean, yes/no (or false if the column is an SQL NULL)
-
setSelfRegistered
public void setSelfRegistered(boolean sr) Indicate whether the user self-registered- Parameters:
sr- boolean yes/no
-
getSelfRegistered
public boolean getSelfRegistered()Is the user self-registered?- Returns:
- boolean, yes/no (or false if the column is an SQL NULL)
-
setLastActive
Stamp the EPerson's last-active date.- Parameters:
when- latest activity timestamp, or null to clear.
-
getLastActive
Get the EPerson's last-active stamp.- Returns:
- date when last logged on, or null.
-
getType
public int getType()Description copied from class:DSpaceObjectGet the type of this object, found in Constants- Specified by:
getTypein classDSpaceObject- Returns:
- type found in Constants, see
Constants
-
getName
- Specified by:
getNamein classDSpaceObject
-
getGroups
-
getSessionSalt
-
setSessionSalt
-
getPreviousActive
-
hasPasswordSet
public boolean hasPasswordSet()
-