Package org.dspace.profile.service
Interface ResearcherProfileService
-
- All Known Implementing Classes:
ResearcherProfileServiceImpl
public interface ResearcherProfileServiceService interface class for theResearcherProfileobject. The implementation of this class is responsible for all business logic calls for theResearcherProfileobject.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
findById
ResearcherProfile findById(Context context, UUID id) throws SQLException, AuthorizeException
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
void deleteById(Context context, UUID id) throws SQLException, AuthorizeException
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 visiblity 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
boolean hasProfileType(Item item)
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
-
-