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 ContentNode

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.ContentNode
All Implemented Interfaces:
java.io.Serializable, JDOMable, INameable, INamed

@Entity
public class ContentNode
extends RegistryLocaleNode

a ContentNode is an entry in the websites ContentRegistry which can hold Content.

Version:
$Revision: 2071 $
Author:
Daniel Dietz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.torweg.pulse.site.content.AbstractRegistryNode
LOGGER
 
Constructor Summary
protected ContentNode()
          Deprecated. 
  ContentNode(Content c)
          creates a new ContentNode with a given AbstractBasicContent.
  ContentNode(Content c, Bundle bundle)
          creates a new StoreContentNode with a given Content for the given Bundle.
 
Method Summary
 ContentNode createCopy(java.util.Locale targetLocale, User user)
          creates a copy of this node and its content in the given locale.
 org.jdom.Element deserializeToJDOM(ServiceRequest req)
          serializes the StoreContentNode to JDOM.
 java.util.Map<java.lang.String,java.lang.String> getActionURLs(ServiceRequest req)
          returns the delete and edit action URLs.
 Content getContent()
           
 java.lang.String getDisabledActions()
          returns CREATE:ENABLE_DELETECONTENT.
 void setContent(Content v)
           
 net.sf.json.JSONObject toJSON()
          /** returns a JSONObject representation of the ContentNode.
 
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

ContentNode

@Deprecated
protected ContentNode()
Deprecated. 

private constructor for HibernateTM.


ContentNode

public ContentNode(Content c)
creates a new ContentNode with a given AbstractBasicContent.

Parameters:
c - the Content

ContentNode

public ContentNode(Content c, Bundle bundle)
creates a new StoreContentNode with a given Content for the given Bundle.

Parameters:
c - the Content
bundle - the Bundle
Method Detail

getContent

public final Content getContent()
Returns:
Returns the content.

setContent

public final void setContent(Content v)
Parameters:
v - The content to set.

deserializeToJDOM

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

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

getDisabledActions

public java.lang.String getDisabledActions()
returns CREATE:ENABLE_DELETECONTENT.

Overrides:
getDisabledActions in class RegistryLocaleNode
Returns:
CREATE:ENABLE_DELETECONTENT

getActionURLs

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

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

toJSON

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

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

createCopy

public ContentNode createCopy(java.util.Locale targetLocale, User user)
                       throws java.lang.UnsupportedOperationException
creates a copy of this node and its content in the given locale.

Parameters:
targetLocale - the target locale
user - the current User
Returns:
the copy of the node and its content
Throws:
java.lang.UnsupportedOperationException - if the content of the node does not support Content.createCopy(Locale, User)