Package org.forgerock.api.models
Class Action
java.lang.Object
org.forgerock.api.models.Operation
org.forgerock.api.models.Action
- All Implemented Interfaces:
Comparable<Action>
Class that represents the Action operation type in API descriptor.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for creating the Action. -
Method Summary
Modifier and TypeMethodDescriptionstatic Action.Builderaction()Creates a new builder for Action.protected voidallocateToResource(Resource.Builder resourceBuilder) Allocates the Action operation type to the given Resource Builder.intCompares two strings lexicographically.booleanstatic ActionfromAnnotation(Action action, Method annotated, ApiDescription descriptor, Class<?> relativeType) Builds an Action object using the data in the annotation.getName()Getter of the ID.Getter of the request.Getter of the response.inthashCode()Methods inherited from class org.forgerock.api.models.Operation
getApiErrors, getDescription, getParameters, getStability, getSupportedLocales
-
Method Details
-
getName
Getter of the ID.- Returns:
- Id
-
getRequest
Getter of the request.- Returns:
- Request
-
getResponse
Getter of the response.- Returns:
- Response
-
equals
-
hashCode
public int hashCode() -
action
Creates a new builder for Action.- Returns:
- New builder instance
-
allocateToResource
Allocates the Action operation type to the given Resource Builder.- Specified by:
allocateToResourcein classOperation- Parameters:
resourceBuilder- - Resource Builder to add the operation
-
fromAnnotation
public static Action fromAnnotation(Action action, Method annotated, ApiDescription descriptor, Class<?> relativeType) Builds an Action object using the data in the annotation.- Parameters:
action- The annotation that holds the data for the built object.annotated- The action method.descriptor- The root descriptor to add definitions to.relativeType- The type relative to which schema resources should be resolved.- Returns:
- Action instance.
-
compareTo
Compares two strings lexicographically.- Specified by:
compareToin interfaceComparable<Action>- Parameters:
action- Action to compare to- Returns:
- the value
0if the argument string is equal to this string; a value less than0if this string is lexicographically less than the string argument; and a value greater than0if this string is lexicographically greater than the string argument.
-