Package org.forgerock.api.util
Class ReferenceResolver
- java.lang.Object
-
- org.forgerock.api.util.ReferenceResolver
-
public class ReferenceResolver extends Object
Helper that registers one or moreApiDescription
instances and provides a means to resolveReference
s.
-
-
Constructor Summary
Constructors Constructor Description ReferenceResolver(ApiDescription local)
Creates a reference-resolver and defines the oneApiDescription
that can be used for local (non-namespaced) reference lookups.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Schema
getDefinition(Reference reference)
Gets aDefinitions
Schema
by JSON reference.ApiError
getError(Reference reference)
Resource
getService(Reference reference)
ReferenceResolver
register(ApiDescription apiDescription)
Registers an externalApiDescription
, forReference
lookup, and must not have previously been registered.ReferenceResolver
registerAll(ApiDescription... apiDescriptions)
Registers externalApiDescription
s, forReference
lookup, and each must not have previously been registered.
-
-
-
Constructor Detail
-
ReferenceResolver
public ReferenceResolver(ApiDescription local)
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 Detail
-
register
public ReferenceResolver register(ApiDescription apiDescription)
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
public ReferenceResolver registerAll(ApiDescription... apiDescriptions)
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
public Schema getDefinition(Reference reference)
Gets aDefinitions
Schema
by JSON reference.- Parameters:
reference
- JSON reference- Returns:
Schema
ornull
if not found
-
getError
public ApiError getError(Reference reference)
- Parameters:
reference
- JSON reference- Returns:
ApiError
ornull
if not found
-
-