Package org.forgerock.api
Class CrestApiProducer
java.lang.Object
org.forgerock.api.CrestApiProducer
- All Implemented Interfaces:
ApiProducer<ApiDescription>
An
ApiProducer implementation for CREST resources, that provides ApiDescription descriptors.-
Constructor Summary
ConstructorsConstructorDescriptionCrestApiProducer(String id, String apiVersion) Construct a new producer.CrestApiProducer(String id, String apiVersion, LocalizableString description) Construct a new producer. -
Method Summary
Modifier and TypeMethodDescriptionaddApiInfo(ApiDescription api) Add common API Info to the descriptor.merge(List<ApiDescription> descriptions) Merge the provided descriptors into a single descriptor.newChildProducer(String idFragment) Create a child producer with the same type, but with the extra ID fragment.withPath(ApiDescription api, String parentPath) Mutate the provided descriptor to add the specified path.withVersion(ApiDescription api, Version version) Mutate the provided descriptor to add the specified version.
-
Constructor Details
-
CrestApiProducer
Construct a new producer.- Parameters:
id- The API ID fragment for this producer.apiVersion- The version of the API being described.description- The API description.
-
CrestApiProducer
Construct a new producer.- Parameters:
id- The API ID fragment for this producer.apiVersion- The version of the API being described.
-
-
Method Details
-
withPath
Description copied from interface:ApiProducerMutate the provided descriptor to add the specified path.- Specified by:
withPathin interfaceApiProducer<ApiDescription>- Parameters:
api- The descriptor to be mutated.parentPath- The path to add to the descriptor.- Returns:
- The new descriptor.
-
withVersion
Description copied from interface:ApiProducerMutate the provided descriptor to add the specified version.- Specified by:
withVersionin interfaceApiProducer<ApiDescription>- Parameters:
api- The descriptor to be mutated.version- The version to apply to the resource.- Returns:
- The new descriptor.
-
merge
Description copied from interface:ApiProducerMerge the provided descriptors into a single descriptor.- Specified by:
mergein interfaceApiProducer<ApiDescription>- Parameters:
descriptions- The descriptors to be merged.- Returns:
- The merged descriptor.
-
addApiInfo
Description copied from interface:ApiProducerAdd common API Info to the descriptor.- Specified by:
addApiInfoin interfaceApiProducer<ApiDescription>- Parameters:
api- The descriptor.- Returns:
- The modified descriptor.
-
newChildProducer
Description copied from interface:ApiProducerCreate a child producer with the same type, but with the extra ID fragment.- Specified by:
newChildProducerin interfaceApiProducer<ApiDescription>- Parameters:
idFragment- The fragment of the ID for this producer.- Returns:
- The new producer.
-