public class EPersonServiceImpl extends DSpaceObjectServiceImpl<EPerson> implements EPersonService
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected EPersonDAO |
ePersonDAO |
protected ItemService |
itemService |
protected SubscribeService |
subscribeService |
choiceAuthorityService, handleService, metadataAuthorityService, metadataFieldService, metadataValueService| Modifier | Constructor and Description |
|---|---|
protected |
EPersonServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkPassword(Context context,
EPerson ePerson,
String attempt)
Check EPerson's password.
|
int |
countTotal(Context context) |
EPerson |
create(Context context)
Create a new eperson
|
void |
delete(Context context,
EPerson ePerson) |
EPerson |
find(Context context,
UUID id)
Generic find for when the precise type of a DSO is not known, just the
a pair of type number and database ID.
|
List<EPerson> |
findAll(Context context,
int sortField)
Find all the epeople that match a particular query
ID
LASTNAME
EMAIL
NETID
|
EPerson |
findByEmail(Context context,
String email)
Find the eperson by their email address.
|
List<EPerson> |
findByGroups(Context c,
Set<Group> groups) |
EPerson |
findByIdOrLegacyId(Context context,
String id) |
EPerson |
findByLegacyId(Context context,
int legacyId)
Generic find for when the precise type of a DSO is not known, just the
a pair of type number and database ID.
|
EPerson |
findByNetid(Context context,
String netId)
Find the eperson by their netid.
|
List<EPerson> |
findEPeopleWithSubscription(Context context) |
List<EPerson> |
findNotActiveSince(Context context,
Date date) |
List<EPerson> |
findUnsalted(Context context)
Retrieve all accounts which have a password but do not have a digest algorithm
|
List<String> |
getDeleteConstraints(Context context,
EPerson ePerson)
Check for presence of EPerson in tables that have constraints on
EPersons.
|
String |
getMetadata(EPerson dso,
String field)
Get the value of a metadata field
|
PasswordHash |
getPasswordHash(EPerson ePerson)
Return the EPerson's password hash.
|
int |
getSupportsTypeConstant()
Returns the Constants which this service supports
|
List<EPerson> |
search(Context context,
String query)
Find the epeople that match the search query across firstname, lastname or email.
|
List<EPerson> |
search(Context context,
String query,
int offset,
int limit)
Find the epeople that match the search query across firstname, lastname or email.
|
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 |
setMetadata(Context context,
EPerson ePerson,
String field,
String value)
Set a metadata value
|
void |
setPassword(EPerson ePerson,
String password)
Set the EPerson's password.
|
void |
setPasswordHash(EPerson ePerson,
PasswordHash password)
Set the EPerson's password hash.
|
void |
update(Context context,
EPerson ePerson) |
void |
updateLastModified(Context context,
EPerson dso) |
addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, clearMetadata, getAdminObject, getAuthoritiesAndConfidences, getElements, getElementsFilled, getIdentifiers, getMDValueByField, getMDValueByLegacyField, getMetadata, getMetadata, getMetadata, getMetadataByMetadataString, getMetadataFirstValue, getMetadataValuePlace, getName, getParentObject, getTypeText, match, removeMetadataValues, setMetadataSingleValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, addMetadata, clearMetadata, getAdminObject, getIdentifiers, getMetadata, getMetadata, getMetadata, getMetadataByMetadataString, getMetadataFirstValue, getName, getParentObject, getTypeText, removeMetadataValues, setMetadataSingleValue@Autowired(required=true) protected EPersonDAO ePersonDAO
@Autowired(required=true) protected AuthorizeService authorizeService
@Autowired(required=true) protected ItemService itemService
@Autowired(required=true) protected SubscribeService subscribeService
public EPerson find(Context context, UUID id) throws SQLException
DSpaceObjectServicefind in interface DSpaceObjectService<EPerson>context - - the contextid - - id within table of type'd objectsSQLException - only upon failure accessing the database.public EPerson findByIdOrLegacyId(Context context, String id) throws SQLException
findByIdOrLegacyId in interface DSpaceObjectLegacySupportService<EPerson>SQLExceptionpublic EPerson findByLegacyId(Context context, int legacyId) throws SQLException
DSpaceObjectLegacySupportServicefindByLegacyId in interface DSpaceObjectLegacySupportService<EPerson>context - - the contextlegacyId - - the legacy id within table of type'd objectsSQLException - only upon failure accessing the database.public EPerson findByEmail(Context context, String email) throws SQLException
EPersonServicefindByEmail in interface EPersonServicenull if none such exists.SQLExceptionpublic EPerson findByNetid(Context context, String netId) throws SQLException
EPersonServicefindByNetid in interface EPersonServicecontext - DSpace contextnetId - Network IDnullSQLExceptionpublic List<EPerson> search(Context context, String query) throws SQLException
EPersonServicesearch in interface EPersonServicecontext - DSpace contextquery - The search stringSQLExceptionpublic List<EPerson> search(Context context, String query, int offset, int limit) throws SQLException
EPersonServicesearch in interface EPersonServicecontext - DSpace contextquery - The search stringoffset - Inclusive offsetlimit - Maximum number of matches returnedSQLExceptionpublic int searchResultCount(Context context, String query) throws SQLException
EPersonServicesearchResultCount in interface EPersonServicecontext - DSpace contextquery - The search stringSQLExceptionpublic List<EPerson> findAll(Context context, int sortField) throws SQLException
EPersonServiceIDLASTNAMEEMAILNETIDfindAll in interface EPersonServiceSQLExceptionpublic EPerson create(Context context) throws SQLException, AuthorizeException
EPersonServicecreate in interface EPersonServicecontext - DSpace context objectSQLExceptionAuthorizeExceptionpublic void delete(Context context, EPerson ePerson) throws SQLException, AuthorizeException
delete in interface DSpaceObjectService<EPerson>SQLExceptionAuthorizeExceptionpublic int getSupportsTypeConstant()
DSpaceObjectServicegetSupportsTypeConstant in interface DSpaceObjectLegacySupportService<EPerson>getSupportsTypeConstant in interface DSpaceObjectService<EPerson>public void setPassword(EPerson ePerson, String password)
EPersonServicesetPassword in interface EPersonServicepassword - the new password.public void setPasswordHash(EPerson ePerson, PasswordHash password)
EPersonServicesetPasswordHash in interface EPersonServicepassword - hashed password, or null to set row data to NULL.public PasswordHash getPasswordHash(EPerson ePerson)
EPersonServicegetPasswordHash in interface EPersonServicepublic boolean checkPassword(Context context, EPerson ePerson, String attempt)
EPersonServicecheckPassword in interface EPersonServiceattempt - the password attemptpublic void update(Context context, EPerson ePerson) throws SQLException, AuthorizeException
update in interface DSpaceObjectService<EPerson>update in class DSpaceObjectServiceImpl<EPerson>SQLExceptionAuthorizeExceptionpublic List<String> getDeleteConstraints(Context context, EPerson ePerson) throws SQLException
EPersonServicegetDeleteConstraints in interface EPersonServiceSQLExceptionpublic List<EPerson> findByGroups(Context c, Set<Group> groups) throws SQLException
findByGroups in interface EPersonServiceSQLExceptionpublic List<EPerson> findEPeopleWithSubscription(Context context) throws SQLException
findEPeopleWithSubscription in interface EPersonServiceSQLExceptionpublic void updateLastModified(Context context, EPerson dso) throws SQLException
updateLastModified in interface DSpaceObjectService<EPerson>SQLExceptionpublic String getMetadata(EPerson dso, String field)
DSpaceObjectServicegetMetadata in interface DSpaceObjectService<EPerson>getMetadata in class DSpaceObjectServiceImpl<EPerson>dso - DSpaceObjectfield - the name of the metadata field to getpublic void setMetadata(Context context, EPerson ePerson, String field, String value) throws SQLException
EPersonServicesetMetadata in interface EPersonServicefield - the name of the metadata field to setvalue - value to set the field toSQLExceptionpublic List<EPerson> findUnsalted(Context context) throws SQLException
EPersonServicefindUnsalted in interface EPersonServicecontext - the dspace contextSQLExceptionpublic List<EPerson> findNotActiveSince(Context context, Date date) throws SQLException
findNotActiveSince in interface EPersonServiceSQLExceptionpublic int countTotal(Context context) throws SQLException
countTotal in interface EPersonServiceSQLExceptionCopyright © 2022 LYRASIS. All rights reserved.