org.apache.jetspeed.om.page
Interface ContentFragment

All Superinterfaces:
BaseElement, Fragment, SecuredResource, Serializable

public interface ContentFragment
extends Fragment

ContentFragment provides a volatile wrapper interface for actual Fragment metadata objects. Since Fragments are cached and are not request specific they cannot be used to store request-level content. This is where we use the ContentFragment to solve this problem.

Author:
weaver@apache.org

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
 
Method Summary
 List getContentFragments()
          Provides a list of of child ContentFragments that wrap the actual Fragment metadata objects.
 Decoration getDecoration()
          Retrieves the actual org.apache.jetspeed.decoration.decorator object for this content fragment.
 List getFragments()
          Overridden to make it clear to the implemetor the List returned MUST ContentFragments and not just regular Fragments
 String getOverriddenContent()
           
 String getRenderedContent()
           getRenderedContent
 boolean isInstantlyRendered()
          Checks if the content is instantly rendered from JPT.
 void overrideRenderedContent(String contnent)
           overrideRenderedContent
 void setDecoration(Decoration decoration)
           
 void setPortletContent(PortletContent portletContent)
           setPortletContent
 
Methods inherited from interface org.apache.jetspeed.om.page.Fragment
getDecorator, getFloatProperty, getIntProperty, getLayoutColumn, getLayoutHeight, getLayoutRow, getLayoutSizes, getLayoutWidth, getLayoutX, getLayoutY, getLayoutZ, getMode, getName, getPreferences, getProperties, getProperty, getSkin, getState, getType, isReference, setDecorator, setLayoutColumn, setLayoutHeight, setLayoutRow, setLayoutSizes, setLayoutWidth, setLayoutX, setLayoutY, setLayoutZ, setMode, setName, setPreferences, setSkin, setState, setType
 
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
 

Method Detail

getContentFragments

List getContentFragments()
Provides a list of of child ContentFragments that wrap the actual Fragment metadata objects.

Returns:

getFragments

List getFragments()
Overridden to make it clear to the implemetor the List returned MUST ContentFragments and not just regular Fragments

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

getRenderedContent

String getRenderedContent()
                          throws IllegalStateException

getRenderedContent

Returns the raw,undecorated content of this fragment. If overridenContent has been set and portlet content has not, overridden content should be returned.

Returns:
The raw,undecorated content of this fragment.
Throws:
IllegalStateException - if the content has not yet been set.

overrideRenderedContent

void overrideRenderedContent(String contnent)

overrideRenderedContent

Can be used to store errors that may have occurred during the rendering process.

Parameters:
contnent -

getOverriddenContent

String getOverriddenContent()
Returns:
the overridden content set by overrideRenderedContent

setPortletContent

void setPortletContent(PortletContent portletContent)

setPortletContent

Parameters:
portletContent -

getDecoration

Decoration getDecoration()
Retrieves the actual org.apache.jetspeed.decoration.decorator object for this content fragment. TODO: Re-evaluate the naming as this is somewhat confusing due to the existence of Fragment.getDecorator()

Returns:

setDecoration

void setDecoration(Decoration decoration)
Parameters:
decoration -

isInstantlyRendered

boolean isInstantlyRendered()
Checks if the content is instantly rendered from JPT.



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