Package org.dspace.profile.service
Interface ResearcherProfileService
- All Known Implementing Classes:
ResearcherProfileServiceImpl
public interface ResearcherProfileService
Service interface class for the
ResearcherProfile object. The
implementation of this class is responsible for all business logic calls for
the ResearcherProfile object.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
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.
-
Method Details
-
findById
Find the ResearcherProfile by UUID.- Parameters:
context- the relevant DSpace Context.id- the ResearcherProfile id- Returns:
- the found ResearcherProfile
- Throws:
SQLExceptionAuthorizeException
-
createAndReturn
ResearcherProfile createAndReturn(Context context, EPerson ePerson) throws AuthorizeException, SQLException, SearchServiceException Create a new researcher profile for the given ePerson.- Parameters:
context- the relevant DSpace Context.ePerson- the ePerson- Returns:
- the created profile
- Throws:
SQLExceptionAuthorizeExceptionSearchServiceException
-
deleteById
Delete 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.- Parameters:
context- the relevant DSpace Context.id- the researcher profile id- Throws:
AuthorizeExceptionSQLException
-
changeVisibility
void changeVisibility(Context context, ResearcherProfile profile, boolean visible) throws AuthorizeException, SQLException Changes the visibility of the given profile using the given new visible value. The visibility controls whether the Profile is Anonymous READ or not.- 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:
SQLExceptionAuthorizeException
-
claim
ResearcherProfile claim(Context context, EPerson ePerson, URI uri) throws SQLException, AuthorizeException, SearchServiceException Claims and links an eperson to an existing DSpaceObject- Parameters:
context- the relevant DSpace Context.ePerson- the ePersonuri- uri of existing Item to be linked to the eperson- Returns:
- the created profile
- Throws:
IllegalArgumentException- if the given uri is not related to an archived item or if the item cannot be claimedSQLExceptionAuthorizeExceptionSearchServiceException
-
hasProfileType
Check 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.- Parameters:
item- the item to check- Returns:
- the check result
-
getProfileType
String getProfileType()Returns the profile entity type, if any.- Returns:
- the profile type
-