Class PageTesterContext
-
- org.apache.tapestry5.internal.test.PageTesterContext
-
- All Implemented Interfaces:
Context
public class PageTesterContext extends implements Context
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description name)
Returns an attribute previously stored into the context with the given name.<>
getAttributeNames()
Returns the names of all attributes of the context, sorted alphabetically.name)
Returns an initial parameter value defined by servlet.file)
Returns the MIME content type of the specified file, or null if no content type is known.path)
Always returns null.path)
Returns a URL to a resource stored within the context.<>
path)
Looks for resources within the web application within the supplied path.
-
-
-
Method Detail
-
getInitParameter
public name)
Description copied from interface:Context
Returns an initial parameter value defined by servlet.- Specified by:
getInitParameter
in interfaceContext
-
getResource
public path)
Description copied from interface:Context
Returns a URL to a resource stored within the context. The path should start with a leading slash.- Specified by:
getResource
in interfaceContext
- 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.
-
getResourcePaths
public <> path)
Description copied from interface:Context
Looks 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:
getResourcePaths
in interfaceContext
- Parameters:
path
- to search for (should start with a leading slash)- Returns:
- the matches, sorted alphabetically
-
getAttribute
public name)
Description copied from interface:Context
Returns an attribute previously stored into the context with the given name.- Specified by:
getAttribute
in interfaceContext
- Parameters:
name
- used to retrieve the attribute- Returns:
- the attribute, or null if not found
-
getAttributeNames
public <> getAttributeNames()
Description copied from interface:Context
Returns the names of all attributes of the context, sorted alphabetically.- Specified by:
getAttributeNames
in interfaceContext
-
getMimeType
public file)
Description copied from interface:Context
Returns 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:
getMimeType
in interfaceContext
- Parameters:
file
- name of file- Returns:
- the presumed MIME content type, or null if not known
-
getRealFile
public path)
Always returns null.- Specified by:
getRealFile
in interfaceContext
- Parameters:
path
- to the resource (with a leading slash)- Returns:
- the underlying File, or null if no such file
-
-