org.apache.jetspeed.om.page.psml
Class FragmentImpl

java.lang.Object
  extended by org.apache.jetspeed.om.page.psml.AbstractBaseElement
      extended by org.apache.jetspeed.om.page.psml.FragmentImpl
All Implemented Interfaces:
java.io.Serializable, SecuredResource, BaseElement, Fragment
Direct Known Subclasses:
ReferenceImpl

public class FragmentImpl
extends AbstractBaseElement
implements Fragment, java.io.Serializable

Version:
$Id: FragmentImpl.java 551606 2007-06-28 16:07:53Z taylor $
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jetspeed.om.page.Fragment
COLUMN_PROPERTY_NAME, HEIGHT_PROPERTY_NAME, LAYOUT, PORTLET, ROW_PROPERTY_NAME, SIZES_PROPERTY_NAME, WIDTH_PROPERTY_NAME, X_PROPERTY_NAME, Y_PROPERTY_NAME, Z_PROPERTY_NAME
 
Constructor Summary
FragmentImpl()
           Default Constructor.
FragmentImpl(java.lang.String id)
           
 
Method Summary
 void checkPermissions(java.lang.String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
           checkPermissions
 boolean equals(java.lang.Object obj)
           equals
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 java.lang.String getDecorator()
          Returns the name of the decorator bound to this fragment
 PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 float getFloatProperty(java.lang.String propName)
          getFloatProperty Get named property value as float.
 java.util.List getFragments()
          Returns all fragments used in this node.
 int getIntProperty(java.lang.String propName)
          getIntProperty Get named property value as integer.
 int getLayoutColumn()
          get layout column property
 float getLayoutHeight()
          get layout height property
 int getLayoutRow()
          get layout row property
 java.lang.String getLayoutSizes()
          get layout sizes property, (i.e.
 float getLayoutWidth()
          get layout width property
 float getLayoutX()
          get layout x coordinate property
 float getLayoutY()
          get layout y coordinate property
 float getLayoutZ()
          get layout z coordinate property
 java.lang.String getLogicalPermissionPath()
           getLogicalPermissionPath
 java.lang.String getMode()
          Returns the display mode of this fragment.
 java.lang.String getName()
           getName
 boolean getPermissionsEnabled()
           getPermissionsEnabled
 java.lang.String getPhysicalPermissionPath()
           getPhysicalPermissionPath
 java.util.List getPreferences()
           getPreferences
 java.util.Map getProperties()
          getProperties Get writable Map of properties by name.
 java.util.List getPropertiesList()
           
 java.lang.String getProperty(java.lang.String propName)
          getProperty Get named property value.
 java.lang.String getSkin()
          Returns the name of the skin associated to this fragment
 java.lang.String getState()
          Returns the display state of this fragment.
 java.lang.String getType()
          Returns the type of the class bound to this fragment
 int hashCode()
           hashCode
 boolean isReference()
          Test if this fragment is actually a reference to an external fragment.
 void marshalling()
          marshalling - notification that this instance is to be saved to the persistent store
 void setDecorator(java.lang.String decoratorName)
          Defines the decorator for this fragment.
 void setLayoutColumn(int column)
          set the layout column property
 void setLayoutHeight(float height)
          set the layout height property
 void setLayoutRow(int row)
          set the layout row property
 void setLayoutSizes(java.lang.String sizes)
          set the layout sizes
 void setLayoutWidth(float width)
          set the layout width property
 void setLayoutX(float x)
          set the layout x coordinate property
 void setLayoutY(float y)
          set the layout y coordinate property
 void setLayoutZ(float z)
          set the layout z coordinate property
 void setMode(java.lang.String mode)
          Sets the display mode of this fragment.
 void setName(java.lang.String name)
           setName
 void setPreferences(java.util.List preferences)
          Set collection of fragment preference objects
 void setSkin(java.lang.String skin)
          Defines the skin for this fragment.
 void setState(java.lang.String state)
          Sets the display state of this fragment.
 void setType(java.lang.String type)
          Binds a type to this fragment
 void unmarshalled()
          unmarshalled - notification that this instance has been loaded from the persistent store
 
Methods inherited from class org.apache.jetspeed.om.page.psml.AbstractBaseElement
checkAccess, checkAccess, checkConstraints, checkConstraints, checkPermissions, checkPermissions, getHandlerFactory, getId, getSecurityConstraints, getShortTitle, getTitle, grantViewActionAccess, newSecurityConstraint, newSecurityConstraints, setConstraintsEnabled, setHandlerFactory, setId, setPermissionsEnabled, setSecurityConstraints, setShortTitle, setTitle, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.om.page.BaseElement
getId, getShortTitle, getTitle, setShortTitle, setTitle
 
Methods inherited from interface org.apache.jetspeed.om.common.SecuredResource
checkAccess, checkConstraints, checkPermissions, getSecurityConstraints, newSecurityConstraint, newSecurityConstraints, setSecurityConstraints
 

Constructor Detail

FragmentImpl

public FragmentImpl()

Default Constructor.


FragmentImpl

public FragmentImpl(java.lang.String id)
Method Detail

getType

public java.lang.String getType()
Description copied from interface: Fragment
Returns the type of the class bound to this fragment

Specified by:
getType in interface Fragment

setType

public void setType(java.lang.String type)
Description copied from interface: Fragment
Binds a type to this fragment

Specified by:
setType in interface Fragment
Parameters:
type - the type

getState

public java.lang.String getState()
Description copied from interface: Fragment
Returns the display state of this fragment. The state may have the following values: "Normal","Minimized","Maximized","Hidden"

Specified by:
getState in interface Fragment

setState

public void setState(java.lang.String state)
Description copied from interface: Fragment
Sets the display state of this fragment. Valid states are: "Normal","Minimized","Maximized","Hidden"

Specified by:
setState in interface Fragment
Parameters:
state - the new fragment state

getMode

public java.lang.String getMode()
Description copied from interface: Fragment
Returns the display mode of this fragment. The mode may have the following values: "View","Edit","Help","Config","Print","Custom"

Specified by:
getMode in interface Fragment

setMode

public void setMode(java.lang.String mode)
Description copied from interface: Fragment
Sets the display mode of this fragment. Valid modes are: "View","Edit","Help","Config","Print","Custom"

Specified by:
setMode in interface Fragment
Parameters:
mode - the new fragment mode

getDecorator

public java.lang.String getDecorator()
Description copied from interface: Fragment
Returns the name of the decorator bound to this fragment

Specified by:
getDecorator in interface Fragment

setDecorator

public void setDecorator(java.lang.String decoratorName)
Description copied from interface: Fragment
Defines the decorator for this fragment. This decorator should be known by the portal.

Specified by:
setDecorator in interface Fragment
Parameters:
decoratorName - the name of the decorator applied to this fragment

getSkin

public java.lang.String getSkin()
Description copied from interface: Fragment
Returns the name of the skin associated to this fragment

Specified by:
getSkin in interface Fragment

setSkin

public void setSkin(java.lang.String skin)
Description copied from interface: Fragment
Defines the skin for this fragment. This skin should be known by the portal.

Specified by:
setSkin in interface Fragment
Parameters:
skin - the name of the new skin applied to this fragment

isReference

public boolean isReference()
Description copied from interface: Fragment
Test if this fragment is actually a reference to an external fragment.

Specified by:
isReference in interface Fragment
Returns:
true is this element is a reference

getFragments

public java.util.List getFragments()
Description copied from interface: Fragment
Returns all fragments used in this node. This may be a page fragment or even directly a portlet fragment

Specified by:
getFragments in interface Fragment
Returns:
a collection containing Fragment objects

getPropertiesList

public java.util.List getPropertiesList()

getProperty

public java.lang.String getProperty(java.lang.String propName)
Description copied from interface: Fragment
getProperty Get named property value.

Specified by:
getProperty in interface Fragment
Parameters:
propName - property name
Returns:
value
See Also:
Fragment.getProperty(java.lang.String)

getIntProperty

public int getIntProperty(java.lang.String propName)
Description copied from interface: Fragment
getIntProperty Get named property value as integer.

Specified by:
getIntProperty in interface Fragment
Parameters:
propName - property name
Returns:
int value
See Also:
Fragment.getIntProperty(java.lang.String)

getFloatProperty

public float getFloatProperty(java.lang.String propName)
Description copied from interface: Fragment
getFloatProperty Get named property value as float.

Specified by:
getFloatProperty in interface Fragment
Parameters:
propName - property name
Returns:
float value
See Also:
Fragment.getFloatProperty(java.lang.String)

getProperties

public java.util.Map getProperties()
Description copied from interface: Fragment
getProperties Get writable Map of properties by name.

Specified by:
getProperties in interface Fragment
Returns:
properties map
See Also:
Fragment.getProperties()

getLayoutRow

public int getLayoutRow()
Description copied from interface: Fragment
get layout row property

Specified by:
getLayoutRow in interface Fragment
Returns:
row layout property
See Also:
Fragment.getLayoutRow()

setLayoutRow

public void setLayoutRow(int row)
Description copied from interface: Fragment
set the layout row property

Specified by:
setLayoutRow in interface Fragment
See Also:
Fragment.setLayoutRow(int)

getLayoutColumn

public int getLayoutColumn()
Description copied from interface: Fragment
get layout column property

Specified by:
getLayoutColumn in interface Fragment
Returns:
column layout property
See Also:
Fragment.getLayoutColumn()

setLayoutColumn

public void setLayoutColumn(int column)
Description copied from interface: Fragment
set the layout column property

Specified by:
setLayoutColumn in interface Fragment
See Also:
Fragment.setLayoutColumn(int)

getLayoutSizes

public java.lang.String getLayoutSizes()
Description copied from interface: Fragment
get layout sizes property, (i.e. "25%,75%")

Specified by:
getLayoutSizes in interface Fragment
Returns:
sizes layout property
See Also:
Fragment.getLayoutSizes()

setLayoutSizes

public void setLayoutSizes(java.lang.String sizes)
Description copied from interface: Fragment
set the layout sizes

Specified by:
setLayoutSizes in interface Fragment
See Also:
Fragment.setLayoutSizes(java.lang.String)

getLayoutX

public float getLayoutX()
Description copied from interface: Fragment
get layout x coordinate property

Specified by:
getLayoutX in interface Fragment
Returns:
the x coordinate value
See Also:
Fragment.getLayoutX()

setLayoutX

public void setLayoutX(float x)
Description copied from interface: Fragment
set the layout x coordinate property

Specified by:
setLayoutX in interface Fragment
Parameters:
x - the coordinate value
See Also:
Fragment.setLayoutX(float)

getLayoutY

public float getLayoutY()
Description copied from interface: Fragment
get layout y coordinate property

Specified by:
getLayoutY in interface Fragment
Returns:
the y coordinate value
See Also:
Fragment.getLayoutY()

setLayoutY

public void setLayoutY(float y)
Description copied from interface: Fragment
set the layout y coordinate property

Specified by:
setLayoutY in interface Fragment
Parameters:
y - the coordinate value
See Also:
Fragment.setLayoutY(float)

getLayoutZ

public float getLayoutZ()
Description copied from interface: Fragment
get layout z coordinate property

Specified by:
getLayoutZ in interface Fragment
Returns:
the z coordinate value
See Also:
Fragment.getLayoutZ()

setLayoutZ

public void setLayoutZ(float z)
Description copied from interface: Fragment
set the layout z coordinate property

Specified by:
setLayoutZ in interface Fragment
Parameters:
z - the coordinate value
See Also:
Fragment.setLayoutZ(float)

getLayoutWidth

public float getLayoutWidth()
Description copied from interface: Fragment
get layout width property

Specified by:
getLayoutWidth in interface Fragment
Returns:
the width value
See Also:
Fragment.getLayoutWidth()

setLayoutWidth

public void setLayoutWidth(float width)
Description copied from interface: Fragment
set the layout width property

Specified by:
setLayoutWidth in interface Fragment
Parameters:
width - the value
See Also:
Fragment.setLayoutWidth(float)

getLayoutHeight

public float getLayoutHeight()
Description copied from interface: Fragment
get layout height property

Specified by:
getLayoutHeight in interface Fragment
Returns:
the height value
See Also:
Fragment.getLayoutHeight()

setLayoutHeight

public void setLayoutHeight(float height)
Description copied from interface: Fragment
set the layout height property

Specified by:
setLayoutHeight in interface Fragment
Parameters:
height - the value
See Also:
Fragment.setLayoutHeight(float)

equals

public boolean equals(java.lang.Object obj)

equals

Overrides:
equals in class AbstractBaseElement
Parameters:
obj -
Returns:
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()

hashCode

Overrides:
hashCode in class AbstractBaseElement
Returns:
See Also:
Object.hashCode()

getName

public java.lang.String getName()

getName

Specified by:
getName in interface Fragment
Returns:
See Also:
Fragment.getName()

setName

public void setName(java.lang.String name)

setName

Specified by:
setName in interface Fragment
Parameters:
name -
See Also:
Fragment.setName(java.lang.String)

getPreferences

public java.util.List getPreferences()

getPreferences

Specified by:
getPreferences in interface Fragment
Parameters:
name -
Returns:
list of FragmentPreference objects
See Also:
Fragment.getPreferences()

setPreferences

public void setPreferences(java.util.List preferences)
Description copied from interface: Fragment
Set collection of fragment preference objects

Specified by:
setPreferences in interface Fragment
Parameters:
preferences - list of FragmentPreference objects

getEffectivePageSecurity

public PageSecurity getEffectivePageSecurity()
Description copied from class: AbstractBaseElement
getEffectivePageSecurity

Overrides:
getEffectivePageSecurity in class AbstractBaseElement
Returns:
effective page security object

getLogicalPermissionPath

public java.lang.String getLogicalPermissionPath()
Description copied from class: AbstractBaseElement

getLogicalPermissionPath

Overrides:
getLogicalPermissionPath in class AbstractBaseElement
Returns:
path used for permissions checks

getPhysicalPermissionPath

public java.lang.String getPhysicalPermissionPath()
Description copied from class: AbstractBaseElement

getPhysicalPermissionPath

Overrides:
getPhysicalPermissionPath in class AbstractBaseElement
Returns:
path used for permissions checks

checkPermissions

public void checkPermissions(java.lang.String path,
                             int mask,
                             boolean checkNodeOnly,
                             boolean checkParentsOnly)
                      throws java.lang.SecurityException
Description copied from class: AbstractBaseElement

checkPermissions

Overrides:
checkPermissions in class AbstractBaseElement
mask - Mask of actions requested
Throws:
java.lang.SecurityException

getConstraintsEnabled

public boolean getConstraintsEnabled()
Description copied from class: AbstractBaseElement

getConstraintsEnabled

Specified by:
getConstraintsEnabled in interface SecuredResource
Overrides:
getConstraintsEnabled in class AbstractBaseElement
Returns:
whether security relies on PSML constraints
See Also:
org.apache.jetspeed.om.common.SecureResource#getConstraintsEnabled()

getPermissionsEnabled

public boolean getPermissionsEnabled()
Description copied from class: AbstractBaseElement

getPermissionsEnabled

Specified by:
getPermissionsEnabled in interface SecuredResource
Overrides:
getPermissionsEnabled in class AbstractBaseElement
Returns:
enabled indicator
See Also:
org.apache.jetspeed.om.common.SecureResource#getPermissionsEnabled()

unmarshalled

public void unmarshalled()
unmarshalled - notification that this instance has been loaded from the persistent store

Overrides:
unmarshalled in class AbstractBaseElement

marshalling

public void marshalling()
marshalling - notification that this instance is to be saved to the persistent store

Overrides:
marshalling in class AbstractBaseElement


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