Class ComponentDependencyRegistryImpl
- java.lang.Object
-
- org.apache.tapestry5.internal.services.ComponentDependencyRegistryImpl
-
- All Implemented Interfaces:
ComponentDependencyRegistry
public class ComponentDependencyRegistryImpl extends java.lang.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, java.lang.String componentDependencyFile, boolean productionMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears all dependency information.voidclear(java.lang.String className)Clears all dependency information for a given component.voidclear(ComponentPageElement component)Clears all dependency information for a given component.booleancontains(java.lang.String className)Tells whether this registry already contans a given class name.voiddisableInvalidations()Tells this service to ignore invalidations in this thread.voidenableInvalidations()Tells this service to stop ignoring invalidations in this thread.java.util.Set<java.lang.String>getClassNames()Returns the set of all class names in the registry.java.util.Set<java.lang.String>getDependencies(java.lang.String className, ComponentDependencyRegistry.DependencyType type)Returns the fully qualified names of the direct dependencies of a given component and a given dependency type.java.util.Set<java.lang.String>getDependents(java.lang.String className)Returns the fully qualified names of the direct dependencies of a given component.java.util.Set<java.lang.String>getRootClasses()Returns the set of all root classes (i.e.booleanisStoredDependencyInformationPresent()Returns whether stored dependency information is present.voidlisten(InvalidationEventHub invalidationEventHub)Signs up this registry to invalidation events from a given hub.voidregister(java.lang.Class<?> component)Register all the dependencies of a given class.voidregister(ComponentPageElement componentPageElement)Register all the dependencies of a given component.voidregister(PlasticField plasticField, MutableComponentModel componentModel)Register a dependency of a component class with another through annotations such asInjectPage,InjectComponentandComponent.voidsetupThreadCleanup(PerthreadManager perthreadManager)voidwriteFile()Writes the current component dependency data to a file so it can be reused in a new run later.
-
-
-
Constructor Detail
-
ComponentDependencyRegistryImpl
public ComponentDependencyRegistryImpl(PageClassLoaderContextManager pageClassLoaderContextManager, PlasticManager plasticManager, ComponentClassResolver componentClassResolver, TemplateParser templateParser, ComponentTemplateLocator componentTemplateLocator, @Symbol("tapestry.component-dependency-file") java.lang.String componentDependencyFile, @Symbol("tapestry.production-mode") boolean productionMode)
-
-
Method Detail
-
setupThreadCleanup
public void setupThreadCleanup(PerthreadManager perthreadManager)
-
register
public void register(java.lang.Class<?> component)
Description copied from interface:ComponentDependencyRegistryRegister all the dependencies of a given class.- Specified by:
registerin interfaceComponentDependencyRegistry
-
register
public void register(ComponentPageElement componentPageElement)
Description copied from interface:ComponentDependencyRegistryRegister all the dependencies of a given component.- Specified by:
registerin interfaceComponentDependencyRegistry
-
register
public void register(PlasticField plasticField, MutableComponentModel componentModel)
Description copied from interface:ComponentDependencyRegistryRegister a dependency of a component class with another through annotations such asInjectPage,InjectComponentandComponent.- Specified by:
registerin interfaceComponentDependencyRegistry
-
clear
public void clear(java.lang.String className)
Description copied from interface:ComponentDependencyRegistryClears all dependency information for a given component.- Specified by:
clearin interfaceComponentDependencyRegistry
-
clear
public void clear(ComponentPageElement component)
Description copied from interface:ComponentDependencyRegistryClears all dependency information for a given component.- Specified by:
clearin interfaceComponentDependencyRegistry
-
clear
public void clear()
Description copied from interface:ComponentDependencyRegistryClears all dependency information.- Specified by:
clearin interfaceComponentDependencyRegistry
-
getDependents
public java.util.Set<java.lang.String> getDependents(java.lang.String className)
Description copied from interface:ComponentDependencyRegistryReturns the fully qualified names of the direct dependencies of a given component.- Specified by:
getDependentsin interfaceComponentDependencyRegistry
-
getDependencies
public java.util.Set<java.lang.String> getDependencies(java.lang.String className, ComponentDependencyRegistry.DependencyType type)
Description copied from interface:ComponentDependencyRegistryReturns the fully qualified names of the direct dependencies of a given component and a given dependency type.- Specified by:
getDependenciesin interfaceComponentDependencyRegistry- See Also:
ComponentDependencyRegistry.DependencyType
-
listen
public void listen(InvalidationEventHub invalidationEventHub)
Description copied from interface:ComponentDependencyRegistrySigns up this registry to invalidation events from a given hub.- Specified by:
listenin interfaceComponentDependencyRegistry
-
writeFile
public void writeFile()
Description copied from interface:ComponentDependencyRegistryWrites the current component dependency data to a file so it can be reused in a new run later.- Specified by:
writeFilein interfaceComponentDependencyRegistry- See Also:
ComponentDependencyRegistry.FILENAME
-
contains
public boolean contains(java.lang.String className)
Description copied from interface:ComponentDependencyRegistryTells whether this registry already contans a given class name.- Specified by:
containsin interfaceComponentDependencyRegistry
-
getClassNames
public java.util.Set<java.lang.String> getClassNames()
Description copied from interface:ComponentDependencyRegistryReturns the set of all class names in the registry.- Specified by:
getClassNamesin interfaceComponentDependencyRegistry
-
getRootClasses
public java.util.Set<java.lang.String> getRootClasses()
Description copied from interface:ComponentDependencyRegistryReturns the set of all root classes (i.e. ones with no dependencies).- Specified by:
getRootClassesin interfaceComponentDependencyRegistry
-
isStoredDependencyInformationPresent
public boolean isStoredDependencyInformationPresent()
Description copied from interface:ComponentDependencyRegistryReturns whether stored dependency information is present.- Specified by:
isStoredDependencyInformationPresentin interfaceComponentDependencyRegistry
-
disableInvalidations
public void disableInvalidations()
Description copied from interface:ComponentDependencyRegistryTells this service to ignore invalidations in this thread.- Specified by:
disableInvalidationsin interfaceComponentDependencyRegistry
-
enableInvalidations
public void enableInvalidations()
Description copied from interface:ComponentDependencyRegistryTells this service to stop ignoring invalidations in this thread.- Specified by:
enableInvalidationsin interfaceComponentDependencyRegistry
-
-