Interface IRuntimeComponentManager
-
public interface IRuntimeComponentManager
1C:Enterprise runtime installation components manager.IRuntimeComponentManager
is a central point to acces 1C:Enterprise runtime functionality. Manager can be used to obtain 1C:Enterprise runtime installations components, component types and component executors for 1C:Enterprise runtime execution.Example of usage:
// get thick client and thick client launcher for our 1C:Enterprise runtime installation Pair<ILaunchableRuntimeComponent, IThickClientLauncher> thickClient = runtimeComponentManager.getComponentAndExecutor(installation, IRuntimeComponentTypes.THICK_CLIENT); // check if thick client was found in our installation if (thickClient != null) { // launch client on some infobase thickClient.second.runClient(thickClient.first, someInfobase, null); } else { reportThickClientNotFound(installation); }
Component resolving is aware of type of 1C:Enterprise runtime installation and will use appropriate registered component resolver.
- See Also:
IRuntimeComponentType
,IRuntimeComponentTypes
,IRuntimeComponentExecutor
,IRuntimeComponentResolver
- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IRuntimeComponent
getComponent(RuntimeInstallation installation, String typeId)
Returns 1C:Enterprise runtime installation component instance of the given type.<C extends IRuntimeComponent,T extends IRuntimeComponentExecutor>
Pair<C,T>getComponentAndExecutor(RuntimeInstallation installation, String typeId)
For the given 1C:Enterprise runtime installation and the given type identifier returns pair of: Registered instance of 1C:Enterprise runtime installation component.Collection<IRuntimeComponent>
getComponents(RuntimeInstallation installation)
Returns collection of 1C:Enterprise runtime installation components for the given installation.IRuntimeComponentExecutor
getExecutor(RuntimeInstallation installation, String typeId)
Returns registered instance of 1C:Enterprise runtime installation component executor for the given 1C:Enterprise runtime installation and the given type identifier.IRuntimeComponentType
getType(String typeId)
Returns registered instance of 1C:Enterprise runtime installation component type by the given component type identifier.Collection<IRuntimeComponentType>
getTypes(Class<? extends IRuntimeComponentExecutor> executorSupertype)
Returns collection of 1C:Enterprise runtime component, that have registered executors, implementing the given executor superclass or superinterface.boolean
hasComponent(RuntimeInstallation installation, String... typeIds)
Returns whether the given 1C:Enterprise runtime installation has component instances of given types.boolean
supportsExecution(RuntimeInstallation installation, String typeId)
Returns whether the given 1C:Enterprise runtime installation supports execution of the given component type.
-
-
-
Method Detail
-
supportsExecution
boolean supportsExecution(RuntimeInstallation installation, String typeId)
Returns whether the given 1C:Enterprise runtime installation supports execution of the given component type.IRuntimeComponentTypes
can be used for basic 1C:Enterprise runtime component types identifiers.- Parameters:
installation
- the 1C:Enterprise runtime installation to check support with, cannot benull
typeId
- the 1C:Enterprise runtime component type to check execution availability with, cannot benull
- Returns:
- whether the given 1C:Enterprise runtime installation supports execution of the given component type
-
getType
IRuntimeComponentType getType(String typeId)
Returns registered instance of 1C:Enterprise runtime installation component type by the given component type identifier. Can returnnull
if type not found.IRuntimeComponentTypes
can be used for basic 1C:Enterprise runtime component types identifiers.- Parameters:
typeId
- 1C:Enterprise runtime installation component type identifier, cannot benull
- Returns:
- a registered instance of 1C:Enterprise runtime installation component type or
null
if type not found
-
getTypes
Collection<IRuntimeComponentType> getTypes(Class<? extends IRuntimeComponentExecutor> executorSupertype)
Returns collection of 1C:Enterprise runtime component, that have registered executors, implementing the given executor superclass or superinterface.- Parameters:
executorSupertype
- the superclass or superinterface to get registered components for, cannot benull
- Returns:
- collection of 1C:Enterprise runtime component, that have registered executors, implementing the
given executor superclass or superinterface, cannot be
null
-
hasComponent
boolean hasComponent(RuntimeInstallation installation, String... typeIds)
Returns whether the given 1C:Enterprise runtime installation has component instances of given types.IRuntimeComponentTypes
can be used for basic 1C:Enterprise runtime component types identifiers.- Parameters:
installation
- 1C:Enterprise runtime installation, cannot benull
typeIds
- 1C:Enterprise runtime installation component type ids, cannot benull
- Returns:
- whether the given 1C:Enterprise runtime installation has component instance of the given type
-
getComponent
IRuntimeComponent getComponent(RuntimeInstallation installation, String typeId)
Returns 1C:Enterprise runtime installation component instance of the given type. Can returnnull
if component not found.IRuntimeComponentTypes
can be used for basic 1C:Enterprise runtime component types identifiers.- Parameters:
installation
- 1C:Enterprise runtime installation, cannot benull
typeId
- 1C:Enterprise runtime installation component type id, cannot benull
- Returns:
- 1C:Enterprise runtime installation component instance or
null
if component not found
-
getComponents
Collection<IRuntimeComponent> getComponents(RuntimeInstallation installation)
Returns collection of 1C:Enterprise runtime installation components for the given installation.- Parameters:
installation
- 1C:Enterprise runtime installation, cannot benull
- Returns:
- collection of 1C:Enterprise runtime installation components for the given installation, never
null
, can be empty
-
getExecutor
IRuntimeComponentExecutor getExecutor(RuntimeInstallation installation, String typeId)
Returns registered instance of 1C:Enterprise runtime installation component executor for the given 1C:Enterprise runtime installation and the given type identifier. Can returnnull
if executor not found.IRuntimeComponentTypes
can be used for basic 1C:Enterprise runtime component types identifiers.- Parameters:
installation
- 1C:Enterprise runtime installation, cannot benull
typeId
- 1C:Enterprise runtime installation component type id, cannot benull
- Returns:
- registered instance of 1C:Enterprise runtime installation component executor or
null
if executor not found
-
getComponentAndExecutor
<C extends IRuntimeComponent,T extends IRuntimeComponentExecutor> Pair<C,T> getComponentAndExecutor(RuntimeInstallation installation, String typeId)
For the given 1C:Enterprise runtime installation and the given type identifier returns pair of:- Registered instance of 1C:Enterprise runtime installation component.
- Registered instance of 1C:Enterprise runtime installation component executor.
Can return
null
if executor of the given type not found or if the given installation does not contain component of the given type.IRuntimeComponentTypes
can be used for basic 1C:Enterprise runtime component types identifiers.- Parameters:
installation
- 1C:Enterprise runtime installation, cannot benull
typeId
- 1C:Enterprise runtime installation component type id, cannot benull
- Returns:
- a pair of registered instance of 1C:Enterprise runtime installation component and component
executor or
null
if executor or component not found
-
-