pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.site.content
Class ContentFolderNode

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.util.entity.Node
          extended by org.torweg.pulse.site.content.AbstractRegistryNode
              extended by org.torweg.pulse.site.content.RegistryLocaleNode
                  extended by org.torweg.pulse.site.content.ContentFolderNode
All Implemented Interfaces:
java.io.Serializable, JDOMable, INameable, INamed

@Entity
public class ContentFolderNode
extends RegistryLocaleNode

a Node in the ContentRegistry representing a Bundle . These ContentFolderNodes are used internally for structuring purposes.

ContentFolderNodes can contain multiple child ContentFolderNodes and also multiple ContentNodes.

Version:
$Revision: 1694 $
Author:
Daniel Dietz, Thomas Weber
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.torweg.pulse.site.content.AbstractRegistryNode
LOGGER
 
Constructor Summary
ContentFolderNode()
          Deprecated. 
ContentFolderNode(java.lang.String n)
          creates a new ContentFolderNode with the given name.
ContentFolderNode(java.lang.String n, Bundle b)
          creates a new ContentFolderNode with the given name and the given bundle.
ContentFolderNode(java.lang.String n, Bundle b, java.util.Locale l)
          creates a new ContentFolderNode with the given name and the given bundle and the given locale.
 
Method Summary
 ContentNode addContent(Content c)
          adds a Content to the ContentFolderNode.
 ContentFolderNode createCopy(java.util.Locale targetLocale, User user)
          creates a complete copy if the folder and its contents in the given locale.
 org.jdom.Element deserializeToJDOM(ServiceRequest req)
          serializes the ContentFolderNode to JDOM.
 java.util.Map<java.lang.String,java.lang.String> getActionURLs(ServiceRequest req)
          returns the delete, create and rename action URLs.
 java.lang.String getDisabledActions()
          returns :ENABLE_CREATEFOLDER.ENABLE_CREATECONTENT.
 boolean removeContent(Content c)
          removes a Content from the ContentFolderNode.
 net.sf.json.JSONObject toJSON()
          /** returns a JSONObject representation of the ContentFolderNode.
 
Methods inherited from class org.torweg.pulse.site.content.RegistryLocaleNode
addChild, addChild, getLocale, setChildren, setLocale
 
Methods inherited from class org.torweg.pulse.site.content.AbstractRegistryNode
deserializeToJDOM, getBundle, getChildByName, getName, getPathBuilder, setBundle, setName
 
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

ContentFolderNode

@Deprecated
public ContentFolderNode()
Deprecated. 

default contructor for HibernateTM.


ContentFolderNode

public ContentFolderNode(java.lang.String n)
creates a new ContentFolderNode with the given name.

Parameters:
n - the name of the new ContentFolderNode

ContentFolderNode

public ContentFolderNode(java.lang.String n, Bundle b)
creates a new ContentFolderNode with the given name and the given bundle.

Parameters:
n - the name
b - the bundle

ContentFolderNode

public ContentFolderNode(java.lang.String n, Bundle b,
                         java.util.Locale l)
creates a new ContentFolderNode with the given name and the given bundle and the given locale.

Parameters:
n - the name
b - the bundle
l - the locale
Method Detail

addContent

public ContentNode addContent(Content c)
adds a Content to the ContentFolderNode.

Parameters:
c - the Content to be set
Returns:
the newly created ContentNode

removeContent

public boolean removeContent(Content c)
removes a Content from the ContentFolderNode.

Parameters:
c - the Content to be removed
Returns:
true, if and only if the Content has been removed from the ContentFolderNode; otherwise false

deserializeToJDOM

public org.jdom.Element deserializeToJDOM(ServiceRequest req)
serializes the ContentFolderNode to JDOM.

Overrides:
deserializeToJDOM in class RegistryLocaleNode
Parameters:
req - the current request
Returns:
an Element representing the ContentFolderNode.
See Also:
AbstractRegistryNode.deserializeToJDOM()

getDisabledActions

public java.lang.String getDisabledActions()
returns :ENABLE_CREATEFOLDER.ENABLE_CREATECONTENT.

Overrides:
getDisabledActions in class RegistryLocaleNode
Returns:
:ENABLE_CREATEFOLDER.ENABLE_CREATECONTENT

getActionURLs

public java.util.Map<java.lang.String,java.lang.String> getActionURLs(ServiceRequest req)
returns the delete, create and rename action URLs.

Overrides:
getActionURLs in class RegistryLocaleNode
Parameters:
req - the current request
Returns:
the delete, create and rename action URLs

toJSON

public net.sf.json.JSONObject toJSON()
/** returns a JSONObject representation of the ContentFolderNode.

Overrides:
toJSON in class RegistryLocaleNode
Returns:
a JSONObject representation of the ContentFolderNode

createCopy

public ContentFolderNode createCopy(java.util.Locale targetLocale, User user)
creates a complete copy if the folder and its contents in the given locale.

Parameters:
targetLocale - the target locale
user - the current User
Returns:
a copy of the folder in the given locale