Skip to content

Commit

Permalink
Merge pull request #310 from BBMRI-ERIC/fix/lifecycle
Browse files Browse the repository at this point in the history
fix: lifecycle states and events description
  • Loading branch information
RadovanTomik committed May 3, 2024
2 parents 824666e + 262a24c commit c760e7a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

@Getter
public enum NegotiationState {
SUBMITTED("Under review", "The negotiation has been submitted for review."),
APPROVED("Approved", "The negotiation has been approved."),
DECLINED("Declined", "The negotiation has been declined."),
IN_PROGRESS("In Progress", "The negotiation is currently in progress."),
PAUSED("Paused", "The negotiation is paused."),
CONCLUDED("Concluded", "The negotiation has been concluded."),
ABANDONED("Abandoned", "The negotiation has been abandoned.");
SUBMITTED("Under review", "The negotiation has been submitted for review"),
APPROVED("Approved", "The negotiation has been approved"),
DECLINED("Declined", "The negotiation has been declined"),
IN_PROGRESS("In Progress", "The negotiation is currently in progress"),
PAUSED("Paused", "The negotiation is paused"),
CONCLUDED("Concluded", "The negotiation has been concluded"),
ABANDONED("Abandoned", "The negotiation has been abandoned");

private final String label;
private final String description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@

@Getter
public enum NegotiationResourceEvent {
CONTACT("Contact", "Contact the representative"),
MARK_AS_UNREACHABLE("Mark as Unreachable", "Mark the representative as unreachable"),
RETURN_FOR_RESUBMISSION("Return for Resubmission", "Return the resource for resubmission"),
MARK_AS_CHECKING_AVAILABILITY(
"Mark as Checking Availability", "Mark the resource as checking availability"),
MARK_AS_AVAILABLE("Mark as Available", "Mark the resource as available"),
MARK_AS_UNAVAILABLE("Mark as Unavailable", "Mark the resource as unavailable"),
CONTACT("Contact", "Contact representatives"),
MARK_AS_UNREACHABLE("Mark as Unreachable", "Mark representatives as unreachable"),
RETURN_FOR_RESUBMISSION("Return for Resubmission", "Ask for further clarification"),
MARK_AS_CHECKING_AVAILABILITY("Mark as Checking Availability", "Mark as checking availability"),
MARK_AS_AVAILABLE("Mark as Available", "Mark the resource as available for access"),
MARK_AS_UNAVAILABLE("Mark as Unavailable", "Mark the resource as unavailable for access"),
MARK_AS_CURRENTLY_UNAVAILABLE_BUT_WILLING_TO_COLLECT(
"Mark as Currently Unavailable, But Willing to Collect",
"Mark the resource as currently unavailable, but willing to collect"),
STEP_AWAY("Step Away", "Step away from negotiation"),
STEP_AWAY("Step Away", "Step away. Not interested in collaboration"),
INDICATE_ACCESS_CONDITIONS(
"Indicate Access Conditions", "Indicate access conditions for the resource"),
ACCEPT_ACCESS_CONDITIONS("Accept Access Conditions", "Accept access conditions for the resource"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@

@Getter
public enum NegotiationResourceState {
SUBMITTED("Submitted", "The resource has been submitted"),
SUBMITTED("Submitted", "Initial state"),
REPRESENTATIVE_CONTACTED(
"Representative Contacted", "Contact has been made with the representative"),
REPRESENTATIVE_UNREACHABLE("Representative Unreachable", "Unable to reach the representative"),
"Representative Contacted",
"Representative of the given resource was notified about this new request"),
REPRESENTATIVE_UNREACHABLE(
"Representative Unreachable",
"This resource does not have any representatives in the system"),
RETURNED_FOR_RESUBMISSION(
"Returned for Resubmission", "The resource has been returned for resubmission"),
"Returned for Resubmission",
"A representative has asked for further clarification of the request"),
CHECKING_AVAILABILITY("Checking Availability", "Currently checking availability of the resource"),
RESOURCE_AVAILABLE("Resource Available", "The resource is available"),
RESOURCE_AVAILABLE("Resource Available", "The resource is available for access"),
RESOURCE_UNAVAILABLE_WILLING_TO_COLLECT(
"Resource Unavailable, Willing to Collect",
"The resource is unavailable but willing to be collected"),
RESOURCE_UNAVAILABLE("Resource Unavailable", "The resource is unavailable"),
"The resource is unavailable at this time, but the organization is willing to collect it and make it available for access"),
RESOURCE_UNAVAILABLE("Resource Unavailable", "The resource is unavailable for access"),
ACCESS_CONDITIONS_INDICATED(
"Access Conditions Indicated", "Indicated access conditions for the resource"),
"Access Conditions Indicated",
"A representative has indicated access conditions for the resource"),
ACCESS_CONDITIONS_MET(
"Access Conditions Met", "Access conditions for the resource have been met"),
"Access Conditions Met", "Access conditions for the resource have been met by the requester"),
RESOURCE_NOT_MADE_AVAILABLE(
"Resource Not Made Available", "The resource has not been made available"),
RESOURCE_MADE_AVAILABLE("Resource Made Available", "The resource has been made available");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ResourceStateAssembler
links.add(
linkTo(methodOn(ResourceLifecycleController.class).getState(entity.getValue()))
.withSelfRel());
return EntityModel.of(entity);
return EntityModel.of(entity, links);
}

@Override
Expand Down

0 comments on commit c760e7a

Please sign in to comment.