org.apache.jetspeed.om.page
Interface Fragment

All Superinterfaces:
BaseElement, BaseFragmentElement, SecuredResource, java.io.Serializable

public interface Fragment
extends BaseFragmentElement, java.io.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 881862 2009-11-18 18:24:48Z rwatler $

Field Summary
static java.lang.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 java.lang.String PORTLET
          A fragment of type PORTLET is considered to be a compliant portlet in the sense of the JSR 168.
 
Fields inherited from interface org.apache.jetspeed.om.page.BaseFragmentElement
COLUMN_PROPERTY_NAME, DECORATOR_PROPERTY_NAME, GLOBAL_PROPERTY_SCOPE, GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED, GROUP_PROPERTY_SCOPE, HEIGHT_PROPERTY_NAME, MODE_PROPERTY_NAME, ROLE_PROPERTY_SCOPE, ROW_PROPERTY_NAME, SIZES_PROPERTY_NAME, SKIN_PROPERTY_NAME, STATE_PROPERTY_NAME, USER_PROPERTY_SCOPE, WIDTH_PROPERTY_NAME, X_PROPERTY_NAME, Y_PROPERTY_NAME, Z_PROPERTY_NAME
 
Method Summary
 BaseFragmentElement getFragmentById(java.lang.String id)
          Retrieves the fragment contained within this fragment, with the specified Id.
 java.util.List getFragments()
          Returns all fragments used in this node.
 java.lang.String getName()
          Returns the administrative name of this fragment.
 java.lang.String getType()
          Returns the type of the class bound to this fragment
 BaseFragmentElement removeFragmentById(java.lang.String id)
          Removes the fragment contained within this fragment, with the specified Id.
 void setName(java.lang.String name)
          Binds an administrative name to this fragment
 void setType(java.lang.String type)
          Binds a type to this fragment
 
Methods inherited from interface org.apache.jetspeed.om.page.BaseFragmentElement
getDecorator, getFloatProperty, getFloatProperty, getIntProperty, getIntProperty, getLayoutColumn, getLayoutHeight, getLayoutRow, getLayoutSizes, getLayoutWidth, getLayoutX, getLayoutY, getLayoutZ, getMode, getPreferences, getProperties, getProperty, getProperty, getSkin, getState, setDecorator, setDecorator, setId, setLayoutColumn, setLayoutColumn, setLayoutHeight, setLayoutHeight, setLayoutRow, setLayoutRow, setLayoutSizes, setLayoutSizes, setLayoutWidth, setLayoutWidth, setLayoutX, setLayoutX, setLayoutY, setLayoutY, setLayoutZ, setLayoutZ, setMode, setMode, setPreferences, setProperties, setProperty, setProperty, setProperty, setSkin, setSkin, setState, setState
 
Methods inherited from interface org.apache.jetspeed.om.page.BaseElement
getId, getShortTitle, getTitle, isStale, 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 java.lang.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 java.lang.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
Method Detail

getName

java.lang.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(java.lang.String name)
Binds an administrative name to this fragment

Parameters:
name - the administrative name

getType

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


setType

void setType(java.lang.String type)
Binds a type to this fragment

Parameters:
type - the type

getFragments

java.util.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 BaseFragmentElement objects

getFragmentById

BaseFragmentElement getFragmentById(java.lang.String id)
Retrieves the fragment contained within this fragment, with the specified Id.

Parameters:
id - the fragment id to look for
Returns:
the found Fragment object or null if not found

removeFragmentById

BaseFragmentElement removeFragmentById(java.lang.String id)
Removes the fragment contained within this fragment, with the specified Id.

Parameters:
id - the fragment id to remove
Returns:
the removed Fragment object or null if not found


Copyright © 1999-2011 The Apache Software Foundation. All Rights Reserved.