Class ModelIdentityResolver
java.lang.Object
org.gcube.informationsystem.resourceregistry.dbinitialization.ModelIdentityResolver
Resolves the models of the registry besides
information-system-model: the single place
where they are decided, wherever RegistryMetadata is (re)computed.
The domain model is the domain RegistrationProvider (any provider other than
is-model's), considered only when discoverAllRegistrationProviders is true, i.e.
when its types are installed from the classpath. The runtime model, holding the types created
through REST, is named by service.yaml's runtimeModelName, "Runtime Types"
when absent.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the runtime model whenservice.yamldoes not set one. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a resolver readingservice.yamland the classpathRegistrationProviders. -
Method Summary
Modifier and TypeMethodDescriptionorg.gcube.informationsystem.discovery.RegistrationProviderReturns the domainRegistrationProvider, if any.Returns the name of the runtime model.
-
Field Details
-
DEFAULT_RUNTIME_MODEL_NAME
Name of the runtime model whenservice.yamldoes not set one.- See Also:
-
-
Constructor Details
-
ModelIdentityResolver
public ModelIdentityResolver()Creates a resolver readingservice.yamland the classpathRegistrationProviders.
-
-
Method Details
-
resolveDomainProvider
public org.gcube.informationsystem.discovery.RegistrationProvider resolveDomainProvider()Returns the domainRegistrationProvider, if any.- Returns:
- the domain provider, or
nullwhen none is considered - Throws:
IllegalStateException- if more than one domainRegistrationProvideris considered, since a registry holds at most one domain model
-
resolveRuntimeModelName
Returns the name of the runtime model.- Returns:
- the configured name, or "Runtime Types"
- Throws:
IllegalStateException- if the name is is-model's or the domain model's, or more than one domain model is on the classpath
-