Package org.forgerock.api.util
Class ReferenceResolver
java.lang.Object
org.forgerock.api.util.ReferenceResolver
Helper that registers one or more
ApiDescription
instances and provides a means to resolve
Reference
s.-
Constructor Summary
ConstructorDescriptionReferenceResolver
(ApiDescription local) Creates a reference-resolver and defines the oneApiDescription
that can be used for local (non-namespaced) reference lookups. -
Method Summary
Modifier and TypeMethodDescriptiongetDefinition
(Reference reference) Gets aDefinitions
Schema
by JSON reference.getService
(Reference reference) register
(ApiDescription apiDescription) Registers an externalApiDescription
, forReference
lookup, and must not have previously been registered.registerAll
(ApiDescription... apiDescriptions) Registers externalApiDescription
s, forReference
lookup, and each must not have previously been registered.
-
Constructor Details
-
ReferenceResolver
Creates a reference-resolver and defines the oneApiDescription
that can be used for local (non-namespaced) reference lookups.- Parameters:
local
-ApiDescription
to use for local (non-namespaced) reference lookups
-
-
Method Details
-
register
Registers an externalApiDescription
, forReference
lookup, and must not have previously been registered.- Parameters:
apiDescription
-ApiDescription
to register, which has not previously been registered- Returns:
- self
-
registerAll
Registers externalApiDescription
s, forReference
lookup, and each must not have previously been registered.- Parameters:
apiDescriptions
- List ofApiDescription
s to register, which have not previously been registered- Returns:
- self
-
getDefinition
Gets aDefinitions
Schema
by JSON reference.- Parameters:
reference
- JSON reference- Returns:
Schema
ornull
if not found
-
getError
- Parameters:
reference
- JSON reference- Returns:
ApiError
ornull
if not found
-
getService
- Parameters:
reference
- JSON reference- Returns:
Resource
ornull
if not found
-