Interface ApprovalServiceProvider
-
- All Known Implementing Classes:
ApprovalServiceProviderImplementation
public interface ApprovalServiceProvider
Provide the implementation for the ApprovalService to get a persistent identifier.
-
-
Method Summary
Modifier and Type Method Description void
accept(java.lang.String ticket, int reviewerId)
Accept aPublicReference
and publish to public.void
acceptTicketByUser(java.lang.String ticket, int reviewerId)
Accept an open ticket by the user who requested the data publication to get a final persistent IDvoid
approve(PublicReference reference, javax.mail.internet.InternetAddress emailNotificationAddress)
Initialize a request to approve aPublicReference
.void
checkOpenReviews(java.util.Map<PublicReference,java.util.List<ReviewStatus>> results)
java.util.Map<PublicReference,java.util.List<ReviewStatus>>
getAllOpenReviews()
Load all openPublicReference
s that are not yet accepted or rejected.java.lang.String
getNewURL(PublicReference reference)
PublicReference
getPublicReferenceByInternalId(java.lang.String internalId)
Get aPublicReference
object by the internalUUID
for generating HTML templatevoid
reject(java.lang.String ticket, int reviewerId)
Reject aPublicReference
.void
rejectTicketByUser(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.String
storePersistentID(PublicReference reference, java.lang.String id, int year)
Store the generatedDataCiteReference
in to the eDAL system.
-
-
-
Method Detail
-
accept
void accept(java.lang.String ticket, int reviewerId) throws EdalApprovalException
Accept aPublicReference
and 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
- thePublicReference
to 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 EdalApprovalException
Reject 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 openPublicReference
s that are not yet accepted or rejected.- Returns:
- a
Map
with all openPublicReference
s and the correspondingList
with theReviewStatus
.
-
checkOpenReviews
void checkOpenReviews(java.util.Map<PublicReference,java.util.List<ReviewStatus>> results) throws EdalApprovalException
- Parameters:
results
- aMap
with all openPublicReference
s and theirReviewStatus
.- Throws:
EdalApprovalException
- if unable to check open review processes.
-
getNewURL
java.lang.String getNewURL(PublicReference reference) throws EdalApprovalException
- Parameters:
reference
- thePublicReference
to 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 generatedDataCiteReference
in to the eDAL system.- Parameters:
reference
- the correspondingPublicReference
id
- the ID asString
year
- 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 aPublicReference
object by the internalUUID
for 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 EdalApprovalException
Accept 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 EdalApprovalException
Reject 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
-
-