Enum Class CrudTemplate
- All Implemented Interfaces:
Serializable
,Comparable<CrudTemplate>
,Constable
,CrudEndpointPolicy
Enum representing various CRUD endpoint templates.
Each template defines a specific set of CRUD operations that can be performed.
These templates can be used to configure the behavior of CRUD endpoints in applications.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOnly creation endpoints.Full API with every endpoint enabled.GET + POST operations, immutable once created.Public lightweight endpoints.Only metadata operations.No bulk operations at all.Everything except delete.Only PATCH for modifications, plus basic GET.Only read operations.Only search style endpoints.All except bulk and export style endpoints.Only validate endpoint. -
Method Summary
Modifier and TypeMethodDescriptiongetEffectiveEndpoints
(Set<CrudEndpoint> omitted, Set<CrudEndpoint> included) Return the complete set of endpoints that are effective when adding and removing other endpoints from the template.Returns the endpoints defined by this template.static CrudTemplate
Returns the enum constant of this class with the specified name.static CrudTemplate[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface nl.datasteel.crudcraft.annotations.CrudEndpointPolicy
name
-
Enum Constant Details
-
FULL
Full API with every endpoint enabled. -
READ_ONLY
Only read operations. -
IMMUTABLE_WRITE
GET + POST operations, immutable once created. -
PATCH_ONLY
Only PATCH for modifications, plus basic GET. -
NO_DELETE
Everything except delete. -
NO_BATCH
No bulk operations at all. -
CREATE_ONLY
Only creation endpoints. -
SEARCH_ONLY
Only search style endpoints. -
META_ONLY
Only metadata operations. -
LIGHT_PUBLIC
Public lightweight endpoints. -
SECURE_INTERNAL
All except bulk and export style endpoints. -
VALIDATION_ONLY
Only validate endpoint.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
resolveEndpoints
Returns the endpoints defined by this template.- Specified by:
resolveEndpoints
in interfaceCrudEndpointPolicy
- Returns:
- a set of
CrudEndpoint
instances that this template includes
-
getEffectiveEndpoints
public Set<CrudEndpoint> getEffectiveEndpoints(Set<CrudEndpoint> omitted, Set<CrudEndpoint> included) Return the complete set of endpoints that are effective when adding and removing other endpoints from the template.- Parameters:
omitted
- the set of endpoints to be omitted from the templateincluded
- the set of endpoints to be included in the template- Returns:
- a set of
CrudEndpoint
instances that are effective after applying the omitted and included endpoints
-