Package org.apache.tapestry5.internal.services

# Class ComponentDependencyRegistryImpl

java.lang.Object
org.apache.tapestry5.internal.services.ComponentDependencyRegistryImpl

All Implemented Interfaces:
  `ComponentDependencyRegistry`

public class ComponentDependencyRegistryImpl extends Object implements ComponentDependencyRegistry

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.tapestry5.internal.services.ComponentDependencyRegistry

  `ComponentDependencyRegistry.DependencyType`

- ## Field Summary

  ### Fields inherited from interface org.apache.tapestry5.internal.services.ComponentDependencyRegistry

  `FILENAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ComponentDependencyRegistryImpl(PageClassLoaderContextManager pageClassLoaderContextManager, PlasticManager plasticManager, ComponentClassResolver componentClassResolver, TemplateParser templateParser, ComponentTemplateLocator componentTemplateLocator, String componentDependencyFile, boolean productionMode)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  Clears all dependency information.
  `void`
  `clear(String className)`
  Clears all dependency information for a given component.
  `void`
  `clear(ComponentPageElement component)`
  Clears all dependency information for a given component.
  `boolean`
  `contains(String className)`
  Tells whether this registry already contans a given class name.
  `void`
  `disableInvalidations()`
  Tells this service to ignore invalidations in this thread.
  `void`
  `enableInvalidations()`
  Tells this service to stop ignoring invalidations in this thread.
  `Set<String>`
  `getAllNonPageDependencies(String className)`
  Returns all dependencies of a given class, direct and indirect.
  `Set<String>`
  `getClassNames()`
  Returns the set of all class names in the registry.
  `Set<String>`
  `getDependencies(String className, ComponentDependencyRegistry.DependencyType type)`
  Returns the fully qualified names of the direct dependencies of a given component and a given dependency type.
  `Set<String>`
  `getDependents(String className)`
  Returns the fully qualified names of the direct dependencies of a given component.
  `Set<String>`
  `getRootClasses()`
  Returns the set of all root classes (i.e.
  `boolean`
  `isStoredDependencyInformationPresent()`
  Returns whether stored dependency information is present.
  `void`
  `listen(InvalidationEventHub invalidationEventHub)`
  Signs up this registry to invalidation events from a given hub.
  `void`
  `register(Class<?> component)`
  Register all the dependencies of a given class.
  `void`
  `register(Class<?> component, ClassLoader classLoader)`
  Register all the dependencies of a given class and uses a given classloader to load other classes if needed.
  `void`
  `register(ComponentPageElement componentPageElement)`
  Register all the dependencies of a given component.
  `void`
  `register(PlasticField plasticField, MutableComponentModel componentModel)`
  Register a dependency of a component class with another through annotations such as `InjectPage`, `InjectComponent` and `Component`.
  `void`
  `setupThreadCleanup(PerthreadManager perthreadManager)`
  `void`
  `writeFile()`
  Writes the current component dependency data to a file so it can be reused in a new run later.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ComponentDependencyRegistryImpl

    public ComponentDependencyRegistryImpl(PageClassLoaderContextManager pageClassLoaderContextManager, PlasticManager plasticManager, ComponentClassResolver componentClassResolver, TemplateParser templateParser, ComponentTemplateLocator componentTemplateLocator, @Symbol("tapestry.component-dependency-file") String componentDependencyFile, @Symbol("tapestry.production-mode") boolean productionMode)

- ## Method Details

  - ### setupThreadCleanup

    public void setupThreadCleanup(PerthreadManager perthreadManager)

  - ### register

    public void register(Class<?> component)
    Description copied from interface: `ComponentDependencyRegistry`
    Register all the dependencies of a given class.
    Specified by:
      `register` in interface `ComponentDependencyRegistry`

  - ### register

    public void register(Class<?> component, ClassLoader classLoader)
    Description copied from interface: `ComponentDependencyRegistry`
    Register all the dependencies of a given class and uses a given classloader to load other classes if needed.
    Specified by:
      `register` in interface `ComponentDependencyRegistry`

  - ### register

    public void register(ComponentPageElement componentPageElement)
    Description copied from interface: `ComponentDependencyRegistry`
    Register all the dependencies of a given component.
    Specified by:
      `register` in interface `ComponentDependencyRegistry`

  - ### register

    public void register(PlasticField plasticField, MutableComponentModel componentModel)
    Description copied from interface: `ComponentDependencyRegistry`
    Register a dependency of a component class with another through annotations such as `InjectPage`, `InjectComponent` and `Component`.
    Specified by:
      `register` in interface `ComponentDependencyRegistry`

  - ### clear

    public void clear(String className)
    Description copied from interface: `ComponentDependencyRegistry`
    Clears all dependency information for a given component.
    Specified by:
      `clear` in interface `ComponentDependencyRegistry`

  - ### clear

    public void clear(ComponentPageElement component)
    Description copied from interface: `ComponentDependencyRegistry`
    Clears all dependency information for a given component.
    Specified by:
      `clear` in interface `ComponentDependencyRegistry`

  - ### clear

    public void clear()
    Description copied from interface: `ComponentDependencyRegistry`
    Clears all dependency information.
    Specified by:
      `clear` in interface `ComponentDependencyRegistry`

  - ### getDependents

    public Set<String> getDependents(String className)
    Description copied from interface: `ComponentDependencyRegistry`
    Returns the fully qualified names of the direct dependencies of a given component.
    Specified by:
      `getDependents` in interface `ComponentDependencyRegistry`

  - ### getDependencies

    public Set<String> getDependencies(String className, ComponentDependencyRegistry.DependencyType type)
    Description copied from interface: `ComponentDependencyRegistry`
    Returns the fully qualified names of the direct dependencies of a given component and a given dependency type.
    Specified by:
      `getDependencies` in interface `ComponentDependencyRegistry`
    See Also:
      - `ComponentDependencyRegistry.DependencyType`

  - ### getAllNonPageDependencies

    public Set<String> getAllNonPageDependencies(String className)
    Description copied from interface: `ComponentDependencyRegistry`
    Returns all dependencies of a given class, direct and indirect.
    Specified by:
      `getAllNonPageDependencies` in interface `ComponentDependencyRegistry`
    Parameters:
      `className` - a class name.

  - ### listen

    public void listen(InvalidationEventHub invalidationEventHub)
    Description copied from interface: `ComponentDependencyRegistry`
    Signs up this registry to invalidation events from a given hub.
    Specified by:
      `listen` in interface `ComponentDependencyRegistry`

  - ### writeFile

    public void writeFile()
    Description copied from interface: `ComponentDependencyRegistry`
    Writes the current component dependency data to a file so it can be reused in a new run later.
    Specified by:
      `writeFile` in interface `ComponentDependencyRegistry`
    See Also:
      - `ComponentDependencyRegistry.FILENAME`

  - ### contains

    public boolean contains(String className)
    Description copied from interface: `ComponentDependencyRegistry`
    Tells whether this registry already contans a given class name.
    Specified by:
      `contains` in interface `ComponentDependencyRegistry`

  - ### getClassNames

    public Set<String> getClassNames()
    Description copied from interface: `ComponentDependencyRegistry`
    Returns the set of all class names in the registry.
    Specified by:
      `getClassNames` in interface `ComponentDependencyRegistry`

  - ### getRootClasses

    public Set<String> getRootClasses()
    Description copied from interface: `ComponentDependencyRegistry`
    Returns the set of all root classes (i.e. ones with no dependencies).
    Specified by:
      `getRootClasses` in interface `ComponentDependencyRegistry`

  - ### isStoredDependencyInformationPresent

    public boolean isStoredDependencyInformationPresent()
    Description copied from interface: `ComponentDependencyRegistry`
    Returns whether stored dependency information is present.
    Specified by:
      `isStoredDependencyInformationPresent` in interface `ComponentDependencyRegistry`

  - ### disableInvalidations

    public void disableInvalidations()
    Description copied from interface: `ComponentDependencyRegistry`
    Tells this service to ignore invalidations in this thread.
    Specified by:
      `disableInvalidations` in interface `ComponentDependencyRegistry`

  - ### enableInvalidations

    public void enableInvalidations()
    Description copied from interface: `ComponentDependencyRegistry`
    Tells this service to stop ignoring invalidations in this thread.
    Specified by:
      `enableInvalidations` in interface `ComponentDependencyRegistry`