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 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 be null
        typeId - the 1C:Enterprise runtime component type to check execution availability with, cannot be null
        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 return null 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 be null
        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 be null
        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 be null
        typeIds - 1C:Enterprise runtime installation component type ids, cannot be null
        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 return null if component not found.

        IRuntimeComponentTypes can be used for basic 1C:Enterprise runtime component types identifiers.

        Parameters:
        installation - 1C:Enterprise runtime installation, cannot be null
        typeId - 1C:Enterprise runtime installation component type id, cannot be null
        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 be null
        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 return null if executor not found.

        IRuntimeComponentTypes can be used for basic 1C:Enterprise runtime component types identifiers.

        Parameters:
        installation - 1C:Enterprise runtime installation, cannot be null
        typeId - 1C:Enterprise runtime installation component type id, cannot be null
        Returns:
        registered instance of 1C:Enterprise runtime installation component executor or null if executor not found
      • getComponentAndExecutor

        <C extends IRuntimeComponent,​T extends IRuntimeComponentExecutorPair<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 be null
        typeId - 1C:Enterprise runtime installation component type id, cannot be null
        Returns:
        a pair of registered instance of 1C:Enterprise runtime installation component and component executor or null if executor or component not found