|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.util.entity.Node
org.torweg.pulse.site.map.SitemapNode
@Entity
@Indexed
@FullTextFilterDefs(value={@FullTextFilterDef(name="uniqueContents",impl=SitemapNodeUniqueContentFilter.class,cache=INSTANCE_AND_DOCIDSETRESULTS),@FullTextFilterDef(name="inRoles",impl=SitemapNodeRoleFilterFactory.class,cache=INSTANCE_AND_DOCIDSETRESULTS),@FullTextFilterDef(name="inSection",impl=SitemapNodeSectionTagFilterFactory.class,cache=INSTANCE_AND_DOCIDSETRESULTS),@FullTextFilterDef(name="duration",impl=SitemapNodeDurationFilterFactory.class,cache=INSTANCE_AND_DOCIDSETRESULTS)})
public class SitemapNode
a SitemapNode is an entry in the websites Sitemap.
The View of the SitemapNode represents the association of the
SitemapNode with a specific Content. Moreover, the
SitemapNode may contain a set of attributes which may be used during
XSL transformation or OutputEvents to customize the output.
Sitemap, View, SitemapDisabledActions, SitemapNodeUniqueContentFilter, Serialized Form| Nested Class Summary | |
|---|---|
static class |
SitemapNode.Type
The different Types available for SitemapNodes. |
| Constructor Summary | |
|---|---|
protected |
SitemapNode()
Deprecated. |
|
SitemapNode(java.lang.String n,
java.util.Locale loc)
creates a new SitemapNode with the given name and Locale. |
|
SitemapNode(java.lang.String n,
java.util.Locale loc, SitemapNode.Type t)
creates a new SitemapNode with the given name, Locale and
Type. |
|
SitemapNode(java.lang.String n,
java.util.Locale loc, View v)
creates a new SitemapNode with the given name, Locale and
View. |
|
SitemapNode(java.lang.String n,
java.util.Locale loc, View v, SitemapNode.Type t)
creates a new SitemapNode with the given name, Locale,
View and Type. |
| Method Summary | ||
|---|---|---|
void |
addChild(int pos, Node n)
adds a new SitemapNode at a given position to the list children
of this SitemapNode if Locales match. |
|
void |
addChild(Node n)
Adds a new SitemapNode to the children of this
SitemapNode if Locales match. |
|
boolean |
addRole(Role rl)
Adds a Role to the SitemapNode's Set of
Roles. |
|
void |
adoptSettingsFrom(SitemapNode sitemapNode)
Adopts the following settings from the given SitemapNode:
roles (are being overridden)
visibility
sectionTag
attributes (are being overridden)
duration (startDate/endDate)
. |
|
void |
clearRoles()
Removes all roles form the SitemapNode. |
|
org.jdom.Element |
deserializeToJDOM()
this will deserialize the state of the JDOMable as a JDOM
Element. |
|
org.jdom.Element |
deserializeToJDOMShallow()
returns the SitemapNode as an Element excluding all
children and view information. |
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
|
|
Command |
getCommand(Command template)
returns the Command that produces the view associated with the
SitemapNode. |
|
java.lang.Long |
getContentId()
returns the id of the Content referenced by the
SitemapNode's View. |
|
Duration |
getDuration()
returns the Duration of the SitemapNode or null
if no duration has been set. |
|
java.util.Locale |
getLocale()
|
|
java.lang.String |
getName()
returns the name. |
|
java.lang.StringBuilder |
getPathBuilder()
Returns a StringBuilder with the Sitemap-path of the
SitemapNode. |
|
java.util.Set<Role> |
getRoles()
Returns a shallow copy of the SitemapNode's Collection of
Roles. |
|
SitemapSectionTag |
getSectionTag()
Returns the SitemapSectionTag of the SitemapNode. |
|
SitemapNode.Type |
getType()
Returns the Type of the SitemapNode. |
|
View |
getView()
|
|
boolean |
isVisible()
|
|
void |
putAttribute(java.lang.String key,
java.lang.String value)
adds an attribute to the SitemapNode. |
|
boolean |
removeAttribute(java.lang.String key)
removes an attribute from the SitemapNode. |
|
void |
removeDuration()
removes the Duration from the SitemapNode. |
|
boolean |
removeRole(AbstractAccessControlObject rl)
Removes a Role from the SitemapNode's Set of
Roles if it is part of it. |
|
void |
removeView()
removes the View from the SitemapNode. |
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> att)
|
|
|
setChildren(java.util.List<E> nodeList)
sets the children of the SitemapNode if Locales match. |
|
void |
setDuration(Duration validity)
sets the Duration for the SitemapNode. |
|
void |
setLocale(java.util.Locale loc)
sets the Locale of the SitemapNode. |
|
void |
setName(java.lang.String n)
sets a new name for the SitemapNode. |
|
void |
setSectionTag(SitemapSectionTag tag)
Sets the SitemapSectionTag for the SitemapNode. |
|
void |
setType(SitemapNode.Type t)
Sets the Type for the SitemapNode. |
|
void |
setView(View v)
|
|
void |
setVisible(boolean v)
sets the visibility of the SitemapNode. |
|
net.sf.json.JSONObject |
toJSON()
/** returns a JSONObject representation of the
SitemapNode. |
|
| Methods inherited from class org.torweg.pulse.util.entity.Node |
|---|
getChild, getChildIndex, getChildren, getParent, hasChildren, removeChild |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity |
|---|
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Deprecated protected SitemapNode()
public SitemapNode(java.lang.String n,
java.util.Locale loc)
SitemapNode with the given name and Locale.
n - the nameloc - the Locale
public SitemapNode(java.lang.String n,
java.util.Locale loc, SitemapNode.Type t)
SitemapNode with the given name, Locale and
Type.
n - the nameloc - the Localet - the Type
public SitemapNode(java.lang.String n,
java.util.Locale loc, View v)
SitemapNode with the given name, Locale and
View.
n - the nameloc - the Localev - the View to be associated with the SitemapNode
public SitemapNode(java.lang.String n,
java.util.Locale loc, View v, SitemapNode.Type t)
SitemapNode with the given name, Locale,
View and Type.
n - the nameloc - the Localev - the View to be associated with the SitemapNodet - the Type| Method Detail |
|---|
public final void setLocale(java.util.Locale loc)
Locale of the SitemapNode.
loc - the Locale to be setpublic final java.util.Locale getLocale()
Locale of the SitemapNodepublic final void setName(java.lang.String n)
SitemapNode.
setName in interface INameablen - the name to be setpublic final java.lang.String getName()
INamed
getName in interface INamedSitemapNode.public final void setType(SitemapNode.Type t)
Type for the SitemapNode.
t - the type to setpublic final SitemapNode.Type getType()
Type of the SitemapNode.
public void addChild(Node n)
SitemapNode to the children of this
SitemapNode if Locales match.
addChild in class Noden - the SitemapNode to be added.public void addChild(int pos, Node n)
SitemapNode at a given position to the list children
of this SitemapNode if Locales match.
addChild in class Nodepos - the position in the list of childrenn - the SitemapNode to become a child of this
SitemapNode.public <E extends Node> void setChildren(java.util.List<E> nodeList)
SitemapNode if Locales match.
setChildren in class NodeE - a class extending NodenodeList - the list of child SitemapNodespublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> att)
att - The attributes to set.
public void putAttribute(java.lang.String key,
java.lang.String value)
SitemapNode.
key - the keyvalue - the valuepublic boolean removeAttribute(java.lang.String key)
SitemapNode.
key - the key of the attribute to be removed
true, if the attribute could be removed. Otherwise
false.public final View getView()
public final void setView(View v)
v - The view to set.public final void removeView()
View from the SitemapNode.
public final java.lang.Long getContentId()
Content referenced by the
SitemapNode's View.
Content or nullpublic Command getCommand(Command template)
Command that produces the view associated with the
SitemapNode.
If the View is null, the returned Command is the
template with an updated SitemapNodeID that matches the ID of the
SitemapNode.
template - the Command template
Command that produces the view associated with the
SitemapNode.public final boolean isVisible()
true, if the SitemapNode is visible.public final void setVisible(boolean v)
SitemapNode.
v - true to make the SitemapNode visible,
false to hide the SitemapNode.public final java.util.Set<Role> getRoles()
SitemapNode's Collection of
Roles.
Attention: Since the returned Set is not a reference to the
SitemapNode's internal Collection, any modifications to
its state will get lost. However, modifications to the state of the
Set's elements will be consistent.
For example: Adding/Deleting a Role to/from the Set will
not have any effect, when the SitemapNode is saved. On the other
hand, modifications to a Role in the Set will be made
persistent, when the Role is saved.
Roles associated with the Userpublic final boolean addRole(Role rl)
Role to the SitemapNode's Set of
Roles. If it already is part of the Set, it will not be
added.
rl - the Role to be added
Set changed as a result of the callpublic final boolean removeRole(AbstractAccessControlObject rl)
Role from the SitemapNode's Set of
Roles if it is part of it.
rl - the Role to be removed
Set changed as a result of the callpublic final void clearRoles()
SitemapNode.
public final void setSectionTag(SitemapSectionTag tag)
SitemapSectionTag for the SitemapNode.
tag - the sectionTag to setpublic final SitemapSectionTag getSectionTag()
SitemapSectionTag of the SitemapNode.
public final void setDuration(Duration validity)
Duration for the SitemapNode.
validity - the validitypublic final Duration getDuration()
Duration of the SitemapNode or null
if no duration has been set.
nullpublic final void removeDuration()
Duration from the SitemapNode.
public final void adoptSettingsFrom(SitemapNode sitemapNode)
SitemapNode:
sitemapNode - the SitemapNode to adopt the settings frompublic final java.lang.StringBuilder getPathBuilder()
StringBuilder with the Sitemap-path of the
SitemapNode. System.getProperty("file.separator") will
be used as path-separator.
StringBuilder with the Sitemap-path of the
SitemapNodepublic final org.jdom.Element deserializeToJDOM()
JDOMableJDOMable as a JDOM
Element.
deserializeToJDOM in interface JDOMableSitemapNode as an Elementpublic final org.jdom.Element deserializeToJDOMShallow()
SitemapNode as an Element excluding all
children and view information.
SitemapNode as an Element excluding all
children and view informationpublic final net.sf.json.JSONObject toJSON()
JSONObject representation of the
SitemapNode.
toJSON in class NodeJSONObject representation of the SitemapNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||