Class RouteImporter
- java.lang.Object
-
- org.forgerock.openig.types.importer.RouteImporter
-
public class RouteImporter extends Object
ARouteImporter
is responsible for creating aRouteInstance
from a givenJsonValue
that represents an IG route.It's not its responsibility to start the route (and all of its components), it only creates the underlying model and build up its
ComponentInstance
with references in between them.The route still needs to be "valid": missing references will trigger importing errors, mandatory fields will be checked.
-
-
Constructor Summary
Constructors Constructor Description RouteImporter(org.forgerock.openig.model.type.TypeDefinitionRegistry definitionRegistry, org.forgerock.openig.model.resolver.ComponentInstanceFactoryRegistry factoryRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RouteInstance
doImport(JsonValue routeJson, org.forgerock.openig.model.component.Model parent, String routeId)
Import the givenrouteJson
into a fully loaded component instance model.
-
-
-
Constructor Detail
-
RouteImporter
public RouteImporter(org.forgerock.openig.model.type.TypeDefinitionRegistry definitionRegistry, org.forgerock.openig.model.resolver.ComponentInstanceFactoryRegistry factoryRegistry)
Constructs aRouteImporter
with the givendefinitionRegistry
andfactoryRegistry
.All routes imported with this importer will use these registries. That means that if a route use a type that is unknown to these registries, the action will fail.
- Parameters:
definitionRegistry
- registry for known/supported types (nevernull
)factoryRegistry
- registry for known/supported component factories (nevernull
)
-
-
Method Detail
-
doImport
public RouteInstance doImport(JsonValue routeJson, org.forgerock.openig.model.component.Model parent, String routeId)
Import the givenrouteJson
into a fully loaded component instance model.- Parameters:
routeJson
- route JSON to import (nevernull
)parent
- parent model (nevernull
)routeId
- route identifier (nevernull
)- Returns:
- the built route model
- Throws:
IllegalStateException
- in case the route is invalid and cannot be imported into a component model (missing properties, missing references, ...)
-
-