|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Page
An interface used by packages and the binder to access and pass around package-specific XML data.
Method Summary | |
---|---|
boolean |
exists()
Returns true if the Page exists
either in the original jar file or on disk |
boolean |
getBackup()
Returns true if the Page is marked to
for backup. |
File |
getBaseDir()
Returns the base directory used when constructing absolute paths from a Page's name. |
Date |
getCreateDate()
Returns the page's create date. |
String |
getDefaultType()
Returns the defaultPageType of this page, usually a section. |
boolean |
getForceAutoSave()
Get the state of the forceAutoSave flag. |
String |
getId()
Returns the id of this Page . |
long |
getLastSaveTime()
Gets the timestamp that the Page was last saved via the save() method. |
String |
getName()
Returns the name of this Page . |
int |
getNoCache()
Get the value which controls how the page will be redisplayed when it has been previously loaded into a tab. |
String |
getPackageName()
Returns the package name of this Page . |
String |
getPackageVersion()
Returns the package version of this Page . |
org.jdom.Document |
getPageData()
Returns the application specific XML page data. |
String |
getRootAttrValue(String attrName)
Returns the value of the specified attribute on the root element (ie page, section) in the document |
List |
getSupportedPageTypes()
Returns a list of supported page types that this page may contain. |
String |
getTemplate()
Returns the XSLT template of this Page . |
String |
getType()
Returns the type of this page. |
boolean |
isAutoSaveEnabled()
Returns true if the Page has autoSave enabled. |
boolean |
isDeletable()
Returns true if the Page is marked as
deletable. |
boolean |
isHidden()
Returns true if the Page is marked as
hidden. |
boolean |
isLoaded()
Returns true if the Page has been
loaded from disk, or has had it's XML page data set directly
by a call to setPageData() . |
boolean |
isPageTypeSupported(String pageType)
Indicates whether the specified page type may be contained by this page. |
boolean |
isReadOnly()
Returns true if the Page is marked as
read-only. |
boolean |
isSecure()
Returns true if the Page is marked as
secure. |
org.jdom.Document |
load()
Loads the Page from disk. |
void |
save()
Causes the Page to be serialized to disk. |
void |
setAutoSaveEnabled(boolean autoSaveEnabled)
Sets the state of the autoStateEnabled flag |
void |
setBackup(boolean backup)
Sets or clears the backup attribute. |
void |
setBaseDir(String baseDir)
Sets the base directory used when constructing absolute paths from a Page's name. |
void |
setClassLoader(ClassLoader cl)
Sets the class loader of this page. |
void |
setDeletable(boolean isDeletable)
Sets or clears the deletable attribute. |
void |
setForceAutoSave(boolean state)
If true, this will force the auto save and program framework to save the page the next time such an event is triggered, regardless if other criteria (such as modified components) is met or not. |
void |
setHidden(boolean isHidden)
Sets or clears the hidden attribute. |
void |
setId(String id)
Sets the id of this Page . |
void |
setLastSaveTime(long time)
Sets the timestamp when the page was last saved. |
void |
setName(String name)
Sets the name of this Page . |
void |
setNoCache(int options)
Set the value which controls how the page will be redisplayed when it has been previously loaded into a tab. |
void |
setPackageName(String name)
Sets the package name of this Page . |
void |
setPackageVersion(String version)
Sets the package version of this Page . |
void |
setPageData(org.jdom.Document pageData)
Sets the application specific XML page data. |
void |
setReadOnly(boolean isReadOnly)
Sets or clears the read-only attribute. |
void |
setSecure(boolean isSecure)
Sets or clears the secure attribute. |
void |
setSupportedPageTypes(List supportedPageTypes)
Sets the supported page types this page may contain. |
void |
setTemplate(String template)
Sets the XSLT template of this Page . |
void |
setTemplateOverride(String template)
Sets a temporary template that overrides the value found in the Page. |
void |
setType(String type)
Sets the type element of this page. |
void |
unload()
Causes the page to unload it's page data so that it can be freed during GC. |
Method Detail |
---|
boolean exists()
Page
exists
either in the original jar file or on disk
boolean getBackup()
true
if the Page
is marked to
for backup.
boolean
indicating whether or not the
Page
should be backed up.File getBaseDir()
Page's
name.
File
object which points at the current
Page's
base directory.Date getCreateDate()
Date
specifying the create
date of the page.String getId()
id
of this Page
. In
serialized form, the id
is stored as an attribute
of the top-level element of the page data.
String
containing the Page's id.long getLastSaveTime()
long
valuevoid setLastSaveTime(long time)
time
- a long
valueString getName()
name
of this Page
. In serialized
form, the name
is stored as an attribute of the top-level
element of the page data.
String
containing the Page's name.String getPackageName()
Page
.
String
containing the package name.String getPackageVersion()
Page
.
String
containing the version.org.jdom.Document getPageData()
Document
containing the
application-specific XML page data. The
Document
returned is a live
document, and changes made to it will be
reflected in the Page's
copy.String getRootAttrValue(String attrName)
String getTemplate()
Page
.
String
containing the relative
path of the template.String getType()
type
of this page. In serialized form,
type
is stored as an attribute of the top-level
element of the page data.
String
containing the value of the root
element's type attribute, or null
if the
the root element does not contain a type attribute.String getDefaultType()
defaultPageType
of this page, usually a section.
String
containing the defaultPageTypeList getSupportedPageTypes()
List
containing the page types
this page may contain.boolean isAutoSaveEnabled()
boolean
valueboolean isDeletable()
true
if the Page
is marked as
deletable. This indicates that the Page
can be deleted.
boolean
indicating whether or not the
Page
is deletable.boolean isLoaded()
true
if the Page
has been
loaded from disk, or has had it's XML page data set directly
by a call to setPageData()
.
boolean
indicating whether or not the
Page's
XML page data has been loaded.boolean isPageTypeSupported(String pageType)
pageType
- a String
containing the
specified page type.boolean isReadOnly()
true
if the Page
is marked as
read-only. This indicates that the Page
should not be modified. If save()
is called
on a page marked as read-only, the page will only be
saved if it does not yet exist on disk; all subsequent
save()
calls are no-ops.
boolean
indicating whether or not the
Page
is read-only.boolean isHidden()
true
if the Page
is marked as
hidden. This indicates that the Page
should never be shown
boolean
indicating whether or not the
Page
is hidden.boolean isSecure()
true
if the Page
is marked as
secure. This indicates that the Page
<body> will be encrypted when saved to disk.
boolean
indicating whether or not the
Page
is secure.org.jdom.Document load() throws Exception
Page
from disk.
Page's
page data JDOM
Document
, or null
if the
page has not yet been loaded.
Exception
- if the page data is corrupted, or if the file
cannot be read from disk.void save() throws Exception
Page
to be serialized to disk. Any
elements with encrypt=true
attributes are encrypted,
and any elements with index=true
attributes are
indexed. The result is written to name.xml.
Exception
- if the Page
cannot be saved to disk.void setAutoSaveEnabled(boolean autoSaveEnabled)
autoSaveEnabled
- a boolean
valuevoid setBackup(boolean backup)
backup
- a boolean
indicating whether
or not the page should be automatically backed up to a .bak file.void setBaseDir(String baseDir)
Page's
name.
baseDir
- String representing the base directoryvoid setClassLoader(ClassLoader cl)
cl
- a ClassLoader
instance.void setDeletable(boolean isDeletable)
isDeletable
- a boolean
indicating whether
or not the page is deletable.void setId(String id)
id
of this Page
. In serialized
form, the id
is stored as an attribute of the top-level
element of the page data.
id
- a String
containing the id of the
page; id is also used as the relative path of the
serialized page on disk.void setName(String name)
name
of this Page
. In serialized
form, the name
is stored as an attribute of the top-level
element of the page data.
name
- a String
containing the name.void setPackageName(String name)
Page
.
name
- a String
containing the package name.void setPackageVersion(String version)
Page
.
version
- a String
containing the name.void setPageData(org.jdom.Document pageData)
pageData
- a JDOM Document
containing
the application specific XML page data. The Page
keeps a live reference to this Document
;
it is not copied.void setReadOnly(boolean isReadOnly)
true
, then this Page
will only be
saved to disk once, if it does not yet exist. Subsquent
calls to save()
will do nothing.
isReadOnly
- a boolean
indicating whether
or not the page is read-only.void setHidden(boolean isHidden)
isHidden
- a boolean
indicating whether
or not the page is hidden.void setSecure(boolean isSecure)
true
, then the <body> of this page
will be encrypted before it is written to disk.
isSecure
- a boolean
indicating whether
or not the page is secure.void setSupportedPageTypes(List supportedPageTypes)
supportedPageTypes
- a List
containing the
the page types supported by this page.void setTemplate(String template)
Page
.
template
- a String
containing the
the relative path of the page template.void setTemplateOverride(String template)
template
- a String
containing the
the relative path of the page template.void setType(String type)
type
element of this page. In serialized form,
type
is stored as an attribute of the top-level
element of the page data.
type
- a String
containing the the page type.void unload()
boolean getForceAutoSave()
boolean
valuevoid setForceAutoSave(boolean state)
state
- a boolean
valueint getNoCache()
void setNoCache(int options)
options
- an int
value
0 = always use cached version of page if page not modified (default),
1 = never use cached version of page, force reload on display
2 = force re-init of JavaScript bridge on page display
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |