|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.services.ComponentClassResolverImpl
public class ComponentClassResolverImpl
Constructor Summary | |
---|---|
ComponentClassResolverImpl(org.slf4j.Logger logger,
ClassNameLocator classNameLocator,
String startPageName,
Collection<LibraryMapping> mappings)
|
Method Summary | |
---|---|
String |
canonicalizePageName(String pageName)
Returns the canonical form of a page name. |
Map<String,ControlledPackageType> |
getControlledPackageMapping()
Used to identify which packages are controlled packages (from which components are loaded). |
Map<String,String> |
getFolderToPackageMapping()
A mapping from virtual folder name to a package name (used for converting classpath Asset s
to client URLs). |
List<String> |
getPageNames()
Returns a list of all page names, in sorted order. |
boolean |
isPage(String pageClassName)
Returns true if the class name is specifically a page class, and not a component, mixin or base class. |
boolean |
isPageName(String pageName)
For a particular path, determines if the path is a logical page name. |
void |
objectWasInvalidated()
When the class loader is invalidated, clear any cached page names or component types. |
String |
resolveComponentTypeToClassName(String componentType)
Converts a component type (a logical component name such as might be used inside a template or annotation) into a fully qualified class name. |
String |
resolveMixinTypeToClassName(String mixinType)
Converts a logical mixin type (as with component types) into a fully qualified class name. |
String |
resolvePageClassNameToPageName(String pageClassName)
Converts a fully qualified page class name into a page name (often, for inclusion as part of the URI). |
String |
resolvePageNameToClassName(String pageName)
Converts a logical page name (such as might be encoded into a URL) into a fully qualified class name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentClassResolverImpl(org.slf4j.Logger logger, ClassNameLocator classNameLocator, @Symbol(value="tapestry.start-page-name") String startPageName, Collection<LibraryMapping> mappings)
Method Detail |
---|
public Map<String,ControlledPackageType> getControlledPackageMapping()
ComponentClassResolver
getControlledPackageMapping
in interface ComponentClassResolver
ControlledPackageType
.public void objectWasInvalidated()
objectWasInvalidated
in interface InvalidationListener
public String resolvePageNameToClassName(String pageName)
ComponentClassResolver
resolvePageNameToClassName
in interface ComponentClassResolver
pageName
- page name
public boolean isPageName(String pageName)
ComponentClassResolver
isPageName
in interface ComponentClassResolver
pageName
- potential logical page name
public boolean isPage(String pageClassName)
ComponentClassResolver
isPage
in interface ComponentClassResolver
public List<String> getPageNames()
ComponentClassResolver
getPageNames
in interface ComponentClassResolver
public String resolveComponentTypeToClassName(String componentType)
ComponentClassResolver
resolveComponentTypeToClassName
in interface ComponentClassResolver
componentType
- a logical component type
public String resolveMixinTypeToClassName(String mixinType)
ComponentClassResolver
resolveMixinTypeToClassName
in interface ComponentClassResolver
mixinType
- a logical mixin type
public String resolvePageClassNameToPageName(String pageClassName)
ComponentClassResolver
ComponentClassResolver.resolvePageNameToClassName(String)
.
resolvePageClassNameToPageName
in interface ComponentClassResolver
pageClassName
- fully qualified name of a page class
public String canonicalizePageName(String pageName)
ComponentClassResolver
canonicalizePageName
in interface ComponentClassResolver
public Map<String,String> getFolderToPackageMapping()
ComponentClassResolver
Asset
s
to client URLs). This is derived from the contributed LibraryMapping
s.
It is allowed to contribute multiple root packages as a single folder name. In this case, the best common package
name is used. For example, if both com.example.main
and com.example.extras
is mapped to
folder "example", then the package mapping for "example" will be com.example
.
getFolderToPackageMapping
in interface ComponentClassResolver
ClasspathAssetAliasManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |