public class ApprovalServiceProviderImplementation extends java.lang.Object implements ApprovalServiceProvider
ApprovalServiceProvider for the storage back end.| Constructor and Description |
|---|
ApprovalServiceProviderImplementation() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(java.lang.String ticket,
int reviewerID)
Accept a
PublicReference and publish to public. |
void |
acceptTicketByUser(java.lang.String ticket,
int reviewerHashCode)
Accept an open ticket by the user who requested the data publication to
get a final persistent ID
|
void |
approve(PublicReference reference,
javax.mail.internet.InternetAddress emailNotificationAddress)
Initialize a request to approve a
PublicReference. |
void |
checkOpenReviews(java.util.Map<PublicReference,java.util.List<ReviewStatus>> results)
|
java.util.Map<PublicReference,java.util.List<ReviewStatus>> |
getAllOpenReviews()
Load all open
PublicReferences that are not yet accepted or
rejected. |
java.lang.String |
getNewURL(PublicReference reference)
|
PublicReference |
getPublicReferenceByInternalId(java.lang.String internalId)
Get a
PublicReference object by the internal UUID for
generating HTML template |
void |
reject(java.lang.String ticket,
int reviewerID)
Reject a
PublicReference. |
void |
rejectTicketByUser(java.lang.String ticket,
int reviewerHashCode)
Reject an open ticket by the user who requested to discard the process
and not getting a persistent ID
|
java.lang.String |
storePersistentID(PublicReference reference,
java.lang.String doi,
int year)
Store the generated
DataCiteReference in to the eDAL system. |
public ApprovalServiceProviderImplementation()
public void accept(java.lang.String ticket,
int reviewerID)
throws EdalApprovalException
PublicReference and publish to public.accept in interface ApprovalServiceProviderticket - the ticket number to identify the approved
PublicReference.reviewerID - the ID to identify the reviewer.EdalApprovalException - if unable to accept the ticket.public void acceptTicketByUser(java.lang.String ticket,
int reviewerHashCode)
throws EdalApprovalException
ApprovalServiceProvideracceptTicketByUser in interface ApprovalServiceProviderticket - the ticket of the open requestreviewerHashCode - the id of the reviewerEdalApprovalException - if unable to accept the requestpublic void approve(PublicReference reference, javax.mail.internet.InternetAddress emailNotificationAddress) throws EdalApprovalException
PublicReference.approve in interface ApprovalServiceProviderreference - the PublicReference to approve.emailNotificationAddress - the eMail address of the requesting userEdalApprovalException - if unable to initialize the approval request.public void checkOpenReviews(java.util.Map<PublicReference,java.util.List<ReviewStatus>> results) throws EdalApprovalException
checkOpenReviews in interface ApprovalServiceProviderresults - a Map with all open PublicReferences and their
ReviewStatus.EdalApprovalException - if unable to check open review processes.public java.util.Map<PublicReference,java.util.List<ReviewStatus>> getAllOpenReviews()
PublicReferences that are not yet accepted or
rejected.getAllOpenReviews in interface ApprovalServiceProviderMap with all open PublicReferences and the
corresponding List with the ReviewStatus.public java.lang.String getNewURL(PublicReference reference) throws EdalApprovalException
ApprovalServiceProvidergetNewURL in interface ApprovalServiceProviderreference - the PublicReference to get a URLStringEdalApprovalException - if unable to get a URLpublic PublicReference getPublicReferenceByInternalId(java.lang.String internalId) throws EdalException
ApprovalServiceProviderPublicReference object by the internal UUID for
generating HTML templategetPublicReferenceByInternalId in interface ApprovalServiceProviderinternalId - as StringPublicReferenceEdalException - if unable get PublicReferencepublic void reject(java.lang.String ticket,
int reviewerID)
throws EdalApprovalException
PublicReference.reject in interface ApprovalServiceProviderticket - the ticket number to identify the rejected
PublicReference.reviewerID - the ID to identify the reviewer.EdalApprovalException - if unable to reject the ticket.public void rejectTicketByUser(java.lang.String ticket,
int reviewerHashCode)
throws EdalApprovalException
ApprovalServiceProviderrejectTicketByUser in interface ApprovalServiceProviderticket - the ticket of the open requestreviewerHashCode - the id of the reviewerEdalApprovalException - if unable to accept the requestpublic java.lang.String storePersistentID(PublicReference reference, java.lang.String doi, int year) throws EdalApprovalException
ApprovalServiceProviderDataCiteReference in to the eDAL system.storePersistentID in interface ApprovalServiceProviderreference - the corresponding PublicReferencedoi - the ID as Stringyear - the year of the IDStringEdalApprovalException - if unable to store the ID