Package org.dspace.profile
Class ResearcherProfileServiceImpl
java.lang.Object
org.dspace.profile.ResearcherProfileServiceImpl
- All Implemented Interfaces:
ResearcherProfileService
Implementation of
ResearcherProfileService.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeVisibility(Context context, ResearcherProfile profile, boolean visible) Changes the visibility of the given profile using the given new visible value.Claims and links an eperson to an existing DSpaceObjectcreateAndReturn(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.Find the ResearcherProfile by UUID.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.void
-
Constructor Details
-
ResearcherProfileServiceImpl
public ResearcherProfileServiceImpl()
-
-
Method Details
-
postConstruct
@PostConstruct public void postConstruct() -
findById
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
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 visibility 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
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
Description copied from interface:ResearcherProfileServiceReturns the profile entity type, if any.- Specified by:
getProfileTypein interfaceResearcherProfileService- Returns:
- the profile type
-