Package com.unboundid.scim2.server.utils
Class ResourceTypeDefinition
- java.lang.Object
-
- com.unboundid.scim2.server.utils.ResourceTypeDefinition
-
public final class ResourceTypeDefinition extends Object
Declaration of a resource type including all schemas.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResourceTypeDefinition.BuilderBuilder for creating a ResourceTypeDefinition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResourceTypeDefinitionfromJaxRsResource(Class<?> resource)Create a new instance representing the resource type implemented by a root JAX-RS resource class.AttributeDefinitiongetAttributeDefinition(Path path)Retrieve the attribute definition for the attribute in the path.SchemaResourcegetCoreSchema()Gets the resource type's schema.StringgetDescription()Gets the description of the resource type.StringgetEndpoint()Gets the resource type's endpoint.StringgetName()Gets the resource type name.Map<SchemaResource,Boolean>getSchemaExtensions()Gets the resource type's schema extensions.booleanisDiscoverable()Whether this resource type and its associated schemas should be discoverable using the SCIM 2 standard /resourceTypes and /schemas endpoints.PathnormalizePath(Path path)Normalize a path by removing the schema URN for core attributes.ResourceTypeResourcetoScimResource()Retrieve the ResourceType SCIM resource that represents this definition.
-
-
-
Method Detail
-
getName
@NotNull public String getName()
Gets the resource type name.- Returns:
- the name of the resource type.
-
getDescription
@Nullable public String getDescription()
Gets the description of the resource type.- Returns:
- the description of the resource type.
-
getEndpoint
@NotNull public String getEndpoint()
Gets the resource type's endpoint.- Returns:
- the endpoint for the resource type.
-
getCoreSchema
@Nullable public SchemaResource getCoreSchema()
Gets the resource type's schema.- Returns:
- the schema for the resource type.
-
getSchemaExtensions
@NotNull public Map<SchemaResource,Boolean> getSchemaExtensions()
Gets the resource type's schema extensions.- Returns:
- the schema extensions for the resource type.
-
isDiscoverable
public boolean isDiscoverable()
Whether this resource type and its associated schemas should be discoverable using the SCIM 2 standard /resourceTypes and /schemas endpoints.- Returns:
trueif discoverable orfalseotherwise.
-
getAttributeDefinition
@Nullable public AttributeDefinition getAttributeDefinition(@NotNull Path path)
Retrieve the attribute definition for the attribute in the path.- Parameters:
path- The attribute path.- Returns:
- The attribute definition or
nullif there is no attribute defined for the path.
-
normalizePath
@NotNull public Path normalizePath(@NotNull Path path)
Normalize a path by removing the schema URN for core attributes.- Parameters:
path- The path to normalize.- Returns:
- The normalized path.
-
toScimResource
@NotNull public ResourceTypeResource toScimResource()
Retrieve the ResourceType SCIM resource that represents this definition.- Returns:
- The ResourceType SCIM resource that represents this definition.
-
fromJaxRsResource
@Nullable public static ResourceTypeDefinition fromJaxRsResource(@NotNull Class<?> resource)
Create a new instance representing the resource type implemented by a root JAX-RS resource class.- Parameters:
resource- a root resource whoseResourceTypeandPathvalues will be used to initialize the ResourceTypeDefinition.- Returns:
- a new ResourceTypeDefinition or
nullif resource is not annotated withResourceTypeandPath.
-
-