|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.DSpaceObject
org.dspace.eperson.EPerson
public class EPerson
Class representing an e-person.
| Field Summary | |
|---|---|
static int |
EMAIL
The e-mail field (for sorting) |
static int |
ID
The e-mail field (for sorting) |
static int |
LANGUAGE
The e-mail field (for sorting) |
static int |
LASTNAME
The last name (for sorting) |
static int |
NETID
The netid field (for sorting) |
| Method Summary | |
|---|---|
boolean |
canLogIn()
Can the user log in? |
boolean |
checkPassword(String attempt)
Check EPerson's password. |
static EPerson |
create(Context context)
Create a new eperson |
void |
delete()
Delete an eperson |
boolean |
equals(Object obj)
Return true if this object equals obj, false otherwise. |
static EPerson |
find(Context context,
int id)
Get an EPerson from the database. |
static EPerson[] |
findAll(Context context,
int sortField)
Find all the epeople that match a particular query ID
LASTNAME
EMAIL
NETID
|
static EPerson |
findByEmail(Context context,
String email)
Find the eperson by their email address. |
static EPerson |
findByNetid(Context context,
String netid)
Find the eperson by their netid. |
List<String> |
getDeleteConstraints()
Check for presence of EPerson in tables that have constraints on EPersons. |
String |
getEmail()
Get the e-person's email address |
String |
getFirstName()
Get the eperson's first name. |
String |
getFullName()
Get the e-person's full name, combining first and last name in a displayable string. |
String |
getHandle()
Get the e-person's handle |
int |
getID()
Get the e-person's internal identifier |
String |
getLanguage()
Get the e-person's language |
String |
getLastName()
Get the eperson's last name. |
String |
getMetadata(String field)
Get the value of a metadata field |
String |
getName()
Get a proper name for the object. |
String |
getNetid()
Get the e-person's netid |
PasswordHash |
getPasswordHash()
Return the EPerson's password hash. |
boolean |
getRequireCertificate()
Get require certificate or not |
boolean |
getSelfRegistered()
Can the user log in? |
int |
getType()
return type found in Constants |
int |
hashCode()
Return a hash code for this object. |
static EPerson[] |
search(Context context,
String query)
Find the epeople that match the search query across firstname, lastname or email. |
static EPerson[] |
search(Context context,
String query,
int offset,
int limit)
Find the epeople that match the search query across firstname, lastname or email. |
static int |
searchResultCount(Context context,
String query)
Returns the total number of epeople returned by a specific query, without the overhead of creating the EPerson objects to store the results. |
void |
setCanLogIn(boolean login)
Indicate whether the user can log in |
void |
setEmail(String s)
Set the EPerson's email |
void |
setFirstName(String firstname)
Set the eperson's first name |
void |
setLanguage(String language)
Set the EPerson's language. |
void |
setLastName(String lastname)
Set the eperson's last name |
void |
setMetadata(String field,
String value)
Set a metadata value |
void |
setNetid(String s)
Set the EPerson's netid |
void |
setPassword(String s)
Set the EPerson's password. |
void |
setPasswordHash(PasswordHash password)
Set the EPerson's password hash. |
void |
setRequireCertificate(boolean isrequired)
Set require cert yes/no |
void |
setSelfRegistered(boolean sr)
Indicate whether the user self-registered |
void |
update()
Update the EPerson |
void |
updateLastModified()
|
| Methods inherited from class org.dspace.content.DSpaceObject |
|---|
addDetails, clearDetails, find, getAdminObject, getDetails, getParentObject, getTypeText |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EMAIL
public static final int LASTNAME
public static final int ID
public static final int NETID
public static final int LANGUAGE
| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Objectobj -
public int hashCode()
hashCode in class Object
public static EPerson find(Context context,
int id)
throws SQLException
context - DSpace context objectid - ID of the EPerson
SQLException
public static EPerson findByEmail(Context context,
String email)
throws SQLException,
AuthorizeException
null if none such exists.
SQLException
AuthorizeException
public static EPerson findByNetid(Context context,
String netid)
throws SQLException
context - DSpace contextnetid - Network ID
null
SQLException
public static EPerson[] search(Context context,
String query)
throws SQLException
context - DSpace contextquery - The search string
SQLException
public static EPerson[] search(Context context,
String query,
int offset,
int limit)
throws SQLException
context - DSpace contextquery - The search stringoffset - Inclusive offsetlimit - Maximum number of matches returned
SQLException
public static int searchResultCount(Context context,
String query)
throws SQLException
context - DSpace contextquery - The search string
SQLException
public static EPerson[] findAll(Context context,
int sortField)
throws SQLException
IDLASTNAMEEMAILNETID
SQLException
public static EPerson create(Context context)
throws SQLException,
AuthorizeException
context - DSpace context object
SQLException
AuthorizeException
public void delete()
throws SQLException,
AuthorizeException,
EPersonDeletionException
SQLException
AuthorizeException
EPersonDeletionExceptionpublic int getID()
getID in class DSpaceObjectpublic String getLanguage()
public void setLanguage(String language)
language - language codepublic String getHandle()
getHandle in class DSpaceObjectpublic String getEmail()
public void setEmail(String s)
s - the new emailpublic String getNetid()
public void setNetid(String s)
s - the new netidpublic String getFullName()
public String getFirstName()
public void setFirstName(String firstname)
firstname - the person's first namepublic String getLastName()
public void setLastName(String lastname)
lastname - the person's last namepublic void setCanLogIn(boolean login)
login - boolean yes/nopublic boolean canLogIn()
public void setRequireCertificate(boolean isrequired)
isrequired - boolean yes/nopublic boolean getRequireCertificate()
public void setSelfRegistered(boolean sr)
sr - boolean yes/nopublic boolean getSelfRegistered()
public String getMetadata(String field)
field - the name of the metadata field to get
IllegalArgumentException - if the requested metadata field doesn't exist
public void setMetadata(String field,
String value)
field - the name of the metadata field to setvalue - value to set the field to
IllegalArgumentException - if the requested metadata field doesn't existpublic void setPassword(String s)
s - the new password.public void setPasswordHash(PasswordHash password)
password - hashed password, or null to set row data to NULL.public PasswordHash getPasswordHash()
public boolean checkPassword(String attempt)
attempt - the password attempt
public void update()
throws SQLException,
AuthorizeException
update in class DSpaceObjectSQLException
AuthorizeExceptionpublic int getType()
getType in class DSpaceObject
public List<String> getDeleteConstraints()
throws SQLException
SQLExceptionpublic String getName()
DSpaceObjectnull.
Name should be suitable for display in a user interface.
getName in class DSpaceObjectnull if it doesn't have
onepublic void updateLastModified()
updateLastModified in class DSpaceObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||