Class PageTesterContext
- java.lang.Object
- 
- org.apache.tapestry5.internal.test.PageTesterContext
 
- 
- All Implemented Interfaces:
- Context
 
 public class PageTesterContext extends java.lang.Object implements Context 
- 
- 
Constructor SummaryConstructors Constructor Description PageTesterContext(java.lang.String contextRoot)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAttribute(java.lang.String name)Returns an attribute previously stored into the context with the given name.java.util.List<java.lang.String>getAttributeNames()Returns the names of all attributes of the context, sorted alphabetically.java.lang.StringgetInitParameter(java.lang.String name)Returns an initial parameter value defined by servlet.java.lang.StringgetMimeType(java.lang.String file)Returns the MIME content type of the specified file, or null if no content type is known.java.io.FilegetRealFile(java.lang.String path)Always returns null.java.net.URLgetResource(java.lang.String path)Returns a URL to a resource stored within the context.java.util.List<java.lang.String>getResourcePaths(java.lang.String path)Looks for resources within the web application within the supplied path.
 
- 
- 
- 
Constructor Detail- 
PageTesterContextpublic PageTesterContext(java.lang.String contextRoot) 
 
- 
 - 
Method Detail- 
getInitParameterpublic java.lang.String getInitParameter(java.lang.String name) Description copied from interface:ContextReturns an initial parameter value defined by servlet.- Specified by:
- getInitParameterin interface- Context
 
 - 
getResourcepublic java.net.URL getResource(java.lang.String path) Description copied from interface:ContextReturns a URL to a resource stored within the context. The path should start with a leading slash.- Specified by:
- getResourcein interface- Context
- Parameters:
- path- to the resource (with a leading slash)
- Returns:
- the URL for the path, or null if the path does not correspond to a file.
 
 - 
getResourcePathspublic java.util.List<java.lang.String> getResourcePaths(java.lang.String path) Description copied from interface:ContextLooks for resources within the web application within the supplied path. The list will be recurively expanded, as necessary. The path must start with a leading slash, and usually ends with a slash as well.- Specified by:
- getResourcePathsin interface- Context
- Parameters:
- path- to search for (should start with a leading slash)
- Returns:
- the matches, sorted alphabetically
 
 - 
getAttributepublic java.lang.Object getAttribute(java.lang.String name) Description copied from interface:ContextReturns an attribute previously stored into the context with the given name.- Specified by:
- getAttributein interface- Context
- Parameters:
- name- used to retrieve the attribute
- Returns:
- the attribute, or null if not found
 
 - 
getAttributeNamespublic java.util.List<java.lang.String> getAttributeNames() Description copied from interface:ContextReturns the names of all attributes of the context, sorted alphabetically.- Specified by:
- getAttributeNamesin interface- Context
 
 - 
getMimeTypepublic java.lang.String getMimeType(java.lang.String file) Description copied from interface:ContextReturns the MIME content type of the specified file, or null if no content type is known. MIME types are built-in to servlet containers and may be futher specified via the web application deployment descriptor.- Specified by:
- getMimeTypein interface- Context
- Parameters:
- file- name of file
- Returns:
- the presumed MIME content type, or null if not known
 
 - 
getRealFilepublic java.io.File getRealFile(java.lang.String path) Always returns null.- Specified by:
- getRealFilein interface- Context
- Parameters:
- path- to the resource (with a leading slash)
- Returns:
- the underlying File, or null if no such file
 
 
- 
 
-