org.apache.jetspeed.om.page
Class ContentPageImpl

java.lang.Object
  extended by org.apache.jetspeed.om.page.ContentPageImpl
All Implemented Interfaces:
java.io.Serializable, SecuredResource, BaseElement, ContentPage, Document, Page, Node

public class ContentPageImpl
extends java.lang.Object
implements ContentPage

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jetspeed.om.page.Page
DOCUMENT_TYPE
 
Fields inherited from interface org.apache.jetspeed.page.document.Node
PATH_SEPARATOR, PATH_SEPARATOR_CHAR
 
Constructor Summary
ContentPageImpl(Page page)
           
 
Method Summary
 void checkAccess(java.lang.String actions)
           checkAccess
 void checkConstraints(java.lang.String actions)
           checkConstraints
 void checkPermissions(int mask)
           checkPermissions
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 ContentFragment getContentFragmentById(java.lang.String id)
          Returns a ContentFragment that wraps the actual Fragment metadata represented by the id argument.
 java.util.List getContentFragmentsByName(java.lang.String name)
          Returns a list of ContentFragment that wrap the actual Fragment metadata represented by the name argument.
 java.lang.String getDefaultDecorator(java.lang.String fragmentType)
          Returns the name of the default decorator that applies in this page to fragments of the specified type
 java.lang.String getEffectiveDefaultDecorator(java.lang.String fragmentType)
          Returns the name of the default decorator as set here or in parent folders that applies in this page to fragments of the specified type.
 Fragment getFragmentById(java.lang.String id)
          Overridden to to indicate that the Fragment returned must also be an instance of ContentFragment.
 java.util.List getFragmentsByName(java.lang.String name)
          Overridden to to indicate that the list of Fragment instances returned must also be instances of ContentFragment.
 java.lang.String getId()
          Returns the unique Id of this element.
 java.util.List getMenuDefinitions()
          getMenuDefinitions - get list of menu definitions
 GenericMetadata getMetadata()
           getMetadata
 java.lang.String getName()
           getName
 Page getPage()
          getPage - access wrapped page
 Node getParent()
           getParent
 java.lang.String getPath()
           getPath
 boolean getPermissionsEnabled()
           getPermissionsEnabled
 ContentFragment getRootContentFragment()
          Provides access to a per-request safe ContentFragment.
 Fragment getRootFragment()
          Overridden to to indicate that the Fragment returned must also be an instance of ContentFragment.
 SecurityConstraints getSecurityConstraints()
           getSecurityConstraints
 java.lang.String getShortTitle()
          Returns the short title in the default Locale
 java.lang.String getShortTitle(java.util.Locale locale)
           getShortTitle
 java.lang.String getSkin()
          Returns the name of the default skin that applies to this page.
 java.lang.String getTitle()
          Returns the title in the default Locale
 java.lang.String getTitle(java.util.Locale locale)
           getTitle
 java.lang.String getType()
           getType
 java.lang.String getUrl()
           getUrl
 java.lang.String getVersion()
          Gets the version number
 boolean isDirty()
           isDirty
 boolean isHidden()
           isHidden
 MenuDefinition newMenuDefinition()
          newMenuDefinition - creates a new empty menu definition
 MenuExcludeDefinition newMenuExcludeDefinition()
          newMenuExcludeDefinition - creates a new empty menu exclude definition
 MenuIncludeDefinition newMenuIncludeDefinition()
          newMenuIncludeDefinition - creates a new empty menu include definition
 MenuOptionsDefinition newMenuOptionsDefinition()
          newMenuOptionsDefinition - creates a new empty menu options definition
 MenuSeparatorDefinition newMenuSeparatorDefinition()
          newMenuSeparatorDefinition - creates a new empty menu separator definition
 SecurityConstraint newSecurityConstraint()
           newSecurityConstraint
 SecurityConstraints newSecurityConstraints()
           newSecurityConstraints
 Fragment removeFragmentById(java.lang.String id)
          Removes the fragment contained within this page, with the specified Id.
 void setDefaultDecorator(java.lang.String decoratorName, java.lang.String fragmentType)
          Modifies the default decorator for the specified fragment type.
 void setDirty(boolean dirty)
           setDirty
 void setHidden(boolean hidden)
           setHidden
 void setMenuDefinitions(java.util.List definitions)
          setMenuDefinitions - set list of menu definitions
 void setParent(Node parent)
           setParent
 void setPath(java.lang.String path)
           setPath
 void setRootContentFragment(ContentFragment frag)
           
 void setRootFragment(Fragment fragment)
          Sets the top level fragment of this page.
 void setSecurityConstraints(SecurityConstraints constraints)
           setSecurityConstraints
 void setShortTitle(java.lang.String title)
          Sets the short title for the default Locale
 void setSkin(java.lang.String skinName)
          Modifies the skin for this page.
 void setTitle(java.lang.String title)
          Sets the title for the default Locale
 void setVersion(java.lang.String version)
          Sets the version number
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentPageImpl

public ContentPageImpl(Page page)
Method Detail

setRootContentFragment

public void setRootContentFragment(ContentFragment frag)
Specified by:
setRootContentFragment in interface ContentPage

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getContentFragmentById

public ContentFragment getContentFragmentById(java.lang.String id)
Description copied from interface: ContentPage
Returns a ContentFragment that wraps the actual Fragment metadata represented by the id argument.

Specified by:
getContentFragmentById in interface ContentPage
Parameters:
id - unique id of the Fragment we want to retrieve.
Returns:

getFragmentById

public Fragment getFragmentById(java.lang.String id)
Description copied from interface: ContentPage
Overridden to to indicate that the Fragment returned must also be an instance of ContentFragment.

Specified by:
getFragmentById in interface ContentPage
Specified by:
getFragmentById in interface Page
Parameters:
id - the fragment id to look for
Returns:
the found ContentFragment object or null if not found

removeFragmentById

public Fragment removeFragmentById(java.lang.String id)
Description copied from interface: Page
Removes the fragment contained within this page, with the specified Id.

Specified by:
removeFragmentById in interface Page
Parameters:
id - the fragment id to remove
Returns:
the removed Fragment object or null if not found

getContentFragmentsByName

public java.util.List getContentFragmentsByName(java.lang.String name)
Description copied from interface: ContentPage
Returns a list of ContentFragment that wrap the actual Fragment metadata represented by the name argument.

Specified by:
getContentFragmentsByName in interface ContentPage
Parameters:
name - name of the Fragments we want to retrieve.
Returns:

getFragmentsByName

public java.util.List getFragmentsByName(java.lang.String name)
Description copied from interface: ContentPage
Overridden to to indicate that the list of Fragment instances returned must also be instances of ContentFragment.

Specified by:
getFragmentsByName in interface ContentPage
Specified by:
getFragmentsByName in interface Page
Parameters:
name - the fragments name to look for
Returns:
the list of found ContentFragment object or null if not found

getRootContentFragment

public ContentFragment getRootContentFragment()
Description copied from interface: ContentPage
Provides access to a per-request safe ContentFragment. ContentFragments add the additional ability to temporarily store rendered content of the current request along with original, persistent metadata of the Fragment itself.

Specified by:
getRootContentFragment in interface ContentPage
Returns:
ContentFragment wrapping the actual root Fragment.

getRootFragment

public Fragment getRootFragment()
Description copied from interface: ContentPage
Overridden to to indicate that the Fragment returned must also be an instance of ContentFragment.

Specified by:
getRootFragment in interface ContentPage
Specified by:
getRootFragment in interface Page
Returns:
the base Fragment object for this page.

getEffectiveDefaultDecorator

public java.lang.String getEffectiveDefaultDecorator(java.lang.String fragmentType)
Description copied from interface: Page
Returns the name of the default decorator as set here or in parent folders that applies in this page to fragments of the specified type.

Specified by:
getEffectiveDefaultDecorator in interface Page
Parameters:
fragmentType - the type of fragment considered
Returns:
the decorator name for the selected type

getDefaultDecorator

public java.lang.String getDefaultDecorator(java.lang.String fragmentType)
Description copied from interface: Page
Returns the name of the default decorator that applies in this page to fragments of the specified type

Specified by:
getDefaultDecorator in interface Page
Parameters:
fragmentType - the type of fragment considered
Returns:
the decorator name for the selected type

getSkin

public java.lang.String getSkin()
Description copied from interface: Page
Returns the name of the default skin that applies to this page.

Specified by:
getSkin in interface Page
Returns:
the page default skin name

setDefaultDecorator

public void setDefaultDecorator(java.lang.String decoratorName,
                                java.lang.String fragmentType)
Description copied from interface: Page
Modifies the default decorator for the specified fragment type.

Specified by:
setDefaultDecorator in interface Page
Parameters:
decoratorName - the name of the new decorator for the type
fragmentType - the type of fragment considered

setSkin

public void setSkin(java.lang.String skinName)
Description copied from interface: Page
Modifies the skin for this page.

Specified by:
setSkin in interface Page
Parameters:
skinName - the name of the new skin for the page

setRootFragment

public void setRootFragment(Fragment fragment)
Description copied from interface: Page
Sets the top level fragment of this page. This Fragment should never be null.

Specified by:
setRootFragment in interface Page

getMenuDefinitions

public java.util.List getMenuDefinitions()
Description copied from interface: Page
getMenuDefinitions - get list of menu definitions

Specified by:
getMenuDefinitions in interface Page
Returns:
definition list

newMenuDefinition

public MenuDefinition newMenuDefinition()
Description copied from interface: Page
newMenuDefinition - creates a new empty menu definition

Specified by:
newMenuDefinition in interface Page
Returns:
a newly created MenuDefinition object for use in Page

newMenuExcludeDefinition

public MenuExcludeDefinition newMenuExcludeDefinition()
Description copied from interface: Page
newMenuExcludeDefinition - creates a new empty menu exclude definition

Specified by:
newMenuExcludeDefinition in interface Page
Returns:
a newly created MenuExcludeDefinition object for use in Page

newMenuIncludeDefinition

public MenuIncludeDefinition newMenuIncludeDefinition()
Description copied from interface: Page
newMenuIncludeDefinition - creates a new empty menu include definition

Specified by:
newMenuIncludeDefinition in interface Page
Returns:
a newly created MenuIncludeDefinition object for use in Page

newMenuOptionsDefinition

public MenuOptionsDefinition newMenuOptionsDefinition()
Description copied from interface: Page
newMenuOptionsDefinition - creates a new empty menu options definition

Specified by:
newMenuOptionsDefinition in interface Page
Returns:
a newly created MenuOptionsDefinition object for use in Page

newMenuSeparatorDefinition

public MenuSeparatorDefinition newMenuSeparatorDefinition()
Description copied from interface: Page
newMenuSeparatorDefinition - creates a new empty menu separator definition

Specified by:
newMenuSeparatorDefinition in interface Page
Returns:
a newly created MenuSeparatorDefinition object for use in Page

setMenuDefinitions

public void setMenuDefinitions(java.util.List definitions)
Description copied from interface: Page
setMenuDefinitions - set list of menu definitions

Specified by:
setMenuDefinitions in interface Page
Parameters:
definitions - definition list

getMetadata

public GenericMetadata getMetadata()
Description copied from interface: Node

getMetadata

Specified by:
getMetadata in interface Node
Returns:

getName

public java.lang.String getName()
Description copied from interface: Node

getName

Returns the name of this node relative to Node.getParent().getPath()

Specified by:
getName in interface Node
Returns:
Name, relative to the parent node.

getParent

public Node getParent()
Description copied from interface: Node

getParent

Specified by:
getParent in interface Node
Returns:

getPath

public java.lang.String getPath()
Description copied from interface: Node

getPath

Specified by:
getPath in interface Node
Returns:

getShortTitle

public java.lang.String getShortTitle(java.util.Locale locale)
Description copied from interface: Node

getShortTitle

Returns the short title for the specified locale.

Specified by:
getShortTitle in interface Node
Returns:
localized title of this Node.

getTitle

public java.lang.String getTitle(java.util.Locale locale)
Description copied from interface: Node

getTitle

Returns the title for the specified locale.

Specified by:
getTitle in interface Node
Returns:
localized title of this Node.

getType

public java.lang.String getType()
Description copied from interface: Node

getType

Specified by:
getType in interface Node
Returns:

getUrl

public java.lang.String getUrl()
Description copied from interface: Node

getUrl

Specified by:
getUrl in interface Node
Returns:

isHidden

public boolean isHidden()
Description copied from interface: Node

isHidden

Whether or not this Node should be hidden in terms of the view. This MUST NOT restrict the presence of this node in terms of being returned in org.apache.jetspeed.page.document.NodeSet.

Specified by:
isHidden in interface Node
Returns:
hidden flag

setHidden

public void setHidden(boolean hidden)
Description copied from interface: Node

setHidden

Whether or not this Node should be hidden in terms of the view.

Specified by:
setHidden in interface Node
Parameters:
hidden - flag

setParent

public void setParent(Node parent)
Description copied from interface: Node

setParent

Specified by:
setParent in interface Node

setPath

public void setPath(java.lang.String path)
Description copied from interface: Node

setPath

Sets the full-qualified path of this node.

Specified by:
setPath in interface Node

checkAccess

public void checkAccess(java.lang.String actions)
                 throws java.lang.SecurityException
Description copied from interface: SecuredResource

checkAccess

Specified by:
checkAccess in interface SecuredResource
Parameters:
actions - list to be checked against in CSV string form
Throws:
java.lang.SecurityException

checkConstraints

public void checkConstraints(java.lang.String actions)
                      throws java.lang.SecurityException
Description copied from interface: SecuredResource

checkConstraints

Specified by:
checkConstraints in interface SecuredResource
Parameters:
actions - list to be checked against in CSV string form
Throws:
java.lang.SecurityException

checkPermissions

public void checkPermissions(int mask)
                      throws java.lang.SecurityException
Description copied from interface: SecuredResource

checkPermissions

Specified by:
checkPermissions in interface SecuredResource
Parameters:
mask - Mask of actions to be checked
Throws:
java.lang.SecurityException

getConstraintsEnabled

public boolean getConstraintsEnabled()
Description copied from interface: SecuredResource

getConstraintsEnabled

Specified by:
getConstraintsEnabled in interface SecuredResource
Returns:
enabled indicator

getPermissionsEnabled

public boolean getPermissionsEnabled()
Description copied from interface: SecuredResource

getPermissionsEnabled

Specified by:
getPermissionsEnabled in interface SecuredResource
Returns:
enabled indicator

getSecurityConstraints

public SecurityConstraints getSecurityConstraints()
Description copied from interface: SecuredResource

getSecurityConstraints

Specified by:
getSecurityConstraints in interface SecuredResource
Returns:
security constraints for resource

newSecurityConstraints

public SecurityConstraints newSecurityConstraints()
Description copied from interface: SecuredResource

newSecurityConstraints

Specified by:
newSecurityConstraints in interface SecuredResource
Returns:
a newly created SecurityConstraints object for use in SecuredResource

newSecurityConstraint

public SecurityConstraint newSecurityConstraint()
Description copied from interface: SecuredResource

newSecurityConstraint

Specified by:
newSecurityConstraint in interface SecuredResource
Returns:
a newly created SecurityConstraint object for use in SecuredResource

setSecurityConstraints

public void setSecurityConstraints(SecurityConstraints constraints)
Description copied from interface: SecuredResource

setSecurityConstraints

Specified by:
setSecurityConstraints in interface SecuredResource
Parameters:
constraints - security constraints for resource

getId

public java.lang.String getId()
Description copied from interface: BaseElement
Returns the unique Id of this element. This id is guaranteed to be unique from the complete portal and is suitable to be used as a unique key.

Specified by:
getId in interface BaseElement
Returns:
the unique id of this element.

getShortTitle

public java.lang.String getShortTitle()
Description copied from interface: BaseElement
Returns the short title in the default Locale

Specified by:
getShortTitle in interface BaseElement
Returns:
the page short title

getTitle

public java.lang.String getTitle()
Description copied from interface: BaseElement
Returns the title in the default Locale

Specified by:
getTitle in interface BaseElement
Returns:
the page title

setShortTitle

public void setShortTitle(java.lang.String title)
Description copied from interface: BaseElement
Sets the short title for the default Locale

Specified by:
setShortTitle in interface BaseElement
Parameters:
title - the new title

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: BaseElement
Sets the title for the default Locale

Specified by:
setTitle in interface BaseElement
Parameters:
title - the new title

getPage

public Page getPage()
getPage - access wrapped page

Returns:
wrapped page

getVersion

public java.lang.String getVersion()
Description copied from interface: Document
Gets the version number

Specified by:
getVersion in interface Document
Returns:
version number is a string composed of optionally point separated digits

setVersion

public void setVersion(java.lang.String version)
Description copied from interface: Document
Sets the version number

Specified by:
setVersion in interface Document
Parameters:
version - version number is a string composed of optional point separated digits

isDirty

public boolean isDirty()
Description copied from interface: Document

isDirty

Whether this node is dirty, i.e. should be updated in the persistent store.

Specified by:
isDirty in interface Document

setDirty

public void setDirty(boolean dirty)
Description copied from interface: Document

setDirty

Flag the node as dirty / clean, i.e. should be resp. should not be updated in the persistent store

Specified by:
setDirty in interface Document


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.