|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tapestry.engine.Namespace
public class Namespace
Implementation of INamespace
that works with a ISpecificationSource to
obtain page and component specifications as needed.
| Field Summary |
|---|
| Fields inherited from interface org.apache.tapestry.INamespace |
|---|
FRAMEWORK_NAMESPACE, SEPARATOR |
| Constructor Summary | |
|---|---|
Namespace(String id,
INamespace parent,
ILibrarySpecification specification,
ISpecificationSource specificationSource)
|
|
| 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 alias)
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. |
ILocation |
getLocation()
Returns the location from which
this object orginates, or null if not known. |
String |
getNamespaceId()
Returns a string identifying the namespace, for use in 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). |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Namespace(String id,
INamespace parent,
ILibrarySpecification specification,
ISpecificationSource specificationSource)
| Method Detail |
|---|
public String toString()
toString in class Objectpublic String getId()
INamespaceThe application namespace has a null id; the framework namespace has an id of "framework".
getId in interface INamespacepublic String getExtendedId()
INamespace
getExtendedId in interface INamespacepublic INamespace getParentNamespace()
INamespaceThe application and framework namespaces return null as the parent.
getParentNamespace in interface INamespacepublic INamespace getChildNamespace(String id)
INamespace
getChildNamespace in interface INamespaceid - either a simple name (of a directly contained namespace),
or a dot-seperarated name sequence.
public List getChildIds()
INamespace
getChildIds in interface INamespacepublic IComponentSpecification getPageSpecification(String name)
INamespace
getPageSpecification in interface INamespacename - the name of the page
public List getPageNames()
INamespace
getPageNames in interface INamespacepublic IComponentSpecification getComponentSpecification(String alias)
INamespace
getComponentSpecification in interface INamespacealias - the component alias
public String getServiceClassName(String name)
INamespace
getServiceClassName in interface INamespacename - the name of the service.
public List getServiceNames()
INamespace
getServiceNames in interface INamespacepublic ILibrarySpecification getSpecification()
INamespaceLibrarySpecification from which
this namespace was created.
getSpecification in interface INamespacepublic String getNamespaceId()
getNamespaceId in interface INamespacepublic boolean containsPage(String name)
INamespace
containsPage in interface INamespacepublic String constructQualifiedName(String pageName)
INamespace
constructQualifiedName in interface INamespacepublic IResourceLocation getSpecificationLocation()
INamespace
getSpecificationLocation in interface INamespacepublic boolean isApplicationNamespace()
INamespace
isApplicationNamespace in interface INamespace
public void installPageSpecification(String pageName,
IComponentSpecification specification)
INamespace
installPageSpecification in interface INamespace
public void installComponentSpecification(String type,
IComponentSpecification specification)
INamespace
installComponentSpecification in interface INamespacepublic boolean containsComponentType(String type)
INamespace
containsComponentType in interface INamespacetype - a simple component type (no namespace prefix is allowed)public List getComponentTypes()
INamespaceIs this method even needed?
getComponentTypes in interface INamespacepublic ILocation getLocation()
ILocatablelocation from which
this object orginates, or null if not known.
getLocation in interface ILocatable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||