|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentFragment
ContentFragment is a read-only version of the 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.
Field Summary | |
---|---|
static java.lang.String |
COLUMN_PROPERTY_NAME
column standard layout property name |
static java.lang.String |
DECORATOR_PROPERTY_NAME
decorator standard layout property name |
static java.lang.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 java.lang.String |
GROUP_PROPERTY_SCOPE
group standard property scope |
static java.lang.String |
HEIGHT_PROPERTY_NAME
height standard layout property name |
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 |
MODE_PROPERTY_NAME
mode standard layout property name |
static java.lang.String |
PAGE
A fragment of type PAGE is a place holder for a page fragment. |
static java.lang.String |
PORTLET
A fragment of type PORTLET is considered to be a compliant portlet in the sense of the JSR 168. |
static java.lang.String |
REFERENCE
A fragment of type REFERENCE is a place holder for a fragment reference. |
static java.lang.String |
ROLE_PROPERTY_SCOPE
role standard property scope |
static java.lang.String |
ROW_PROPERTY_NAME
row standard layout property name |
static java.lang.String |
SIZES_PROPERTY_NAME
sizes standard layout property name |
static java.lang.String |
SKIN_PROPERTY_NAME
skin standard layout property name |
static java.lang.String |
STATE_PROPERTY_NAME
state standard layout property name |
static java.lang.String |
USER_PROPERTY_SCOPE
user standard property scope |
static java.lang.String |
WIDTH_PROPERTY_NAME
width standard layout property name |
static java.lang.String |
X_PROPERTY_NAME
x coordinate standard layout property name |
static java.lang.String |
Y_PROPERTY_NAME
y coordinate standard layout property name |
static java.lang.String |
Z_PROPERTY_NAME
z coordinate standard layout property name |
Method Summary | |
---|---|
ContentFragment |
addPortlet(java.lang.String type,
java.lang.String name)
Add portlet to fragment returning associated content fragment. |
ContentFragment |
addPortlet(java.lang.String type,
java.lang.String name,
int row,
int column)
Add portlet to fragment with specified row and column returning associated content fragment. |
void |
checkAccess(java.lang.String actions)
Check security access to fragment. |
Decoration |
getDecoration()
Retrieves the actual org.apache.jetspeed.decoration.decorator
object for this content fragment. |
java.lang.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(java.lang.String propName)
Get named property value as float. |
float |
getFloatProperty(java.lang.String propName,
java.lang.String scope,
java.lang.String scopeValue)
Get named property value as float. |
java.lang.String |
getFragmentId()
Returns the unique fragment id of this element. |
java.util.List |
getFragments()
Provides a list of of child ContentFragment objects. |
java.lang.String |
getId()
Returns the unique fully qualified id of this element. |
int |
getIntProperty(java.lang.String propName)
Get named property value as integer. |
int |
getIntProperty(java.lang.String propName,
java.lang.String scope,
java.lang.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. |
java.lang.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. |
java.lang.String |
getMode()
Returns the display mode of this fragment. |
java.lang.String |
getName()
Returns the administrative name of this fragment. |
java.lang.String |
getOverriddenContent()
|
PageLayoutComponent |
getPageLayoutComponent()
Returns the PageLayoutComponent that generated this ContentPage |
PortletContent |
getPortletContent()
Retrieve the content for this fragment |
java.util.List |
getPreferences()
Get read-only collection of fragment preference objects used to initialize user preferences |
java.util.List |
getProperties()
Get read-only list of fragment property objects that initially returns the set of properties for all scopes. |
java.util.Map |
getPropertiesMap()
Get named property value map. |
java.lang.String |
getProperty(java.lang.String propName)
Get named property value. |
java.lang.String |
getProperty(java.lang.String propName,
java.lang.String scope,
java.lang.String scopeValue)
Get named property value. |
java.lang.String |
getRefId()
Returns the id of the referenced fragment element. |
java.lang.String |
getRenderedContent()
getRenderedContent |
SecurityConstraints |
getSecurityConstraints()
Get security constraints. |
java.lang.String |
getShortTitle()
Returns the short title in the default Locale |
java.lang.String |
getSkin()
Returns the name of the skin associated to this fragment Property value is returned for the most specific scope found, (i.e. |
java.lang.String |
getState()
Returns the display state of this fragment. |
java.lang.String |
getTitle()
Returns the title in the default Locale |
java.lang.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(java.lang.String contnent)
overrideRenderedContent |
void |
setDecoration(Decoration decoration)
|
void |
setPortletContent(PortletContent portletContent)
setPortletContent |
void |
updateDecorator(java.lang.String decoratorName)
Update fragment portlet decorator. |
void |
updateDecorator(java.lang.String decoratorName,
java.lang.String scope,
java.lang.String scopeValue)
Update fragment portlet decorator. |
void |
updateName(java.lang.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,
java.lang.String scope,
java.lang.String scopeValue)
Update fragment layout position. |
void |
updatePreferences(java.util.Map preferences)
Update preferences with new preferences set, accepting Map of strings, string arrays, FragmentPreference or PortletPreference. |
void |
updateProperty(java.lang.String propName,
java.lang.String propValue)
Update fragment property. |
void |
updateProperty(java.lang.String propName,
java.lang.String propValue,
java.lang.String scope,
java.lang.String scopeValue)
Update fragment property. |
void |
updateRefId(java.lang.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,
java.lang.String scope,
java.lang.String scopeValue)
Update fragment row and column layout positions. |
void |
updateSecurityConstraints(SecurityConstraints constraints)
Update fragment security constraints. |
void |
updateStateMode(java.lang.String portletState,
java.lang.String portletMode)
Update fragment portlet state and/or mode. |
void |
updateStateMode(java.lang.String portletState,
java.lang.String portletMode,
java.lang.String scope,
java.lang.String scopeValue)
Update fragment portlet state and/or mode. |
Field Detail |
---|
static final java.lang.String SKIN_PROPERTY_NAME
static final java.lang.String DECORATOR_PROPERTY_NAME
static final java.lang.String STATE_PROPERTY_NAME
static final java.lang.String MODE_PROPERTY_NAME
static final java.lang.String ROW_PROPERTY_NAME
static final java.lang.String COLUMN_PROPERTY_NAME
static final java.lang.String SIZES_PROPERTY_NAME
static final java.lang.String X_PROPERTY_NAME
static final java.lang.String Y_PROPERTY_NAME
static final java.lang.String Z_PROPERTY_NAME
static final java.lang.String WIDTH_PROPERTY_NAME
static final java.lang.String HEIGHT_PROPERTY_NAME
static final java.lang.String USER_PROPERTY_SCOPE
static final java.lang.String GROUP_PROPERTY_SCOPE
static final java.lang.String ROLE_PROPERTY_SCOPE
static final java.lang.String GLOBAL_PROPERTY_SCOPE
static final boolean GROUP_AND_ROLE_PROPERTY_SCOPES_ENABLED
static final java.lang.String PORTLET
static final java.lang.String LAYOUT
static final java.lang.String PAGE
static final java.lang.String REFERENCE
Method Detail |
---|
SecurityConstraints getSecurityConstraints()
SecurityConstraints newSecurityConstraints()
SecurityConstraint newSecurityConstraint()
void checkAccess(java.lang.String actions) throws java.lang.SecurityException
actions
- list to be checked against in CSV string form
java.lang.SecurityException
java.lang.String getId()
java.lang.String getTitle()
java.lang.String getShortTitle()
java.lang.String getSkin()
java.lang.String getDecorator()
java.lang.String getState()
java.lang.String getMode()
java.lang.String getProperty(java.lang.String propName)
propName
- property name
java.lang.String getProperty(java.lang.String propName, java.lang.String scope, java.lang.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(java.lang.String propName)
propName
- property name
int getIntProperty(java.lang.String propName, java.lang.String scope, java.lang.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(java.lang.String propName)
propName
- property name
float getFloatProperty(java.lang.String propName, java.lang.String scope, java.lang.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)
java.util.List getProperties()
java.util.Map getPropertiesMap()
int getLayoutRow()
int getLayoutColumn()
java.lang.String getLayoutSizes()
float getLayoutX()
float getLayoutY()
float getLayoutZ()
float getLayoutWidth()
float getLayoutHeight()
java.util.List getPreferences()
java.lang.String getName()
java.lang.String getType()
java.util.List getFragments()
java.lang.String getRefId()
java.lang.String getFragmentId()
java.lang.String getRenderedContent() throws java.lang.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.
java.lang.IllegalStateException
- if the content has not yet been set.void overrideRenderedContent(java.lang.String contnent)
overrideRenderedContent
Can be used to store errors that may have occurred during the rendering process.
contnent
- java.lang.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(java.lang.String type, java.lang.String name, int row, int column)
type
- portlet typename
- portlet namerow
- fragment row positioncolumn
- fragment column position
ContentFragment addPortlet(java.lang.String type, java.lang.String name)
type
- portlet typename
- portlet name
void updateDecorator(java.lang.String decoratorName)
decoratorName
- portlet decorator namevoid updateDecorator(java.lang.String decoratorName, java.lang.String scope, java.lang.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(java.lang.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, java.lang.String scope, java.lang.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(java.util.Map preferences)
preferences
- map of new preferences set.void updateProperty(java.lang.String propName, java.lang.String propValue)
propName
- fragment property namepropValue
- fragment property valuevoid updateProperty(java.lang.String propName, java.lang.String propValue, java.lang.String scope, java.lang.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(java.lang.String refId)
refId
- referenced fragment definition idvoid updateRowColumn(int row, int column)
row
- fragment row positioncolumn
- fragment column positionvoid updateRowColumn(int row, int column, java.lang.String scope, java.lang.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(java.lang.String portletState, java.lang.String portletMode)
portletState
- fragment portlet state or nullportletMode
- fragment portlet mode or nullvoid updateStateMode(java.lang.String portletState, java.lang.String portletMode, java.lang.String scope, java.lang.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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |