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:
Serializable, org.apache.jetspeed.om.common.SecuredResource, org.apache.jetspeed.om.page.BaseElement, org.apache.jetspeed.om.page.Fragment
Direct Known Subclasses:
ReferenceImpl

public class FragmentImpl
extends AbstractBaseElement
implements org.apache.jetspeed.om.page.Fragment, Serializable

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

Field Summary
private  String decorator
           
private  boolean dirty
           
private static int fragment_id_counter
           
private  List fragments
           
private  FragmentList fragmentsList
           
private  String mode
           
private  String name
           
private  PageImpl page
           
private  List preferences
           
private  List propertiesList
           
private  Map propertiesMap
           
private  String skin
           
private  String state
           
private  String type
           
 
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(String id)
           
 
Method Summary
(package private)  List accessFragments()
           
 void checkPermissions(String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
           checkPermissions
 boolean equals(Object obj)
           equals
(package private)  List filterFragmentsByAccess(List fragments)
          filterFragmentsByAccess Filter fragments list for view access.
private static String generateId()
           
 boolean getConstraintsEnabled()
           getConstraintsEnabled
 String getDecorator()
           
 org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 float getFloatProperty(String propName)
           
 List getFragments()
           
 int getIntProperty(String propName)
           
 int getLayoutColumn()
           
 float getLayoutHeight()
           
 int getLayoutRow()
           
 String getLayoutSizes()
           
 float getLayoutWidth()
           
 float getLayoutX()
           
 float getLayoutY()
           
 float getLayoutZ()
           
 String getLogicalPermissionPath()
           getLogicalPermissionPath
 String getMode()
           
 String getName()
           getName
(package private)  PageImpl getPage()
           
 boolean getPermissionsEnabled()
           getPermissionsEnabled
 String getPhysicalPermissionPath()
           getPhysicalPermissionPath
 List getPreferences()
           getPreferences
 Map getProperties()
           
 List getPropertiesList()
           
 String getProperty(String propName)
           
 String getSkin()
           
 String getState()
           
 String getType()
           
 int hashCode()
           hashCode
 boolean isReference()
           
 void marshalling()
          marshalling - notification that this instance is to be saved to the persistent store
 void setDecorator(String decoratorName)
           
 void setLayoutColumn(int column)
           
 void setLayoutHeight(float height)
           
 void setLayoutRow(int row)
           
 void setLayoutSizes(String sizes)
           
 void setLayoutWidth(float width)
           
 void setLayoutX(float x)
           
 void setLayoutY(float y)
           
 void setLayoutZ(float z)
           
 void setMode(String mode)
           
 void setName(String name)
           setName
(package private)  void setPage(PageImpl page)
           
 void setPreferences(List preferences)
           
 void setSkin(String skin)
           
 void setState(String state)
           
 void setType(String type)
           
 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
 

Field Detail

fragment_id_counter

private static int fragment_id_counter

type

private String type

state

private String state

mode

private String mode

decorator

private String decorator

skin

private String skin

fragments

private List fragments

propertiesList

private List propertiesList

preferences

private List preferences

propertiesMap

private Map propertiesMap

name

private String name

fragmentsList

private FragmentList fragmentsList

page

private PageImpl page

dirty

private boolean dirty
Constructor Detail

FragmentImpl

public FragmentImpl()

Default Constructor.


FragmentImpl

public FragmentImpl(String id)
Method Detail

getType

public String getType()
Specified by:
getType in interface org.apache.jetspeed.om.page.Fragment

setType

public void setType(String type)
Specified by:
setType in interface org.apache.jetspeed.om.page.Fragment

getState

public String getState()
Specified by:
getState in interface org.apache.jetspeed.om.page.Fragment

setState

public void setState(String state)
Specified by:
setState in interface org.apache.jetspeed.om.page.Fragment

getMode

public String getMode()
Specified by:
getMode in interface org.apache.jetspeed.om.page.Fragment

setMode

public void setMode(String mode)
Specified by:
setMode in interface org.apache.jetspeed.om.page.Fragment

getDecorator

public String getDecorator()
Specified by:
getDecorator in interface org.apache.jetspeed.om.page.Fragment

setDecorator

public void setDecorator(String decoratorName)
Specified by:
setDecorator in interface org.apache.jetspeed.om.page.Fragment

getSkin

public String getSkin()
Specified by:
getSkin in interface org.apache.jetspeed.om.page.Fragment

setSkin

public void setSkin(String skin)
Specified by:
setSkin in interface org.apache.jetspeed.om.page.Fragment

isReference

public boolean isReference()
Specified by:
isReference in interface org.apache.jetspeed.om.page.Fragment

accessFragments

List accessFragments()

getFragments

public List getFragments()
Specified by:
getFragments in interface org.apache.jetspeed.om.page.Fragment

getPropertiesList

public List getPropertiesList()

getProperty

public String getProperty(String propName)
Specified by:
getProperty in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getProperty(java.lang.String)

getIntProperty

public int getIntProperty(String propName)
Specified by:
getIntProperty in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getIntProperty(java.lang.String)

getFloatProperty

public float getFloatProperty(String propName)
Specified by:
getFloatProperty in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getFloatProperty(java.lang.String)

getProperties

public Map getProperties()
Specified by:
getProperties in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getProperties()

getLayoutRow

public int getLayoutRow()
Specified by:
getLayoutRow in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getLayoutRow()

setLayoutRow

public void setLayoutRow(int row)
Specified by:
setLayoutRow in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.setLayoutRow(int)

getLayoutColumn

public int getLayoutColumn()
Specified by:
getLayoutColumn in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getLayoutColumn()

setLayoutColumn

public void setLayoutColumn(int column)
Specified by:
setLayoutColumn in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.setLayoutColumn(int)

getLayoutSizes

public String getLayoutSizes()
Specified by:
getLayoutSizes in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getLayoutSizes()

setLayoutSizes

public void setLayoutSizes(String sizes)
Specified by:
setLayoutSizes in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.setLayoutSizes(java.lang.String)

getLayoutX

public float getLayoutX()
Specified by:
getLayoutX in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getLayoutX()

setLayoutX

public void setLayoutX(float x)
Specified by:
setLayoutX in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.setLayoutX(float)

getLayoutY

public float getLayoutY()
Specified by:
getLayoutY in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getLayoutY()

setLayoutY

public void setLayoutY(float y)
Specified by:
setLayoutY in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.setLayoutY(float)

getLayoutZ

public float getLayoutZ()
Specified by:
getLayoutZ in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getLayoutZ()

setLayoutZ

public void setLayoutZ(float z)
Specified by:
setLayoutZ in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.setLayoutZ(float)

getLayoutWidth

public float getLayoutWidth()
Specified by:
getLayoutWidth in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getLayoutWidth()

setLayoutWidth

public void setLayoutWidth(float width)
Specified by:
setLayoutWidth in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.setLayoutWidth(float)

getLayoutHeight

public float getLayoutHeight()
Specified by:
getLayoutHeight in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.getLayoutHeight()

setLayoutHeight

public void setLayoutHeight(float height)
Specified by:
setLayoutHeight in interface org.apache.jetspeed.om.page.Fragment
See Also:
Fragment.setLayoutHeight(float)

equals

public boolean equals(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 String getName()

getName

Specified by:
getName in interface org.apache.jetspeed.om.page.Fragment
Returns:
See Also:
Fragment.getName()

setName

public void setName(String name)

setName

Specified by:
setName in interface org.apache.jetspeed.om.page.Fragment
Parameters:
name -
See Also:
Fragment.setName(java.lang.String)

getPreferences

public List getPreferences()

getPreferences

Specified by:
getPreferences in interface org.apache.jetspeed.om.page.Fragment
Parameters:
name -
See Also:
Fragment.getPreferences()

setPreferences

public void setPreferences(List preferences)
Specified by:
setPreferences in interface org.apache.jetspeed.om.page.Fragment

getPage

PageImpl getPage()

setPage

void setPage(PageImpl page)

getEffectivePageSecurity

public org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
Description copied from class: AbstractBaseElement
getEffectivePageSecurity

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

getLogicalPermissionPath

public String getLogicalPermissionPath()
Description copied from class: AbstractBaseElement

getLogicalPermissionPath

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

getPhysicalPermissionPath

public String getPhysicalPermissionPath()
Description copied from class: AbstractBaseElement

getPhysicalPermissionPath

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

checkPermissions

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

checkPermissions

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

getConstraintsEnabled

public boolean getConstraintsEnabled()
Description copied from class: AbstractBaseElement

getConstraintsEnabled

Specified by:
getConstraintsEnabled in interface org.apache.jetspeed.om.common.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 org.apache.jetspeed.om.common.SecuredResource
Overrides:
getPermissionsEnabled in class AbstractBaseElement
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

filterFragmentsByAccess

List filterFragmentsByAccess(List fragments)
filterFragmentsByAccess Filter fragments list for view access.

Parameters:
nodes - list containing fragments to check
Returns:
original list if all elements viewable, a filtered partial list, or null if all filtered for view access

generateId

private static String generateId()


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