org.apache.jetspeed.om.page
Interface Fragment

All Superinterfaces:
BaseElement, SecuredResource, Serializable
All Known Subinterfaces:
ContentFragment

public interface Fragment
extends BaseElement, Serializable

A Fragment is the basic element handled by the aggregation engine to compose the final portal page. It represents a reserved screen area whose layout is managed by a specified component.

The component that is responsible for the layout policy of the fragment is defined by two properties:

In addition to specifying the component responsible for the layout, the fragment also stores contextual information used for rendering:

Finally the fragment also holds layout and rendering properties that may be used by a parent fragment to layout all its inner fragments in an appropriate fashion.

Version:
$Id: Fragment.java 516448 2007-03-09 16:25:47Z ate $

Field Summary
static String COLUMN_PROPERTY_NAME
          column standard layout property name
static String HEIGHT_PROPERTY_NAME
          height standard layout property name
static String LAYOUT
          A fragment of type LAYOUT is a specific JSR 168 compliant portlet that knows how to layout a Page and depends on the Jetspeed layout service.
static String PORTLET
          A fragment of type PORTLET is considered to be a compliant portlet in the sense of the JSR 168.
static String ROW_PROPERTY_NAME
          row standard layout property name
static String SIZES_PROPERTY_NAME
          sizes standard layout property name
static String WIDTH_PROPERTY_NAME
          width standard layout property name
static String X_PROPERTY_NAME
          x coordinate standard layout property name
static String Y_PROPERTY_NAME
          y coordinate standard layout property name
static String Z_PROPERTY_NAME
          z coordinate standard layout property name
 
Method Summary
 String getDecorator()
          Returns the name of the decorator bound to this fragment
 float getFloatProperty(String propName)
          getFloatProperty Get named property value as float.
 List getFragments()
          Returns all fragments used in this node.
 int getIntProperty(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
 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
 String getMode()
          Returns the display mode of this fragment.
 String getName()
          Returns the administrative name of this fragment.
 List getPreferences()
          Get collection of fragment preference objects used to initialize user preferences
 Map getProperties()
          getProperties Get writable Map of properties by name.
 String getProperty(String propName)
          getProperty Get named property value.
 String getSkin()
          Returns the name of the skin associated to this fragment
 String getState()
          Returns the display state of this fragment.
 String getType()
          Returns the type of the class bound to this fragment
 boolean isReference()
          Test if this fragment is actually a reference to an external fragment.
 void setDecorator(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(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(String mode)
          Sets the display mode of this fragment.
 void setName(String name)
          Binds an administrative name to this fragment
 void setPreferences(List preferences)
          Set collection of fragment preference objects
 void setSkin(String skinName)
          Defines the skin for this fragment.
 void setState(String state)
          Sets the display state of this fragment.
 void setType(String type)
          Binds a type to this fragment
 
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, getConstraintsEnabled, getPermissionsEnabled, getSecurityConstraints, newSecurityConstraint, newSecurityConstraints, setSecurityConstraints
 

Field Detail

PORTLET

static final String PORTLET
A fragment of type PORTLET is considered to be a compliant portlet in the sense of the JSR 168.

See Also:
Constant Field Values

LAYOUT

static final String LAYOUT
A fragment of type LAYOUT is a specific JSR 168 compliant portlet that knows how to layout a Page and depends on the Jetspeed layout service.

See Also:
Constant Field Values

ROW_PROPERTY_NAME

static final String ROW_PROPERTY_NAME
row standard layout property name

See Also:
Constant Field Values

COLUMN_PROPERTY_NAME

static final String COLUMN_PROPERTY_NAME
column standard layout property name

See Also:
Constant Field Values

SIZES_PROPERTY_NAME

static final String SIZES_PROPERTY_NAME
sizes standard layout property name

See Also:
Constant Field Values

X_PROPERTY_NAME

static final String X_PROPERTY_NAME
x coordinate standard layout property name

See Also:
Constant Field Values

Y_PROPERTY_NAME

static final String Y_PROPERTY_NAME
y coordinate standard layout property name

See Also:
Constant Field Values

Z_PROPERTY_NAME

static final String Z_PROPERTY_NAME
z coordinate standard layout property name

See Also:
Constant Field Values

WIDTH_PROPERTY_NAME

static final String WIDTH_PROPERTY_NAME
width standard layout property name

See Also:
Constant Field Values

HEIGHT_PROPERTY_NAME

static final String HEIGHT_PROPERTY_NAME
height standard layout property name

See Also:
Constant Field Values
Method Detail

getName

String getName()
Returns the administrative name of this fragment. This name should map to a component name in the component repository defined by the type attribute. If the name is not mapped to any component, the fragment is discarded from the rendering process, as well as any inner fragment.

Returns:
the administrative name

setName

void setName(String name)
Binds an administrative name to this fragment

Parameters:
name - the administrative name

getType

String getType()
Returns the type of the class bound to this fragment


setType

void setType(String type)
Binds a type to this fragment

Parameters:
type - the type

getSkin

String getSkin()
Returns the name of the skin associated to this fragment


setSkin

void setSkin(String skinName)
Defines the skin for this fragment. This skin should be known by the portal.

Parameters:
skinName - the name of the new skin applied to this fragment

getDecorator

String getDecorator()
Returns the name of the decorator bound to this fragment


setDecorator

void setDecorator(String decoratorName)
Defines the decorator for this fragment. This decorator should be known by the portal.

Parameters:
decoratorName - the name of the decorator applied to this fragment

getState

String getState()
Returns the display state of this fragment. The state may have the following values: "Normal","Minimized","Maximized","Hidden"


setState

void setState(String state)
Sets the display state of this fragment. Valid states are: "Normal","Minimized","Maximized","Hidden"

Parameters:
state - the new fragment state

getMode

String getMode()
Returns the display mode of this fragment. The mode may have the following values: "View","Edit","Help","Config","Print","Custom"


setMode

void setMode(String mode)
Sets the display mode of this fragment. Valid modes are: "View","Edit","Help","Config","Print","Custom"

Parameters:
mode - the new fragment mode

getFragments

List getFragments()
Returns all fragments used in this node. This may be a page fragment or even directly a portlet fragment

Returns:
a collection containing Fragment objects

getProperty

String getProperty(String propName)
getProperty Get named property value.

Parameters:
propName - property name
Returns:
value

getIntProperty

int getIntProperty(String propName)
getIntProperty Get named property value as integer.

Parameters:
propName - property name
Returns:
int value

getFloatProperty

float getFloatProperty(String propName)
getFloatProperty Get named property value as float.

Parameters:
propName - property name
Returns:
float value

getProperties

Map getProperties()
getProperties Get writable Map of properties by name.

Returns:
properties map

getLayoutRow

int getLayoutRow()
get layout row property

Returns:
row layout property

setLayoutRow

void setLayoutRow(int row)
set the layout row property

Parameters:
row -

getLayoutColumn

int getLayoutColumn()
get layout column property

Returns:
column layout property

setLayoutColumn

void setLayoutColumn(int column)
set the layout column property

Parameters:
column -

getLayoutSizes

String getLayoutSizes()
get layout sizes property, (i.e. "25%,75%")

Returns:
sizes layout property

setLayoutSizes

void setLayoutSizes(String sizes)
set the layout sizes

Parameters:
sizes -

getLayoutX

float getLayoutX()
get layout x coordinate property

Returns:
the x coordinate value

setLayoutX

void setLayoutX(float x)
set the layout x coordinate property

Parameters:
x - the coordinate value

getLayoutY

float getLayoutY()
get layout y coordinate property

Returns:
the y coordinate value

setLayoutY

void setLayoutY(float y)
set the layout y coordinate property

Parameters:
y - the coordinate value

getLayoutZ

float getLayoutZ()
get layout z coordinate property

Returns:
the z coordinate value

setLayoutZ

void setLayoutZ(float z)
set the layout z coordinate property

Parameters:
z - the coordinate value

getLayoutWidth

float getLayoutWidth()
get layout width property

Returns:
the width value

setLayoutWidth

void setLayoutWidth(float width)
set the layout width property

Parameters:
width - the value

getLayoutHeight

float getLayoutHeight()
get layout height property

Returns:
the height value

setLayoutHeight

void setLayoutHeight(float height)
set the layout height property

Parameters:
height - the value

isReference

boolean isReference()
Test if this fragment is actually a reference to an external fragment.

Returns:
true is this element is a reference

getPreferences

List getPreferences()
Get collection of fragment preference objects used to initialize user preferences

Returns:
list of FragmentPreference objects

setPreferences

void setPreferences(List preferences)
Set collection of fragment preference objects

Parameters:
preferences - list of FragmentPreference objects


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