public class PageInstance extends Object
A PageInstance is the realization of a Portofino page on permanent storage (page.xml + configuration.xml +
action.groovy) into a live object in the context of a single http request.
A PageInstance includes the parameters extracted from the decomposition of the URL in a sequence of
fragments (not to be confused with query string parameters).
Modifier and Type | Field and Description |
---|---|
protected PageAction |
actionBean |
protected Class<? extends PageAction> |
actionClass |
protected Object |
configuration |
protected String |
description |
static String |
DETAIL |
protected File |
directory |
static org.slf4j.Logger |
logger |
protected Page |
page |
protected List<String> |
parameters |
protected PageInstance |
parent |
protected boolean |
prepared |
protected String |
title |
Constructor and Description |
---|
PageInstance(PageInstance parent,
File directory,
Page page,
Class<? extends PageAction> actionClass) |
Modifier and Type | Method and Description |
---|---|
PageInstance |
copy() |
PageAction |
getActionBean()
Returns an object that implements this page.
|
Class<? extends PageAction> |
getActionClass()
Returns the class that implements this page.
|
Page |
getChildPage(String name) |
File |
getChildPageDirectory(String name) |
File |
getChildrenDirectory() |
Object |
getConfiguration()
Returns the configuration object for this page.
|
String |
getDescription() |
File |
getDirectory()
Returns the directory from which this page was loaded.
|
Layout |
getLayout()
Returns the layout that drives the display of the embedded children of this page.
|
String |
getName() |
Page |
getPage() |
List<String> |
getParameters()
Returns the parameters extracted from the URL for this page.
|
PageInstance |
getParent()
Returns the page instance that precedes this one in the path, or null if this is an instance of the root page.
|
String |
getPath()
Reconstructs the URL path to this PageInstance from the root of the application (not including the
webapp's context path).
|
String |
getTitle() |
String |
getUrlFragment()
Returns the portion of the URL that identifies this PageInstance, including any parameters.
|
boolean |
isPrepared() |
void |
setActionBean(PageAction actionBean) |
void |
setConfiguration(Object configuration) |
void |
setDescription(String description) |
void |
setLayout(Layout layout)
Sets the layout that drives the display of the embedded children of this page.
|
void |
setPrepared(boolean prepared) |
void |
setTitle(String title) |
protected final Page page
protected final File directory
protected final PageInstance parent
protected final Class<? extends PageAction> actionClass
protected Object configuration
protected PageAction actionBean
protected String title
protected String description
protected boolean prepared
public static final String DETAIL
public static final org.slf4j.Logger logger
public PageInstance(PageInstance parent, File directory, Page page, Class<? extends PageAction> actionClass)
public PageInstance copy()
public Page getPage()
public String getUrlFragment()
public String getPath()
public File getDirectory()
public List<String> getParameters()
public Object getConfiguration()
public void setConfiguration(Object configuration)
public Class<? extends PageAction> getActionClass()
public PageAction getActionBean()
getActionClass()
public void setActionBean(PageAction actionBean)
public PageInstance getParent()
public Layout getLayout()
public void setLayout(Layout layout)
layout
- the new layout.public File getChildrenDirectory()
public String getName()
public String getTitle()
public void setTitle(String title)
public String getDescription()
public void setDescription(String description)
public boolean isPrepared()
public void setPrepared(boolean prepared)