Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lifecycle states and events description #310

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"),

Check warning on line 12 in src/main/java/eu/bbmri_eric/negotiator/configuration/state_machine/resource/NegotiationResourceEvent.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/eu/bbmri_eric/negotiator/configuration/state_machine/resource/NegotiationResourceEvent.java#L7-L12

Added lines #L7 - L12 were not covered by tests
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"),

Check warning on line 16 in src/main/java/eu/bbmri_eric/negotiator/configuration/state_machine/resource/NegotiationResourceEvent.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/eu/bbmri_eric/negotiator/configuration/state_machine/resource/NegotiationResourceEvent.java#L16

Added line #L16 was not covered by tests
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 @@
links.add(
linkTo(methodOn(ResourceLifecycleController.class).getState(entity.getValue()))
.withSelfRel());
return EntityModel.of(entity);
return EntityModel.of(entity, links);

Check warning on line 29 in src/main/java/eu/bbmri_eric/negotiator/mappers/ResourceStateAssembler.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/eu/bbmri_eric/negotiator/mappers/ResourceStateAssembler.java#L29

Added line #L29 was not covered by tests
}

@Override
Expand Down
Loading