@ConfigurationDescription(properties={@Property(name="Components.ProcessModelFactory",isRequired=true,description="the process model factory"),,,,,,,,,}) public final class ModelFactoryRegistry extends InstanceToInstanceRegistry implements ModelViewerProvider
InstanceToInstanceRegistry to support
all model factories in ADEPT2. These factories are used to encapsulate the
users of data models (defined via interfaces) from the underlying
implementations.
This class parses the following properties from the registry configuration (when checking instance declarations):
PluginRegistry.ConfigurationValidator, PluginRegistry.URLClassloaderPrivilegedActionAbstractRegistry.DefaultNameResolution, AbstractRegistry.InstanceInformation, AbstractRegistry.InstantiationModeAbstractADEPT2Service.ActiveSessions| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Class<?>> |
declaredModelViewers
The model viewer class objects for the plug-in data (ID -> class).
|
usedInstancesdeclaredPluginTypes, defaultInstances, dynamicPlugins, pluginInstances, runtimePlugins, runtimePluginTypeCLs, singletonPluginscomponentInterfaces, configurationManager, declaredInstances, INIT_INSTANTIATED_OBJECT_METHOD, nameResolution, singletonInstancesCFG_EARLY_SERVICEAUTH_ORGPOSID, CFG_EARLY_SERVICEAUTH_ORGPOSNAME, CFG_EARLY_SERVICEAUTH_PASSWORD, CFG_EARLY_SERVICEAUTH_USERNAME, CFG_SERVICEAUTH_ORGPOSID, CFG_SERVICEAUTH_ORGPOSNAME, CFG_SERVICEAUTH_PASSWORD, CFG_SERVICEAUTH_USERNAMECONF_CSV_LOGGING, configuration, logger, registry, runtimeRequiredServices, startupRequiredServices| Constructor and Description |
|---|
ModelFactoryRegistry(UrlConfigurationManager confMgr,
Configuration configuration,
Registry registry)
Constructs a new model factory registry supporting factory for the creation
of model implementations.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
authenticateService()
The
ModelFactoryRegistry does not need an authentication,
therefore this implementation is empty. |
ActivityModelFactory |
getActivityModelFactory(java.lang.String instanceName)
Gets the instance of the activity model factory configured for the
designated component instance.
|
ExecutionFactory |
getExecutionFactory(java.lang.String instanceName)
Gets the designated instance of the execution factory configured for the
designated component instance.
|
SystemDataFormatterFactory |
getFormatterFactory(java.lang.String instanceName)
Gets the designated instance of the system data formatter configured for
the designated component instance.
|
GraphicalModelFactory |
getGraphicalModelFactory(java.lang.String instanceName)
Gets the designated instance of the graphical model factory configured for
the designated component instance.
|
InitTabFactory |
getInitTabFactory(java.lang.String instanceName)
Gets the designated instance of the init tab model factory configured for
the designated component instance.
|
LocalisationFactory |
getLocalisationFactory(java.lang.String instanceName)
Gets the designated instance of the localisation factory configured for the
designated component instance.
|
static ModelFactoryRegistry |
getModelFactoryRegistry()
Deprecated.
|
FilterFactory |
getModelFilterFactory(java.lang.String instanceName)
Gets the instance of the filter factory configured for the designated
component instance.
|
java.lang.Class<?> |
getModelViewerClass(java.lang.String pluginID)
Gets the model viewer class for the designated plugin ID.
|
ProcessModelFactory |
getProcessModelFactory(java.lang.String instanceName)
Gets the instance of the process model factory configured for the
designated component instance.
|
WorklistModelFactory |
getWorklistModelFactory(java.lang.String instanceName)
Gets the instance of the worklist model factory configured for the
designated component instance.
|
protected void |
readDeclaredModelViewerClasses(Configuration conf)
Reads all declared model viewer classes from the configuration and loads
the classes.
|
protected void |
renewConfiguration(Configuration conf)
Renews the configuration of this registry by renewing via the superclass
and reading the declared model viewer classes for plugin data.
|
void |
shutdown(boolean emergency)
Signals the shutdown of this registry.
|
getUsedComponentInstanceNameForInstance, getUsedObjectForInstancecreatePluginLoader, getConfiguredPlugin, getConfiguredPlugin, getConfiguredPlugin, getConfiguredPlugins, prepareRuntimePlugin, readMetaConfigurationcheckAndStoreProvidedObject, checkConfiguration, checkImplementingClass, checkSupertype, createInstanceForInterface, getAppropriateMethod, getArbitrarilyNamedObject, getComponentType, getFormattedSignature, getHierarchicalInstanceName, getInstanceInformation, getInstantiationMode, getInterfaceForComponentType, getObjectForInstanceName, getObjectForInstanceName, getObjectForInstanceName, getSimpleInstanceName, init, initialiseInstantiatedObject, readMetaConfiguration_sessionActive, awaitActiveSessions, createChildSession, createSession, getAgent, getSecurityManager, getSessionFactory, getStartupRequired, getTopLevelAgent, getUserCredentials, globalSecurityManagerAvailable, isEarlyService, sessionHasCapability_sessionFinished, activeOrInvalidServiceStateException, changeLogContext, changeLogContext, changeLogContext, consoleLog, csvLoggingEnabled, getClassSpecificJulLogger, getDependencyRegistry, getLocalUris, getLogger, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, isActive, isSessionActive, isShutdown, logMethodEntry, logMethodEntry, logMethodEntry, logMethodExit, logMethodExit, ping, preShutdown, privilegeSession, privilegeThread, revertLogContextChanges, sessionActive, sessionActive, sessionActive, sessionActive, sessionFinished, sessionFinished, signalShutdown, signalStart, start, unprivilegeThreadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, ping, preShutdown, startprotected final java.util.Map<java.lang.String,java.lang.Class<?>> declaredModelViewers
PluginDataContainer) by additional data and provide type-safe
access. This way they build a special view on the model elements and their
additional plugin data.public ModelFactoryRegistry(UrlConfigurationManager confMgr, Configuration configuration, Registry registry) throws ConfigurationException
InstanceToInstanceRegistry.confMgr - The initial configuration manager that provides
configurations for the loaded component instances.configuration - The configuration of the registry.registry - The parent registry of this registry.ConfigurationException - If the password cannot be parsed from the
configuration, a ConfigurationException will be
thrown.protected void authenticateService()
ModelFactoryRegistry does not need an authentication,
therefore this implementation is empty.authenticateService in class AbstractAuthenticatedServiceprotected void renewConfiguration(Configuration conf) throws ConfigurationException
renewConfiguration in class InstanceToInstanceRegistryconf - The (new) root configuration for this registry.ConfigurationException - If a model viewer class is declared but it
is not found by this registry, a
ConfigurationException will be thrown.protected void readDeclaredModelViewerClasses(Configuration conf) throws ConfigurationException
conf - The (new) root configuration for this registry
containing the declared model viewer classes.ConfigurationException - If a model viewer class is declared but it
is not found by this registry, a
ConfigurationException will be thrown.public ProcessModelFactory getProcessModelFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the component instance requesting the
process model factory. Use the empty string if the instance name
is not defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public ActivityModelFactory getActivityModelFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the component instance requesting the
activity model factory. Use the empty string if the instance name
is not defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public WorklistModelFactory getWorklistModelFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the component instance requesting the
worklist model factory. Use the empty string if the instance name
is not defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public FilterFactory getModelFilterFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the component instance requesting the
filter factory. Use the empty string if the instance name is not
defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public ExecutionFactory getExecutionFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the component instance requesting the
execution factory. Use the empty string if the instance name is
not defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public GraphicalModelFactory getGraphicalModelFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the graphical model factory instance. Use
the component type if the instance name is not defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public InitTabFactory getInitTabFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the init tab model factory instance. Use
the component type if the instance name is not defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public LocalisationFactory getLocalisationFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the localisation factory instance. Use the
component type if the instance name is not defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public SystemDataFormatterFactory getFormatterFactory(java.lang.String instanceName) throws ServiceNotKnownException
instanceName - The name of the system data formatter factory instance.
Use the component type if the instance name is not defined.ServiceNotKnownException - If
ServiceNotKnownException will be thrown.public java.lang.Class<?> getModelViewerClass(java.lang.String pluginID)
null will be returned.getModelViewerClass in interface ModelViewerProviderpluginID - The ID of the plugin to retrieve a model viewer class for.
This provides type-safe access to the data of the plugin which is
stored by a PluginDataContainer.null in case the plugin ID is not known.@Deprecated public static ModelFactoryRegistry getModelFactoryRegistry() throws ServiceNotKnownException
ServiceNotKnownExceptionpublic void shutdown(boolean emergency)
AbstractRegistryThis method has to be called at an arbitrary time in the shutdown-procedure of overriding classes.
shutdown in interface ADEPT2Serviceshutdown in class AbstractRegistryemergency - Whether the shutdown will be an emergency shutdown.