Class ComponentTaskContext

    • Constructor Detail

      • ComponentTaskContext

        public ComponentTaskContext​(Object componentKey,
                                    ComponentTaskType type)
        Default constructor
    • Method Detail

      • isLast

        public boolean isLast​(Object componentKey)
        Indicates whether the provided componentKey is the last dependency that has been added to the context.
        Returns:
        true if the dependency is the last, false otherwise.
      • isRoot

        public boolean isRoot()
        Returns:
        indicates whether the current context is the root context or not.
      • addComponentToContext

        public <T> org.exoplatform.container.ConcurrentContainer.CreationalContextComponentAdapter<T> addComponentToContext​(Object key,
                                                                                                                            org.exoplatform.container.ConcurrentContainer.CreationalContextComponentAdapter<T> ctx)
        Adds the CreationalContext of the component corresponding to the given key, to the dependency resolution context
        Parameters:
        key - The key of the component to add to the context
        ctx - The CreationalContext of the component to add to the context
        Returns:
        ConcurrentContainer.CreationalContextComponentAdapter instance that has been put into the map
      • removeComponentFromContext

        public org.exoplatform.container.ConcurrentContainer.CreationalContextComponentAdapter<?> removeComponentFromContext​(Object key)
        Removes the CreationalContext of the component corresponding to the given key, from the dependency resolution context
        Parameters:
        key - The key of the component to remove from the context
      • getComponentInstanceFromContext

        public <T> T getComponentInstanceFromContext​(Object key,
                                                     Class<T> bindType)
        Tries to get the component related to the given from the context, if it can be found the current state of the component instance is returned, otherwise null is returned
      • resetDependencies

        public ComponentTaskContext resetDependencies​(Object key,
                                                      ComponentTaskType type)
        Resets the dependencies but keeps the current dependency resolution context.
        Parameters:
        key - the key of the new first dependency
        type - the type of the corresponding task
        Returns:
        a ComponentTaskContext instance with the dependencies reseted