|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.xml.containerpage.CmsContainerElementBean
public class CmsContainerElementBean
One element of a container in a container page.
Constructor Summary | |
---|---|
CmsContainerElementBean(CmsUUID elementId,
CmsUUID formatterId,
java.util.Map<java.lang.String,java.lang.String> individualSettings,
boolean createNew)
Creates a new container page element bean. |
Method Summary | |
---|---|
static CmsContainerElementBean |
cloneWithSettings(CmsContainerElementBean source,
java.util.Map<java.lang.String,java.lang.String> settings)
Clones the given element bean with a different set of settings. |
static CmsContainerElementBean |
createElementForResourceType(CmsObject cms,
I_CmsResourceType resourceType,
java.lang.String targetFolder,
java.util.Map<java.lang.String,java.lang.String> individualSettings,
java.util.Locale locale)
Creates an element bean for the given resource type. |
java.lang.String |
editorHash()
Returns the ADE client editor has value. |
boolean |
equals(java.lang.Object obj)
|
CmsUUID |
getFormatterId()
Returns the structure id of the formatter of this element. |
CmsUUID |
getId()
Returns the structure id of the resource of this element. |
java.util.Map<java.lang.String,java.lang.String> |
getIndividualSettings()
Returns the settings of this element. |
CmsResource |
getResource()
Returns the resource of this element. |
java.util.Map<java.lang.String,java.lang.String> |
getSettings()
Returns the element settings including default values for settings not set. |
java.lang.String |
getSitePath()
Returns the site path of the resource of this element. |
int |
hashCode()
|
void |
initResource(CmsObject cms)
Initializes the resource and the site path of this element. |
boolean |
isCreateNew()
Returns if a new element should be created replacing the given one on first edit of a container-page. |
boolean |
isGroupContainer(CmsObject cms)
Tests whether this element refers to a group container. |
boolean |
isInMemoryOnly()
Returns if the represented resource is in memory only and not persisted in the VFS. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CmsContainerElementBean(CmsUUID elementId, CmsUUID formatterId, java.util.Map<java.lang.String,java.lang.String> individualSettings, boolean createNew)
elementId
- the element's structure idformatterId
- the formatter's structure id, could be null
individualSettings
- the element settings as a map of name/value pairscreateNew
- true
if a new element should be created replacing the given one on first edit of a container-pageMethod Detail |
---|
public static CmsContainerElementBean cloneWithSettings(CmsContainerElementBean source, java.util.Map<java.lang.String,java.lang.String> settings)
source
- the element to clonesettings
- the new settings
public static CmsContainerElementBean createElementForResourceType(CmsObject cms, I_CmsResourceType resourceType, java.lang.String targetFolder, java.util.Map<java.lang.String,java.lang.String> individualSettings, java.util.Locale locale) throws CmsException
The represented resource will be in memory only and not in the VFS!!!.
cms
- the CMS contextresourceType
- the resource typetargetFolder
- the parent folder of the resourceindividualSettings
- the element settings as a map of name/value pairslocale
- the locale to use
CmsException
java.lang.IllegalArgumentException
- if the resource type not instance of CmsResourceTypeXmlContent
public java.lang.String editorHash()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public CmsUUID getFormatterId()
public CmsUUID getId()
public java.util.Map<java.lang.String,java.lang.String> getIndividualSettings()
public CmsResource getResource()
It is required to call initResource(CmsObject)
before this method can be used.
initResource(CmsObject)
public java.util.Map<java.lang.String,java.lang.String> getSettings()
Will return null
if the element bean has not been initialized with initResource(org.opencms.file.CmsObject)
.
public java.lang.String getSitePath()
It is required to call initResource(CmsObject)
before this method can be used.
initResource(CmsObject)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public void initResource(CmsObject cms) throws CmsException
cms
- the CMS context
CmsException
- if something goes wrong reading the element resourcepublic boolean isCreateNew()
true
if a new element should be created replacing the given one on first edit of a container-pagepublic boolean isGroupContainer(CmsObject cms) throws CmsException
cms
- the CmsObject used for VFS operations
CmsException
- if something goes wrongpublic boolean isInMemoryOnly()
true
if the represented resource is in memory only and not persisted in the VFSpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |