com.pepper.platform.page
Class ProxyPage
java.lang.Object
com.pepper.platform.page.PepperPage
com.pepper.platform.page.SectionPage
com.pepper.platform.page.ProxyPage
- All Implemented Interfaces:
- Page
public class ProxyPage
- extends SectionPage
Pepper Page that acts as a proxy to another page. Doesn't maintain live
data; instead sources the data from another page.
Now holds a copy of the data so it can be operated on
TODO: detect if data is stale and renew it
Extends SectionPage because this was written for the Mail package's
settings page, which has to be a section for the time being. Otherwise
it'd be just another page.
Fields inherited from class com.pepper.platform.page.PepperPage |
log |
Method Summary |
org.jdom.Document |
getPageData()
Override default behavior to query targetPackageID for the
page targetPageID using PackageLocator/PackageInstance. |
void |
save()
Override the save method to update the page via the target package |
void |
setPageData(org.jdom.Document doc)
Override default behavior to update the target page's data. |
Methods inherited from class com.pepper.platform.page.SectionPage |
addPage, addSessionEntry, containsPackages, containsPages, findElementPosition, findFiles, findPackages, findPackages, getHomepageList, getPackageId, getPageList, getPositionAndName, moveElement, moveElement, remove, remove, remove, removeAllSessions, removePage, removePage, removeSessionDate, removeSessionEntry, removeSessionHost, reorderPackage, reorderPage, reorderPagePackageElement, setPackageAttr, updateSessionEntry |
Methods inherited from class com.pepper.platform.page.PepperPage |
exists, getBackup, getBaseDir, getCreateDate, getDefaultType, getForceAutoSave, getId, getLastSaveTime, getName, getNoCache, getPackageName, getPackageVersion, getProcessBody, getRootAttrValue, getSupportedPageTypes, getTemplate, getType, isAutoSaveEnabled, isDeletable, isHidden, isLoaded, isPageTypeSupported, isReadOnly, isSecure, load, setAutoSaveEnabled, setBackup, setBaseDir, setClassLoader, setDefaultType, setDeletable, setForceAutoSave, setHidden, setId, setLastSaveTime, setName, setNoCache, setPackageName, setPackageVersion, setProcessBody, setReadOnly, setSecure, setSupportedPageTypes, setTemplate, setTemplateOverride, setType, toString, unload |
ProxyPage
public ProxyPage(String packageID,
String pageID,
String targetPackageType,
String targetPageID)
- Default constructor.
- Parameters:
packageID
- ID of the package this page is inpageID
- ID of this pagetargetPackageType
- Type of the package to load the page from,
as defined in the package's PPLDtargetPageID
- Page in targetPackageID
to load
getPageData
public org.jdom.Document getPageData()
- Override default behavior to query
targetPackageID
for the
page targetPageID
using PackageLocator/PackageInstance.
Note: this holds a copy of the page data
if the target package updates the page we will have a stale copy
- Specified by:
getPageData
in interface Page
- Overrides:
getPageData
in class PepperPage
- Returns:
- Document
- See Also:
Page
setPageData
public void setPageData(org.jdom.Document doc)
- Override default behavior to update the target page's data.
- Specified by:
setPageData
in interface Page
- Overrides:
setPageData
in class PepperPage
- Parameters:
doc
- Page data- See Also:
Page
save
public void save()
throws Exception
- Override the save method to update the page via the target package
- Specified by:
save
in interface Page
- Overrides:
save
in class SectionPage
- Throws:
Exception
- if a low-level error occurrs.- See Also:
Page
Copyright © 2006-2007 Pepper Computer, Inc. All Rights Reserved.