org.opencms.ade.sitemap.shared
Class CmsClientSitemapEntry

java.lang.Object
  extended by org.opencms.ade.sitemap.shared.CmsClientSitemapEntry
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class CmsClientSitemapEntry
extends java.lang.Object
implements com.google.gwt.user.client.rpc.IsSerializable

Sitemap entry data.

Since:
8.0.0

Nested Class Summary
static class CmsClientSitemapEntry.EditStatus
          An enum for the edit status of the entry.
static class CmsClientSitemapEntry.EntryType
          An enum for the entry type.
 
Field Summary
static java.lang.String HIDDEN_NAVIGATION_ENTRY
          NavInfo property value to mark hidden navigation entries.
 
Constructor Summary
CmsClientSitemapEntry()
          Constructor.
CmsClientSitemapEntry(CmsClientSitemapEntry clone)
          Creates a copy without children of the given entry.
 
Method Summary
 void addSubEntry(CmsClientSitemapEntry entry, I_CmsSitemapController controller)
          Adds the given entry to the children.
 java.util.List<java.lang.String> getAliases()
          Returns the aliases.
 boolean getChildrenLoadedInitially()
          Returns true if this item's children have been loaded initially.
 java.lang.String getDateExpired()
          Returns the expiration date.
 java.lang.String getDateReleased()
          Returns the release date.
 CmsUUID getDefaultFileId()
          Gets the default file id.
 java.util.Map<java.lang.String,CmsClientProperty> getDefaultFileProperties()
          Returns the properties for the default file.
 java.lang.String getDefaultFileType()
          Returns the default file resource type name.
 java.lang.String getDetailpageTypeName()
          Returns the detail resource type name.
 CmsClientSitemapEntry.EntryType getEntryType()
          Returns the entry type.
 java.lang.String getExportName()
          Returns the cached export name for this entry.
 CmsUUID getId()
          Returns the id.
 CmsClientLock getLock()
          Returns the lock of the entry resource.
 java.lang.String getName()
          Returns the name.
 java.lang.String getNoEditReason()
          Returns the no edit reason.
 java.util.Map<java.lang.String,CmsClientProperty> getOwnProperties()
          Returns the properties for the entry itself.
 int getPosition()
          Returns the position.
 java.lang.String getPropertyValue(java.lang.String propertyName)
          Returns the property value or null if not set.
 java.lang.String getRedirectTarget()
          Returns the redirect target.
 CmsResourceState getResourceState()
          Returns the resource state.
 java.lang.String getResourceTypeName()
          Returns the resource type name.
 java.lang.String getSitePath()
          Returns the sitemap path.
 java.util.List<CmsClientSitemapEntry> getSubEntries()
          Returns the children.
 java.lang.String getTitle()
          Returns the title.
 java.lang.String getVfsPath()
          Returns the vfs path.
 boolean hasBlockingLockedChildren()
          Returns if this entry has blocking locked children.
 boolean hasForeignFolderLock()
          Returns if the entry folder is locked by another user.
 void initialize(I_CmsSitemapController controller)
          Initializes this sitemap entry.
 void initializeAll(I_CmsSitemapController controller)
          Initializes this sitemap entry and its descendants.
 void insertSubEntry(CmsClientSitemapEntry entry, int position, I_CmsSitemapController controller)
          Inserts the given entry at the given position.
 boolean isEditable()
          Returns if the current lock state allows editing.
 boolean isFolderDefaultPage()
          Returns if the entry is the folder default page.
 boolean isFolderType()
          Returns if this entry is of type folder.
 boolean isHiddenNavigationEntry()
          Returns if this is a hidden navigation entry.
 boolean isInNavigation()
          Returns if the entry is visible in navigation.
 boolean isLeafType()
          Returns if this entry is of type leaf.
 boolean isNavigationLevelType()
          Returns if this entry is of type folder.
 boolean isNew()
          Returns the "new" flag of the sitemap entry.
 boolean isResleasedAndNotExpired()
          Returns if the resource is released and not expired.
 boolean isRoot()
          Returns true if this entry is the root entry of the sitemap.
 boolean isSubSitemapType()
          Returns if this entry is of type sub-sitemap.
 void normalizeProperties()
          Removes empty properties.
 CmsClientSitemapEntry removeSubEntry(CmsUUID entryId)
          Removes the child at the given position.
 CmsClientSitemapEntry removeSubEntry(int position)
          Removes the child at the given position.
 void setAliases(java.util.List<java.lang.String> aliases)
          Sets the aliases.
 void setBlockingLockedChildren(boolean hasBlockingLockedChildren)
          Sets if the entry resource has blocking locked children that can not be locked by the current user.
 void setChildrenLoadedInitially(boolean childrenLoaded)
          Sets the 'children loaded initially' flag.
 void setDateExpired(java.lang.String dateExpired)
          Sets the expiration date.
 void setDateReleased(java.lang.String dateReleased)
          Sets the release date.
 void setDefaultFileId(CmsUUID defaultFileId)
          Sets the default file id.
 void setDefaultFileProperties(java.util.Map<java.lang.String,CmsClientProperty> properties)
          Sets the properties for the default file.
 void setDefaultFileType(java.lang.String defaultFileType)
          Sets the default file resource type name.
 void setDetailpageTypeName(java.lang.String detailpageTypeName)
          Sets the detail resource type name.
 void setEntryType(CmsClientSitemapEntry.EntryType entryType)
          Sets the entry type.
 void setExportName(java.lang.String exportName)
          Sets the export name for this entry.
 void setFolderDefaultPage(boolean isFolderDefaultPage)
          Sets if the entry is the folder default page.
 void setHasForeignFolderLock(boolean hasForeignFolderLock)
          Sets if the entry folder is locked by another user.
 void setId(CmsUUID id)
          Sets the id.
 void setInNavigation(boolean inNavigation)
          Sets the entry visibility in navigation.
 void setLock(CmsClientLock lock)
          Sets the lock of the entry resource.
 void setName(java.lang.String name)
          Sets the name.
 void setNew(boolean isNew)
          Sets the "new" flag of the client sitemap entry.
 void setNoEditReason(java.lang.String noEditReason)
          Sets the no edit reason.
 void setOwnProperties(java.util.Map<java.lang.String,CmsClientProperty> properties)
          Sets the properties for the entry itself.
 void setPosition(int position)
          Sets the position.
 void setRedirectTarget(java.lang.String redirectTarget)
          Sets the redirect target.
 void setResleasedAndNotExpired(boolean isResleasedAndNotExpired)
          Sets the resource is released and not expired flag.
 void setResourceState(CmsResourceState resourceState)
          Sets the resource state.
 void setResourceTypeName(java.lang.String typeName)
          Sets the resource type name.
 void setSitePath(java.lang.String sitepath)
          Sets the site path.
 void setSubEntries(java.util.List<CmsClientSitemapEntry> children, I_CmsSitemapController controller)
          Sets the children.
 void setVfsPath(java.lang.String path)
          Sets the VFS path.
 java.lang.String toString()
          To string.
 void update(CmsClientSitemapEntry source)
          Updates all entry properties apart from it's position-info and sub-entries.
 void updateSitePath(java.lang.String sitepath, I_CmsSitemapController controller)
          Updates the entry's site path and the name accordingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HIDDEN_NAVIGATION_ENTRY

public static final java.lang.String HIDDEN_NAVIGATION_ENTRY
NavInfo property value to mark hidden navigation entries.

See Also:
Constant Field Values
Constructor Detail

CmsClientSitemapEntry

public CmsClientSitemapEntry()
Constructor.


CmsClientSitemapEntry

public CmsClientSitemapEntry(CmsClientSitemapEntry clone)
Creates a copy without children of the given entry.

Parameters:
clone - the entry to clone
Method Detail

addSubEntry

public void addSubEntry(CmsClientSitemapEntry entry,
                        I_CmsSitemapController controller)
Adds the given entry to the children.

Parameters:
entry - the entry to add
controller - a sitemap controller instance

getAliases

public java.util.List<java.lang.String> getAliases()
Returns the aliases.

Returns:
the aliases

getChildrenLoadedInitially

public boolean getChildrenLoadedInitially()
Returns true if this item's children have been loaded initially.

Returns:
true if this item's children have been loaded initially

getDateExpired

public java.lang.String getDateExpired()
Returns the expiration date.

Returns:
the expiration date

getDateReleased

public java.lang.String getDateReleased()
Returns the release date.

Returns:
the release date

getDefaultFileId

public CmsUUID getDefaultFileId()
Gets the default file id.

Returns:
the default file id, or null if there is no detail page

getDefaultFileProperties

public java.util.Map<java.lang.String,CmsClientProperty> getDefaultFileProperties()
Returns the properties for the default file.

Returns:
the properties for the default file

getDefaultFileType

public java.lang.String getDefaultFileType()
Returns the default file resource type name.

Returns:
the default file resource type name

getDetailpageTypeName

public java.lang.String getDetailpageTypeName()
Returns the detail resource type name.

Returns:
the detail resource type name

getEntryType

public CmsClientSitemapEntry.EntryType getEntryType()
Returns the entry type.

Returns:
the entry type

getExportName

public java.lang.String getExportName()
Returns the cached export name for this entry.

Returns:
the cached export name for this entry

getId

public CmsUUID getId()
Returns the id.

Returns:
the id

getLock

public CmsClientLock getLock()
Returns the lock of the entry resource.

Returns:
the lock of the entry resource

getName

public java.lang.String getName()
Returns the name.

Returns:
the name

getNoEditReason

public java.lang.String getNoEditReason()
Returns the no edit reason.

Returns:
the no edit reason

getOwnProperties

public java.util.Map<java.lang.String,CmsClientProperty> getOwnProperties()
Returns the properties for the entry itself.

Returns:
the properties for the entry itself

getPosition

public int getPosition()
Returns the position.

Returns:
the position

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String propertyName)
Returns the property value or null if not set.

Parameters:
propertyName - the property name
Returns:
the property value

getRedirectTarget

public java.lang.String getRedirectTarget()
Returns the redirect target.

Returns:
the redirect target

getResourceState

public CmsResourceState getResourceState()
Returns the resource state.

Returns:
the resource state

getResourceTypeName

public java.lang.String getResourceTypeName()
Returns the resource type name.

Returns:
the resource type name

getSitePath

public java.lang.String getSitePath()
Returns the sitemap path.

Returns:
the sitemap path

getSubEntries

public java.util.List<CmsClientSitemapEntry> getSubEntries()
Returns the children.

Returns:
the children

getTitle

public java.lang.String getTitle()
Returns the title.

Returns:
the title

getVfsPath

public java.lang.String getVfsPath()
Returns the vfs path.

Returns:
the vfs path

hasBlockingLockedChildren

public boolean hasBlockingLockedChildren()
Returns if this entry has blocking locked children.

Returns:
true if this entry has blocking locked children

hasForeignFolderLock

public boolean hasForeignFolderLock()
Returns if the entry folder is locked by another user.

Returns:
true if the entry folder is locked by another user

initialize

public void initialize(I_CmsSitemapController controller)
Initializes this sitemap entry.

Parameters:
controller - a sitemap controller instance

initializeAll

public void initializeAll(I_CmsSitemapController controller)
Initializes this sitemap entry and its descendants.

Parameters:
controller - the controller instance with which to initialize the entries

insertSubEntry

public void insertSubEntry(CmsClientSitemapEntry entry,
                           int position,
                           I_CmsSitemapController controller)
Inserts the given entry at the given position.

Parameters:
entry - the entry to insert
position - the position
controller - a sitemap controller instance

isEditable

public boolean isEditable()
Returns if the current lock state allows editing.

Returns:
true if the resource is editable

isFolderDefaultPage

public boolean isFolderDefaultPage()
Returns if the entry is the folder default page.

Returns:
if the entry is the folder default page

isFolderType

public boolean isFolderType()
Returns if this entry is of type folder.

Returns:
true if this entry is of type folder

isHiddenNavigationEntry

public boolean isHiddenNavigationEntry()
Returns if this is a hidden navigation entry.

Returns:
true if this is a hidden navigation entry

isInNavigation

public boolean isInNavigation()
Returns if the entry is visible in navigation.

Returns:
true if the entry is visible in navigation

isLeafType

public boolean isLeafType()
Returns if this entry is of type leaf.

Returns:
true if this entry is of type leaf

isNavigationLevelType

public boolean isNavigationLevelType()
Returns if this entry is of type folder.

Returns:
true if this entry is of type folder

isNew

public boolean isNew()
Returns the "new" flag of the sitemap entry.

Returns:
the "new" flag

isResleasedAndNotExpired

public boolean isResleasedAndNotExpired()
Returns if the resource is released and not expired.

Returns:
true if the resource is released and not expired

isRoot

public boolean isRoot()
Returns true if this entry is the root entry of the sitemap.

Returns:
true if this entry is the root entry of the sitemap

isSubSitemapType

public boolean isSubSitemapType()
Returns if this entry is of type sub-sitemap.

Returns:
true if this entry is of type sub-sitemap

normalizeProperties

public void normalizeProperties()
Removes empty properties.


removeSubEntry

public CmsClientSitemapEntry removeSubEntry(CmsUUID entryId)
Removes the child at the given position.

Parameters:
entryId - the id of the child to remove
Returns:
the removed child

removeSubEntry

public CmsClientSitemapEntry removeSubEntry(int position)
Removes the child at the given position.

Parameters:
position - the index of the child to remove
Returns:
the removed child

setAliases

public void setAliases(java.util.List<java.lang.String> aliases)
Sets the aliases.

Parameters:
aliases - the aliases to set

setBlockingLockedChildren

public void setBlockingLockedChildren(boolean hasBlockingLockedChildren)
Sets if the entry resource has blocking locked children that can not be locked by the current user.

Parameters:
hasBlockingLockedChildren - true if the entry resource has blocking locked children

setChildrenLoadedInitially

public void setChildrenLoadedInitially(boolean childrenLoaded)
Sets the 'children loaded initially' flag.

Parameters:
childrenLoaded - true if children are loaded initially

setDateExpired

public void setDateExpired(java.lang.String dateExpired)
Sets the expiration date.

Parameters:
dateExpired - the expiration date to set

setDateReleased

public void setDateReleased(java.lang.String dateReleased)
Sets the release date.

Parameters:
dateReleased - the release date to set

setDefaultFileId

public void setDefaultFileId(CmsUUID defaultFileId)
Sets the default file id.

Parameters:
defaultFileId - the new default file id

setDefaultFileProperties

public void setDefaultFileProperties(java.util.Map<java.lang.String,CmsClientProperty> properties)
Sets the properties for the default file.

Parameters:
properties - the properties for the default file

setDefaultFileType

public void setDefaultFileType(java.lang.String defaultFileType)
Sets the default file resource type name.

Parameters:
defaultFileType - the default file resource type name to set

setDetailpageTypeName

public void setDetailpageTypeName(java.lang.String detailpageTypeName)
Sets the detail resource type name.

Parameters:
detailpageTypeName - the detail resource type name

setEntryType

public void setEntryType(CmsClientSitemapEntry.EntryType entryType)
Sets the entry type.

Parameters:
entryType - the entry type to set

setExportName

public void setExportName(java.lang.String exportName)
Sets the export name for this entry.

Parameters:
exportName - the export name for this entry

setFolderDefaultPage

public void setFolderDefaultPage(boolean isFolderDefaultPage)
Sets if the entry is the folder default page.

Parameters:
isFolderDefaultPage - the isFolderDefaultPage to set

setHasForeignFolderLock

public void setHasForeignFolderLock(boolean hasForeignFolderLock)
Sets if the entry folder is locked by another user.

Parameters:
hasForeignFolderLock - set true if the entry folder is locked by another user

setId

public void setId(CmsUUID id)
Sets the id.

Parameters:
id - the id to set

setInNavigation

public void setInNavigation(boolean inNavigation)
Sets the entry visibility in navigation.

Parameters:
inNavigation - set true for entries visible in navigation

setLock

public void setLock(CmsClientLock lock)
Sets the lock of the entry resource.

Parameters:
lock - the lock of the entry resource to set

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - the name to set

setNew

public void setNew(boolean isNew)
Sets the "new" flag of the client sitemap entry.

Parameters:
isNew - the new new

setNoEditReason

public void setNoEditReason(java.lang.String noEditReason)
Sets the no edit reason.

Parameters:
noEditReason - the no edit reason to set

setOwnProperties

public void setOwnProperties(java.util.Map<java.lang.String,CmsClientProperty> properties)
Sets the properties for the entry itself.

Parameters:
properties - the properties for the entry itself

setPosition

public void setPosition(int position)
Sets the position.

Parameters:
position - the position to set

setRedirectTarget

public void setRedirectTarget(java.lang.String redirectTarget)
Sets the redirect target.

Parameters:
redirectTarget - the redirect target to set

setResleasedAndNotExpired

public void setResleasedAndNotExpired(boolean isResleasedAndNotExpired)
Sets the resource is released and not expired flag.

Parameters:
isResleasedAndNotExpired - the resource is released and not expired flag

setResourceState

public void setResourceState(CmsResourceState resourceState)
Sets the resource state.

Parameters:
resourceState - the resource state to set

setResourceTypeName

public void setResourceTypeName(java.lang.String typeName)
Sets the resource type name.

Parameters:
typeName - the resource type name

setSitePath

public void setSitePath(java.lang.String sitepath)
Sets the site path.

Parameters:
sitepath - the site path to set

setSubEntries

public void setSubEntries(java.util.List<CmsClientSitemapEntry> children,
                          I_CmsSitemapController controller)
Sets the children.

Parameters:
children - the children to set
controller - a sitemap controller instance

setVfsPath

public void setVfsPath(java.lang.String path)
Sets the VFS path.

Parameters:
path - the path to set

toString

public java.lang.String toString()
To string.

Overrides:
toString in class java.lang.Object
Returns:
the string
See Also:
Object.toString()

update

public void update(CmsClientSitemapEntry source)
Updates all entry properties apart from it's position-info and sub-entries.

Parameters:
source - the source entry to update from

updateSitePath

public void updateSitePath(java.lang.String sitepath,
                           I_CmsSitemapController controller)
Updates the entry's site path and the name accordingly.

Parameters:
sitepath - the new site path to set
controller - a sitemap controller instance