Package org.dspace.profile
Class ResearcherProfileServiceImpl
- java.lang.Object
-
- org.dspace.profile.ResearcherProfileServiceImpl
-
- All Implemented Interfaces:
ResearcherProfileService
public class ResearcherProfileServiceImpl extends Object implements ResearcherProfileService
Implementation ofResearcherProfileService.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description ResearcherProfileServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchangeVisibility(Context context, ResearcherProfile profile, boolean visible)Changes the visibility of the given profile using the given new visible value.ResearcherProfileclaim(Context context, EPerson ePerson, URI uri)Claims and links an eperson to an existing DSpaceObjectResearcherProfilecreateAndReturn(Context context, EPerson ePerson)Create a new researcher profile for the given ePerson.voiddeleteById(Context context, UUID id)Delete the profile with the given id.ResearcherProfilefindById(Context context, UUID id)Find the ResearcherProfile by UUID.StringgetProfileType()Returns the profile entity type, if any.booleanhasProfileType(Item item)Check if the given item has an entity type compatible with that of the researcher profile.voidpostConstruct()
-
-
-
Method Detail
-
postConstruct
@PostConstruct public void postConstruct()
-
findById
public ResearcherProfile findById(Context context, UUID id) throws SQLException, AuthorizeException
Description copied from interface:ResearcherProfileServiceFind the ResearcherProfile by UUID.- Specified by:
findByIdin interfaceResearcherProfileService- Parameters:
context- the relevant DSpace Context.id- the ResearcherProfile id- Returns:
- the found ResearcherProfile
- Throws:
SQLExceptionAuthorizeException
-
createAndReturn
public ResearcherProfile createAndReturn(Context context, EPerson ePerson) throws AuthorizeException, SQLException, SearchServiceException
Description copied from interface:ResearcherProfileServiceCreate a new researcher profile for the given ePerson.- Specified by:
createAndReturnin interfaceResearcherProfileService- Parameters:
context- the relevant DSpace Context.ePerson- the ePerson- Returns:
- the created profile
- Throws:
AuthorizeExceptionSQLExceptionSearchServiceException
-
deleteById
public void deleteById(Context context, UUID id) throws SQLException, AuthorizeException
Description copied from interface:ResearcherProfileServiceDelete the profile with the given id. Based on the researcher-profile.hard-delete.enabled configuration, this method deletes the related item or removes the association between the researcher profile and eperson related to the input uuid.- Specified by:
deleteByIdin interfaceResearcherProfileService- Parameters:
context- the relevant DSpace Context.id- the researcher profile id- Throws:
SQLExceptionAuthorizeException
-
changeVisibility
public void changeVisibility(Context context, ResearcherProfile profile, boolean visible) throws AuthorizeException, SQLException
Description copied from interface:ResearcherProfileServiceChanges the visibility of the given profile using the given new visible value. The visiblity controls whether the Profile is Anonymous READ or not.- Specified by:
changeVisibilityin interfaceResearcherProfileService- Parameters:
context- the relevant DSpace Context.profile- the researcher profile to updatevisible- the visible value to set. If true the profile will be visible to all users.- Throws:
AuthorizeExceptionSQLException
-
claim
public ResearcherProfile claim(Context context, EPerson ePerson, URI uri) throws SQLException, AuthorizeException, SearchServiceException
Description copied from interface:ResearcherProfileServiceClaims and links an eperson to an existing DSpaceObject- Specified by:
claimin interfaceResearcherProfileService- Parameters:
context- the relevant DSpace Context.ePerson- the ePersonuri- uri of existing Item to be linked to the eperson- Returns:
- the created profile
- Throws:
SQLExceptionAuthorizeExceptionSearchServiceException
-
hasProfileType
public boolean hasProfileType(Item item)
Description copied from interface:ResearcherProfileServiceCheck if the given item has an entity type compatible with that of the researcher profile. If the given item does not have an entity type, the check returns false.- Specified by:
hasProfileTypein interfaceResearcherProfileService- Parameters:
item- the item to check- Returns:
- the check result
-
getProfileType
public String getProfileType()
Description copied from interface:ResearcherProfileServiceReturns the profile entity type, if any.- Specified by:
getProfileTypein interfaceResearcherProfileService- Returns:
- the profile type
-
-