public interface ContentFragment
Fragment
object for use in rendering. Fragment
objects are persistent, single-instance
metadata objects that should not be used to hold per-request content. ContentFragment
solves this by providing a parallel interface that can be used for rendering
requested content associated with the current user-request.Modifier and Type | Field and Description |
---|---|
static String |
COLUMN_PROPERTY_NAME
column standard layout property name
|
static String |
DECORATOR_PROPERTY_NAME
decorator standard layout property name
|
static String |
GLOBAL_PROPERTY_SCOPE
global standard property scope
|
static boolean |
GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED
group and role standard property scopes enabled flag
|
static String |
GROUP_PROPERTY_SCOPE
group standard property scope
|
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 |
MODE_PROPERTY_NAME
mode standard layout property name
|
static String |
PAGE
A fragment of type PAGE is a place holder for a page fragment.
|
static String |
PORTLET
A fragment of type PORTLET is considered to be a compliant portlet
in the sense of the JSR 168.
|
static String |
REFERENCE
A fragment of type REFERENCE is a place holder for a fragment reference.
|
static String |
ROLE_PROPERTY_SCOPE
role standard property scope
|
static String |
ROW_PROPERTY_NAME
row standard layout property name
|
static String |
SIZES_PROPERTY_NAME
sizes standard layout property name
|
static String |
SKIN_PROPERTY_NAME
skin standard layout property name
|
static String |
STATE_PROPERTY_NAME
state standard layout property name
|
static String |
USER_PROPERTY_SCOPE
user standard property scope
|
static String |
WIDTH_PROPERTY_NAME
width standard layout property name
|
static String |
X_PROPERTY_NAME
x coordinate standard layout property name
|
static String |
XPOS_PROPERTY_NAME |
static String |
Y_PROPERTY_NAME
y coordinate standard layout property name
|
static String |
YPOS_PROPERTY_NAME |
static String |
Z_PROPERTY_NAME
z coordinate standard layout property name
|
Modifier and Type | Method and Description |
---|---|
ContentFragment |
addPortlet(String type,
String name)
Add portlet to fragment returning associated content fragment.
|
ContentFragment |
addPortlet(String type,
String name,
int row,
int column)
Add portlet to fragment with specified row and column returning
associated content fragment.
|
void |
checkAccess(String actions)
Check security access to fragment.
|
Decoration |
getDecoration()
Retrieves the actual
org.apache.jetspeed.decoration.decorator
object for this content fragment. |
String |
getDecorator()
Returns the name of the decorator bound to this fragment
Property value is returned for the most specific scope
found, (i.e.
|
float |
getFloatProperty(String propName)
Get named property value as float.
|
float |
getFloatProperty(String propName,
String scope,
String scopeValue)
Get named property value as float.
|
String |
getFragmentId()
Returns the unique fragment id of this element.
|
List<ContentFragment> |
getFragments()
Provides a list of of child ContentFragment objects.
|
String |
getId()
Returns the unique fully qualified id of this element.
|
int |
getIntProperty(String propName)
Get named property value as integer.
|
int |
getIntProperty(String propName,
String scope,
String scopeValue)
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.
|
String |
getOverriddenContent() |
PageLayoutComponent |
getPageLayoutComponent()
Returns the PageLayoutComponent that generated this ContentPage
|
PortletContent |
getPortletContent()
Retrieve the content for this fragment
|
List<FragmentPreference> |
getPreferences()
Get read-only collection of fragment preference objects
used to initialize user preferences
|
List<FragmentProperty> |
getProperties()
Get read-only list of fragment property objects that
initially returns the set of properties for all scopes.
|
Map<String,String> |
getPropertiesMap()
Get named property value map.
|
String |
getProperty(String propName)
Get named property value.
|
String |
getProperty(String propName,
String scope,
String scopeValue)
Get named property value.
|
String |
getRefId()
Returns the id of the referenced fragment element.
|
String |
getRefreshFunction() |
long |
getRefreshRate() |
String |
getRenderedContent()
getRenderedContent
|
SecurityConstraints |
getSecurityConstraints()
Get security constraints.
|
String |
getShortTitle()
Returns the short title in the default Locale
|
String |
getSkin()
Returns the name of the skin associated to this fragment
Property value is returned for the most specific scope
found, (i.e.
|
String |
getState()
Returns the display state of this fragment.
|
String |
getTitle()
Returns the title in the default Locale
|
String |
getType()
Returns the type of the class bound to this fragment
|
boolean |
isInstantlyRendered()
Checks if the content is instantly rendered from JPT.
|
boolean |
isLocked()
Return is locked flag indicating whether this fragment
was originally merged from a page template or fragment
definition or is transient.
|
boolean |
isTemplate()
Return template flag indicating whether this fragment
was originally merged from a page template
|
SecurityConstraint |
newSecurityConstraint()
Create new security constraint.
|
SecurityConstraints |
newSecurityConstraints()
Create new security constraints.
|
void |
overrideRenderedContent(String content)
overrideRenderedContent
|
void |
reorderColumns(int max) |
void |
setDecoration(Decoration decoration) |
void |
setPortletContent(PortletContent portletContent)
setPortletContent
|
void |
setRefreshFunction(String function) |
void |
setRefreshRate(long rate) |
void |
updateDecorator(String decoratorName)
Update fragment portlet decorator.
|
void |
updateDecorator(String decoratorName,
String scope,
String scopeValue)
Update fragment portlet decorator.
|
void |
updateName(String name)
Update fragment name.
|
void |
updatePosition(float x,
float y,
float z,
float width,
float height)
Update fragment layout position.
|
void |
updatePosition(float x,
float y,
float z,
float width,
float height,
String scope,
String scopeValue)
Update fragment layout position.
|
void |
updatePreferences(Map<String,?> preferences)
Update preferences with new preferences set, accepting
Map of strings, string arrays, FragmentPreference or
PortletPreference.
|
void |
updateProperty(String propName,
String propValue)
Update fragment property.
|
void |
updateProperty(String propName,
String propValue,
String scope,
String scopeValue)
Update fragment property.
|
void |
updateRefId(String refId)
Update fragment reference reference id.
|
void |
updateRowColumn(int row,
int column)
Update fragment row and column layout positions.
|
void |
updateRowColumn(int row,
int column,
String scope,
String scopeValue)
Update fragment row and column layout positions.
|
void |
updateSecurityConstraints(SecurityConstraints constraints)
Update fragment security constraints.
|
void |
updateStateMode(String portletState,
String portletMode)
Update fragment portlet state and/or mode.
|
void |
updateStateMode(String portletState,
String portletMode,
String scope,
String scopeValue)
Update fragment portlet state and/or mode.
|
static final String SKIN_PROPERTY_NAME
static final String DECORATOR_PROPERTY_NAME
static final String STATE_PROPERTY_NAME
static final String MODE_PROPERTY_NAME
static final String ROW_PROPERTY_NAME
static final String COLUMN_PROPERTY_NAME
static final String SIZES_PROPERTY_NAME
static final String X_PROPERTY_NAME
static final String XPOS_PROPERTY_NAME
static final String Y_PROPERTY_NAME
static final String YPOS_PROPERTY_NAME
static final String Z_PROPERTY_NAME
static final String WIDTH_PROPERTY_NAME
static final String HEIGHT_PROPERTY_NAME
static final String USER_PROPERTY_SCOPE
static final String GROUP_PROPERTY_SCOPE
static final String ROLE_PROPERTY_SCOPE
static final String GLOBAL_PROPERTY_SCOPE
static final boolean GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED
static final String PORTLET
static final String LAYOUT
static final String PAGE
static final String REFERENCE
SecurityConstraints getSecurityConstraints()
SecurityConstraints newSecurityConstraints()
SecurityConstraint newSecurityConstraint()
void checkAccess(String actions) throws SecurityException
actions
- list to be checked against in CSV string formSecurityException
String getId()
String getTitle()
String getShortTitle()
String getSkin()
String getDecorator()
String getState()
String getMode()
String getProperty(String propName)
propName
- property nameString getProperty(String propName, String scope, String scopeValue)
propName
- property namescope
- the name of the property scope to retrievescopeValue
- the scope discriminator value, (unless scope is GLOBAL
or USER where the default user name is used if null)int getIntProperty(String propName)
propName
- property nameint getIntProperty(String propName, String scope, String scopeValue)
propName
- property namescope
- the name of the property scope to retrievescopeValue
- the scope discriminator value, (unless scope is GLOBAL
or USER where the default user name is used if null)float getFloatProperty(String propName)
propName
- property namefloat getFloatProperty(String propName, String scope, String scopeValue)
propName
- property namescope
- the name of the property scope to retrievescopeValue
- the scope discriminator value, (unless scope is GLOBAL
or USER where the default user name is used if null)List<FragmentProperty> getProperties()
Map<String,String> getPropertiesMap()
int getLayoutRow()
int getLayoutColumn()
String getLayoutSizes()
float getLayoutX()
float getLayoutY()
float getLayoutZ()
float getLayoutWidth()
float getLayoutHeight()
List<FragmentPreference> getPreferences()
String getName()
String getType()
List<ContentFragment> getFragments()
String getRefId()
String getFragmentId()
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.
IllegalStateException
- if the content has not yet been set.void overrideRenderedContent(String content)
overrideRenderedContent
Can be used to store errors that may have occurred during the rendering process.
content
- String getOverriddenContent()
void setPortletContent(PortletContent portletContent)
setPortletContent
portletContent
- PortletContent getPortletContent()
Decoration getDecoration()
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()void setDecoration(Decoration decoration)
decoration
- boolean isInstantlyRendered()
PageLayoutComponent getPageLayoutComponent()
boolean isTemplate()
boolean isLocked()
ContentFragment addPortlet(String type, String name, int row, int column)
type
- portlet typename
- portlet namerow
- fragment row positioncolumn
- fragment column positionContentFragment addPortlet(String type, String name)
type
- portlet typename
- portlet namevoid updateDecorator(String decoratorName)
decoratorName
- portlet decorator namevoid updateDecorator(String decoratorName, String scope, String scopeValue)
decoratorName
- portlet decorator namescope
- the name of the property scope to updatescopeValue
- the scope discriminator value, (unless scope is GLOBAL
or USER where the default user name is used if null)void updateName(String name)
name
- fragment namevoid updatePosition(float x, float y, float z, float width, float height)
x
- fragment X coordinate or -1y
- fragment Y coordinate or -1z
- fragment Z level or -1width
- fragment portlet width or -1height
- fragment portlet height or -1void updatePosition(float x, float y, float z, float width, float height, String scope, String scopeValue)
x
- fragment X coordinate or -1y
- fragment Y coordinate or -1z
- fragment Z level or -1width
- fragment portlet width or -1height
- fragment portlet height or -1scope
- the name of the property scope to updatescopeValue
- the scope discriminator value, (unless scope is GLOBAL
or USER where the default user name is used if null)void updatePreferences(Map<String,?> preferences)
preferences
- map of new preferences set.void updateProperty(String propName, String propValue)
propName
- fragment property namepropValue
- fragment property valuevoid updateProperty(String propName, String propValue, String scope, String scopeValue)
propName
- fragment property namepropValue
- fragment property valuescope
- the name of the property scope to updatescopeValue
- the scope discriminator value, (unless scope is GLOBAL
or USER where the default user name is used if null)void updateRefId(String refId)
refId
- referenced fragment definition idvoid updateRowColumn(int row, int column)
row
- fragment row positioncolumn
- fragment column positionvoid updateRowColumn(int row, int column, String scope, String scopeValue)
row
- fragment row positioncolumn
- fragment column positionscope
- the name of the property scope to updatescopeValue
- the scope discriminator value, (unless scope is GLOBAL
or USER where the default user name is used if null)void updateSecurityConstraints(SecurityConstraints constraints)
constraints
- security constraints for resourcevoid updateStateMode(String portletState, String portletMode)
portletState
- fragment portlet state or nullportletMode
- fragment portlet mode or nullvoid updateStateMode(String portletState, String portletMode, String scope, String scopeValue)
portletState
- fragment portlet state or nullportletMode
- fragment portlet mode or nullscope
- the name of the property scope to updatescopeValue
- the scope discriminator value, (unless scope is GLOBAL
or USER where the default user name is used if null)long getRefreshRate()
void setRefreshRate(long rate)
String getRefreshFunction()
void setRefreshFunction(String function)
void reorderColumns(int max)
Copyright © 1999–2016 The Apache Software Foundation. All rights reserved.