|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Organizes different libraries of Tapestry pages, components and services into "frameworks", used to disambiguate names.
Tapestry release 3.0 includes dynamic discovery of pages and components; an application or library may contain a page or component that won't be "known" until the name is resolved (because it involves searching for a particular named file).
PageSpecificationResolver
,
ComponentSpecificationResolver
Field Summary | |
static String |
FRAMEWORK_NAMESPACE
Reserved name of a the implicit Framework library. |
static char |
SEPARATOR
Character used to seperate the namespace prefix from the page name or component type. |
Method Summary | |
String |
constructQualifiedName(String pageName)
Constructs a qualified name for the given simple page name by applying the correct prefix (if any). |
boolean |
containsComponentType(String type)
Returns true if the namespace contains the indicated component type. |
boolean |
containsPage(String name)
Returns true if this namespace contains the specified page name. |
List |
getChildIds()
Returns a sorted, immutable list of the ids of the immediate children of this namespace. |
INamespace |
getChildNamespace(String id)
Returns a namespace contained by this namespace. |
IComponentSpecification |
getComponentSpecification(String type)
Returns the path for the named component (within the namespace). |
List |
getComponentTypes()
Returns a sorted list of component types. |
String |
getExtendedId()
Returns the extended id for this namespace, which is a dot-seperated sequence of ids. |
String |
getId()
Returns an identifier for the namespace. |
String |
getNamespaceId()
Returns a version of the extended id appropriate for error messages. |
List |
getPageNames()
Returns a sorted list of page names. |
IComponentSpecification |
getPageSpecification(String name)
Returns the page specification of the named page (defined within the namespace). |
INamespace |
getParentNamespace()
Returns the parent namespace; the namespace which contains this namespace. |
String |
getServiceClassName(String name)
Returns the class name of a service provided by the namespace. |
List |
getServiceNames()
Returns the names of all services provided by the namespace, as a sorted, immutable list. |
ILibrarySpecification |
getSpecification()
Returns the LibrarySpecification from which
this namespace was created. |
IResourceLocation |
getSpecificationLocation()
Returns the location of the resource from which the specification for this namespace was read. |
void |
installComponentSpecification(String type,
IComponentSpecification specification)
Used to specify additional components beyond those that came from the namespace's specification. |
void |
installPageSpecification(String pageName,
IComponentSpecification specification)
Used to specify additional pages beyond those that came from the namespace's specification. |
boolean |
isApplicationNamespace()
Returns true if the namespace is the special application namespace (which has special search rules for handling undeclared pages and components). |
Methods inherited from interface org.apache.tapestry.ILocatable |
getLocation |
Field Detail |
public static final String FRAMEWORK_NAMESPACE
public static final char SEPARATOR
Method Detail |
public String getId()
The application namespace has a null id; the framework namespace has an id of "framework".
public String getExtendedId()
public String getNamespaceId()
getExtendedId()
, unless this is the
application or framework namespace, in which case
special strings are returned.public INamespace getParentNamespace()
The application and framework namespaces return null as the parent.
public INamespace getChildNamespace(String id)
id
- either a simple name (of a directly contained namespace),
or a dot-seperarated name sequence.ApplicationRuntimeException
- if no such namespace exist.public List getChildIds()
public IComponentSpecification getPageSpecification(String name)
name
- the name of the pageApplicationRuntimeException
- if the page specification
doesn't exist or can't be loadedpublic boolean containsPage(String name)
public List getPageNames()
public IComponentSpecification getComponentSpecification(String type)
alias
- the component aliasApplicationRuntimeException
- if the specification
doesn't exist or can't be loadedpublic boolean containsComponentType(String type)
type
- a simple component type (no namespace prefix is allowed)public List getComponentTypes()
Is this method even needed?
public String getServiceClassName(String name)
name
- the name of the service.public List getServiceNames()
public ILibrarySpecification getSpecification()
LibrarySpecification
from which
this namespace was created.public String constructQualifiedName(String pageName)
public IResourceLocation getSpecificationLocation()
public boolean isApplicationNamespace()
public void installPageSpecification(String pageName, IComponentSpecification specification)
public void installComponentSpecification(String type, IComponentSpecification specification)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |