|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INamespace
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 |
---|
static final String FRAMEWORK_NAMESPACE
static final char SEPARATOR
Method Detail |
---|
String getId()
The application namespace has a null id; the framework namespace has an id of "framework".
String getExtendedId()
String getNamespaceId()
getExtendedId()
, unless this is the
application or framework namespace, in which case
special strings are returned.
INamespace getParentNamespace()
The application and framework namespaces return null as the parent.
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.List getChildIds()
IComponentSpecification getPageSpecification(String name)
name
- the name of the page
ApplicationRuntimeException
- if the page specification
doesn't exist or can't be loadedboolean containsPage(String name)
List getPageNames()
IComponentSpecification getComponentSpecification(String type)
type
- the component alias
ApplicationRuntimeException
- if the specification
doesn't exist or can't be loadedboolean containsComponentType(String type)
type
- a simple component type (no namespace prefix is allowed)List getComponentTypes()
Is this method even needed?
String getServiceClassName(String name)
name
- the name of the service.
List getServiceNames()
ILibrarySpecification getSpecification()
LibrarySpecification
from which
this namespace was created.
String constructQualifiedName(String pageName)
IResourceLocation getSpecificationLocation()
boolean isApplicationNamespace()
void installPageSpecification(String pageName, IComponentSpecification specification)
void installComponentSpecification(String type, IComponentSpecification specification)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |