Interface ApprovalServiceProvider
-
- All Known Implementing Classes:
ApprovalServiceProviderImplementation
public interface ApprovalServiceProviderProvide the implementation for the ApprovalService to get a persistent identifier.
-
-
Method Summary
Modifier and Type Method Description voidaccept(java.lang.String ticket, int reviewerId)Accept aPublicReferenceand publish to public.voidacceptTicketByUser(java.lang.String ticket, int reviewerId)Accept an open ticket by the user who requested the data publication to get a final persistent IDvoidapprove(PublicReference reference, javax.mail.internet.InternetAddress emailNotificationAddress)Initialize a request to approve aPublicReference.voidcheckOpenReviews(java.util.Map<PublicReference,java.util.List<ReviewStatus>> results)java.util.Map<PublicReference,java.util.List<ReviewStatus>>getAllOpenReviews()Load all openPublicReferences that are not yet accepted or rejected.java.lang.StringgetNewURL(PublicReference reference)PublicReferencegetPublicReferenceByInternalId(java.lang.String internalId)Get aPublicReferenceobject by the internalUUIDfor generating HTML templatevoidreject(java.lang.String ticket, int reviewerId)Reject aPublicReference.voidrejectTicketByUser(java.lang.String ticket, int reviewerId)Reject an open ticket by the user who requested to discard the process and not getting a persistent IDjava.lang.StringstorePersistentID(PublicReference reference, java.lang.String id, int year)Store the generatedDataCiteReferencein to the eDAL system.
-
-
-
Method Detail
-
accept
void accept(java.lang.String ticket, int reviewerId) throws EdalApprovalExceptionAccept aPublicReferenceand publish to public.- Parameters:
ticket- the ticket number to identify the approvedPublicReference.reviewerId- the ID to identify the reviewer.- Throws:
EdalApprovalException- if unable to accept the ticket.
-
approve
void approve(PublicReference reference, javax.mail.internet.InternetAddress emailNotificationAddress) throws EdalApprovalException
Initialize a request to approve aPublicReference.- Parameters:
reference- thePublicReferenceto approve.emailNotificationAddress- the eMail address of the requesting user- Throws:
EdalApprovalException- if unable to initialize the approval request.
-
reject
void reject(java.lang.String ticket, int reviewerId) throws EdalApprovalExceptionReject aPublicReference.- Parameters:
ticket- the ticket number to identify the rejectedPublicReference.reviewerId- the ID to identify the reviewer.- Throws:
EdalApprovalException- if unable to reject the ticket.
-
getAllOpenReviews
java.util.Map<PublicReference,java.util.List<ReviewStatus>> getAllOpenReviews()
Load all openPublicReferences that are not yet accepted or rejected.- Returns:
- a
Mapwith all openPublicReferences and the correspondingListwith theReviewStatus.
-
checkOpenReviews
void checkOpenReviews(java.util.Map<PublicReference,java.util.List<ReviewStatus>> results) throws EdalApprovalException
- Parameters:
results- aMapwith all openPublicReferences and theirReviewStatus.- Throws:
EdalApprovalException- if unable to check open review processes.
-
getNewURL
java.lang.String getNewURL(PublicReference reference) throws EdalApprovalException
- Parameters:
reference- thePublicReferenceto get aURL- Returns:
- a new URL as
String - Throws:
EdalApprovalException- if unable to get aURL
-
storePersistentID
java.lang.String storePersistentID(PublicReference reference, java.lang.String id, int year) throws EdalApprovalException
Store the generatedDataCiteReferencein to the eDAL system.- Parameters:
reference- the correspondingPublicReferenceid- the ID asStringyear- the year of the ID- Returns:
- the final ID as
String - Throws:
EdalApprovalException- if unable to store the ID
-
getPublicReferenceByInternalId
PublicReference getPublicReferenceByInternalId(java.lang.String internalId) throws EdalException
Get aPublicReferenceobject by the internalUUIDfor generating HTML template- Parameters:
internalId- asString- Returns:
- the corresponding
PublicReference - Throws:
EdalException- if unable getPublicReference
-
acceptTicketByUser
void acceptTicketByUser(java.lang.String ticket, int reviewerId) throws EdalApprovalExceptionAccept an open ticket by the user who requested the data publication to get a final persistent ID- Parameters:
ticket- the ticket of the open requestreviewerId- the id of the reviewer- Throws:
EdalApprovalException- if unable to accept the request
-
rejectTicketByUser
void rejectTicketByUser(java.lang.String ticket, int reviewerId) throws EdalApprovalExceptionReject an open ticket by the user who requested to discard the process and not getting a persistent ID- Parameters:
ticket- the ticket of the open requestreviewerId- the id of the reviewer- Throws:
EdalApprovalException- if unable to accept the request
-
-