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

java.lang.Object
  extended by org.apache.jetspeed.om.page.impl.BaseElementImpl
      extended by org.apache.jetspeed.om.page.impl.FragmentImpl
All Implemented Interfaces:
Serializable, org.apache.jetspeed.om.common.SecuredResource, org.apache.jetspeed.om.page.BaseElement, org.apache.jetspeed.om.page.Fragment

public class FragmentImpl
extends BaseElementImpl
implements org.apache.jetspeed.om.page.Fragment

FragmentImpl

Version:
$Id$
Author:
Randy Watler
See Also:
Serialized Form

Field Summary
private  String decorator
           
private  String extendedPropertyName1
           
private  String extendedPropertyName2
           
private  String extendedPropertyValue1
           
private  String extendedPropertyValue2
           
private  FragmentPreferenceList fragmentPreferences
           
private  List fragments
           
private  FragmentList fragmentsList
           
private  int layoutColumnProperty
           
private  float layoutHeightProperty
           
private  int layoutRowProperty
           
private  String layoutSizesProperty
           
private  float layoutWidthProperty
           
private  float layoutXProperty
           
private  float layoutYProperty
           
private  float layoutZProperty
           
private  String mode
           
private  PageImpl page
           
private  List preferences
           
private  FragmentPropertyMap 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()
           
 
Method Summary
(package private)  List accessFragments()
          accessFragments Access mutable persistent collection member for List wrappers.
(package private)  List accessPreferences()
          accessPreferences Access mutable persistent collection member for List wrappers.
 void checkPermissions(String path, int mask, boolean checkNodeOnly, boolean checkParentsOnly)
          checkPermissions
(package private)  void clearPropertyMember(String key)
          clearPropertyMember Clear explicit property member.
(package private)  List filterFragmentsByAccess(List fragments, boolean mutable)
          filterFragmentsByAccess Filter fragments list for view access.
 boolean getConstraintsEnabled()
           
 String getDecorator()
           
 org.apache.jetspeed.om.page.PageSecurity getEffectivePageSecurity()
          getEffectivePageSecurity
 float getFloatProperty(String propName)
           
(package private)  org.apache.jetspeed.om.page.Fragment getFragmentById(String id)
          getFragmentById Retrieve fragment with matching id from this or child fragments.
 List getFragments()
           
(package private)  List getFragmentsByName(String name)
          getFragmentsByName Retrieve fragments with matching name including this and child fragments.
 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()
           
(package private)  PageImpl getPage()
          getPage Get page implementation that owns fragment.
 boolean getPermissionsEnabled()
           
 String getPhysicalPermissionPath()
          getPhysicalPermissionPath
 List getPreferences()
           
 Map getProperties()
           
 String getProperty(String propName)
           
(package private)  String getPropertyMember(String key)
          getPropertyMember Get explicit property member.
(package private)  List getPropertyMemberKeys()
          getPropertyMemberKeys Get valid explicit property member keys.
 String getSkin()
           
 String getState()
           
 String getType()
           
 boolean isReference()
           
(package private)  org.apache.jetspeed.om.page.Fragment removeFragmentById(String id)
          removeFragmentById Remove fragment with matching id from child fragments.
 void resetCachedSecurityConstraints()
          resetCachedSecurityConstraints
 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)
           
(package private)  void setPage(PageImpl page)
          setPage Set page implementation that owns fragment and propagate to all child fragments.
 void setPreferences(List preferences)
           
(package private)  void setPropertyMember(String key, String value)
          setPropertyMember Set explicit property member.
 void setSkin(String skinName)
           
 void setState(String state)
           
 void setType(String type)
           
 
Methods inherited from class org.apache.jetspeed.om.page.impl.BaseElementImpl
checkAccess, checkConstraints, checkConstraints, checkPermissions, checkPermissions, equals, getId, getName, getSecurityConstraints, getShortTitle, getTitle, grantViewActionAccess, hashCode, newSecurityConstraint, newSecurityConstraints, setConstraintsEnabled, setName, setPermissionsEnabled, setSecurityConstraints, setShortTitle, setTitle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.om.page.Fragment
getName, setName
 
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

fragments

private List fragments

type

private String type

skin

private String skin

decorator

private String decorator

state

private String state

mode

private String mode

layoutRowProperty

private int layoutRowProperty

layoutColumnProperty

private int layoutColumnProperty

layoutSizesProperty

private String layoutSizesProperty

layoutXProperty

private float layoutXProperty

layoutYProperty

private float layoutYProperty

layoutZProperty

private float layoutZProperty

layoutWidthProperty

private float layoutWidthProperty

layoutHeightProperty

private float layoutHeightProperty

extendedPropertyName1

private String extendedPropertyName1

extendedPropertyValue1

private String extendedPropertyValue1

extendedPropertyName2

private String extendedPropertyName2

extendedPropertyValue2

private String extendedPropertyValue2

preferences

private List preferences

fragmentsList

private FragmentList fragmentsList

propertiesMap

private FragmentPropertyMap propertiesMap

fragmentPreferences

private FragmentPreferenceList fragmentPreferences

page

private PageImpl page
Constructor Detail

FragmentImpl

public FragmentImpl()
Method Detail

accessFragments

List accessFragments()
accessFragments Access mutable persistent collection member for List wrappers.

Returns:
persistent collection

accessPreferences

List accessPreferences()
accessPreferences Access mutable persistent collection member for List wrappers.

Returns:
persistent collection

getPage

PageImpl getPage()
getPage Get page implementation that owns fragment.

Returns:
owning page implementation

setPage

void setPage(PageImpl page)
setPage Set page implementation that owns fragment and propagate to all child fragments.

Parameters:
page - owning page implementation

getFragmentById

org.apache.jetspeed.om.page.Fragment getFragmentById(String id)
getFragmentById Retrieve fragment with matching id from this or child fragments.

Parameters:
id - fragment id to retrieve.
Returns:
matched fragment

removeFragmentById

org.apache.jetspeed.om.page.Fragment removeFragmentById(String id)
removeFragmentById Remove fragment with matching id from child fragments.

Parameters:
id - fragment id to remove.
Returns:
removed fragment

getFragmentsByName

List getFragmentsByName(String name)
getFragmentsByName Retrieve fragments with matching name including this and child fragments.

Parameters:
name - fragment name to retrieve.
Returns:
list of matched fragments

getPropertyMemberKeys

List getPropertyMemberKeys()
getPropertyMemberKeys Get valid explicit property member keys.

Returns:
list of property member keys with values

getPropertyMember

String getPropertyMember(String key)
getPropertyMember Get explicit property member.

Parameters:
key - property name
Returns:
property setting

setPropertyMember

void setPropertyMember(String key,
                       String value)
setPropertyMember Set explicit property member.

Parameters:
key - property name
value - property setting

clearPropertyMember

void clearPropertyMember(String key)
clearPropertyMember Clear explicit property member.

Parameters:
key - property name

getEffectivePageSecurity

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

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

getLogicalPermissionPath

public String getLogicalPermissionPath()
Description copied from class: BaseElementImpl
getLogicalPermissionPath

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

getPhysicalPermissionPath

public String getPhysicalPermissionPath()
Description copied from class: BaseElementImpl
getPhysicalPermissionPath

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

resetCachedSecurityConstraints

public void resetCachedSecurityConstraints()
Description copied from class: BaseElementImpl
resetCachedSecurityConstraints

Overrides:
resetCachedSecurityConstraints in class BaseElementImpl

checkPermissions

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

Overrides:
checkPermissions in class BaseElementImpl
Parameters:
path - permissions path to check
mask - mask of actions to check
checkNodeOnly - check node scope only
checkParentsOnly - check parent folder scope only
Throws:
SecurityException

getConstraintsEnabled

public boolean getConstraintsEnabled()
Specified by:
getConstraintsEnabled in interface org.apache.jetspeed.om.common.SecuredResource
Overrides:
getConstraintsEnabled in class BaseElementImpl

getPermissionsEnabled

public boolean getPermissionsEnabled()
Specified by:
getPermissionsEnabled in interface org.apache.jetspeed.om.common.SecuredResource
Overrides:
getPermissionsEnabled in class BaseElementImpl

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

getSkin

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

setSkin

public void setSkin(String skinName)
Specified by:
setSkin 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

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

getFragments

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

getProperty

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

getIntProperty

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

getFloatProperty

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

getProperties

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

getLayoutRow

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

setLayoutRow

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

getLayoutColumn

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

setLayoutColumn

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

getLayoutSizes

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

setLayoutSizes

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

getLayoutX

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

setLayoutX

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

getLayoutY

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

setLayoutY

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

getLayoutZ

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

setLayoutZ

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

getLayoutWidth

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

setLayoutWidth

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

getLayoutHeight

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

setLayoutHeight

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

isReference

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

getPreferences

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

setPreferences

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

filterFragmentsByAccess

List filterFragmentsByAccess(List fragments,
                             boolean mutable)
filterFragmentsByAccess Filter fragments list for view access.

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


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