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.admin
Class AbstractContentRegistryEditor

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.site.content.admin.AbstractContentRegistryEditor
All Implemented Interfaces:
DeprecatedConfigurable
Direct Known Subclasses:
CMSContentRegistryEditor, CoreContentRegistryEditor, ShopContentRegistryEditor, StoreContentRegistryEditor

public abstract class AbstractContentRegistryEditor
extends Controller
implements DeprecatedConfigurable

The main, abstract ContentRegistryEditor to derive the ContentRegistryEditors for the Bundles from.

This controller provides the functions for the usage of the content-registry as shown in the west-panel of the website-administration:

Version:
$Revision: 1914 $
Author:
Daniel Dietz

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Constructor Summary
AbstractContentRegistryEditor()
           
 
Method Summary
protected  net.sf.json.JSONObject applyContentRegistrySettingsToEditNodeMap(ServiceRequest request, Node n, net.sf.json.JSONObject nodeJSONObject)
          Applies the ContentRegistry-edit-specific settings (e.g.
protected  net.sf.json.JSONObject applyContentRegistrySettingsToSelectNodeOrFolderMap(ServiceRequest request, Node node, net.sf.json.JSONObject nodeJSONObject)
          Applies the ContentRegistry-specific settings (e.g.
 java.lang.Object browseContentRegistryEdit(Bundle bundle, ServiceRequest request)
          TODO: add a clear description!
 java.lang.Object browseContentRegistrySelect(Bundle bundle, ServiceRequest request)
          TODO: add a clear description!
protected  net.sf.json.JSONObject canMoveContentOnlyToFolderCheck(RegistryLocaleNode newParentNode, RegistryLocaleNode moveNode)
          The check for moving contents.
abstract  java.lang.Object create(Bundle bundle, ServiceRequest request)
          Starts the "create-editor" for the current Bundle.
 void createContentFolderNode(Bundle bundle, ServiceRequest request)
          creates and saves a new ContentFolderNode.
 void createContentGroup(Bundle bundle, ServiceRequest request)
          creates and saves a new ContentGroup.
 void deleteAbstractContentNode(Bundle bundle, ServiceRequest request)
          deletes a ContentNode.
 void deleteRegistryLocaleNode(Bundle bundle, ServiceRequest request)
          deletes a RegistryLocale (if empty).
protected  ContentRegistryEditorConfig getConfig()
          Returns the ContentRegistryEditorConfig.
 void getContentRegistryIdPath(Bundle bundle, ServiceRequest request)
          returns an array of registry-node-ids which are the ids of the registry-nodes from content-registry-root down to the content-node that holds the content the id of which has been passed with the request.
 void init(ConfigBean c)
          initializes the ContentRegistryEditor.
 RegistryEditorResult initEditor(Bundle bundle, ServiceRequest request)
          Initialises the west-panel with the ContentRegistryEditor -tree.
 void moveRegistryLocaleNode(Bundle bundle, ServiceRequest request)
          moves a {@code ?
 void renameRegistryLocaleNode(Bundle bundle, ServiceRequest request)
          renames a RegistryLocaleNode.
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractContentRegistryEditor

public AbstractContentRegistryEditor()
Method Detail

initEditor

@RequireToken
@Action(value="contentRegistryTreeInit", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final RegistryEditorResult initEditor(Bundle bundle, ServiceRequest request)
Initialises the west-panel with the ContentRegistryEditor -tree.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
the initialization Result for the ContentRegistryEditor

browseContentRegistryEdit

@RequireToken
@Action(value="browseContentRegistryEdit", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final java.lang.Object browseContentRegistryEdit(Bundle bundle, ServiceRequest request)
TODO: add a clear description!

Parameters:
bundle - the Bundle we belong to
request - the current ServiceRequest
Returns:
null

browseContentRegistrySelect

@RequireToken
@Action(value="browseContentRegistrySelect", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final java.lang.Object browseContentRegistrySelect(Bundle bundle, ServiceRequest request)
TODO: add a clear description!

Parameters:
bundle - the Bundle we belong to
request - the current ServiceRequest
Returns:
null

applyContentRegistrySettingsToSelectNodeOrFolderMap

protected net.sf.json.JSONObject applyContentRegistrySettingsToSelectNodeOrFolderMap(ServiceRequest request, Node node,
                                                                                     net.sf.json.JSONObject nodeJSONObject)
Applies the ContentRegistry-specific settings (e.g. mode='select') to the node.

Parameters:
request - the current ServiceRequest
node - the current Node
nodeJSONObject - the node-JSON to be modified
Returns:
the modified node-JSON

applyContentRegistrySettingsToEditNodeMap

protected net.sf.json.JSONObject applyContentRegistrySettingsToEditNodeMap(ServiceRequest request, Node n,
                                                                           net.sf.json.JSONObject nodeJSONObject)
Applies the ContentRegistry-edit-specific settings (e.g. URLs) to the node.

Parameters:
request - the current ServiceRequest
n - the current Node
nodeJSONObject - the node-JSON to be modified
Returns:
the modified node

moveRegistryLocaleNode

@RequireToken
@Action(value="moveRegistryLocaleNode", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final void moveRegistryLocaleNode(Bundle bundle, ServiceRequest request)
moves a ? extends RegistryLocaleNode. By default a RegistryLocaleNode itself is not movable.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

canMoveContentOnlyToFolderCheck

protected net.sf.json.JSONObject canMoveContentOnlyToFolderCheck(RegistryLocaleNode newParentNode, RegistryLocaleNode moveNode)
The check for moving contents.

Parameters:
newParentNode - the new parent
moveNode - the node to be moved
Returns:
an error-JSONObject if occurs, null otherwise

getContentRegistryIdPath

@RequireToken
@Action(value="getContentRegistryIdPathContent", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final void getContentRegistryIdPath(Bundle bundle, ServiceRequest request)
returns an array of registry-node-ids which are the ids of the registry-nodes from content-registry-root down to the content-node that holds the content the id of which has been passed with the request.

Parameters:
bundle - the Bundle we belong to
request - the current ServiceRequest

deleteAbstractContentNode

@RequireToken
@Action(value="deleteAbstractContentNode", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final void deleteAbstractContentNode(Bundle bundle, ServiceRequest request)
deletes a ContentNode.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

renameRegistryLocaleNode

@RequireToken
@Action(value="renameRegistryLocaleNode", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final void renameRegistryLocaleNode(Bundle bundle, ServiceRequest request)
renames a RegistryLocaleNode.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

deleteRegistryLocaleNode

@RequireToken
@Action(value="deleteRegistryLocaleNode", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final void deleteRegistryLocaleNode(Bundle bundle, ServiceRequest request)
deletes a RegistryLocale (if empty).

Used for deletion of folders within website-administration of ContentRegistry.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

createContentFolderNode

@RequireToken
@Action(value="createContentFolderNode", generate=true)
@Permission(value="useContentRegistry")
@Groups(values="Admin-UI")
public final void createContentFolderNode(Bundle bundle, ServiceRequest request)
creates and saves a new ContentFolderNode.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

createContentGroup

@RequireToken
@Action(value="createContentGroup")
@Permission(value="useContentRegistry")
@Groups(values="CoreAdministrator")
public final void createContentGroup(Bundle bundle, ServiceRequest request)
creates and saves a new ContentGroup.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

getConfig

protected final ContentRegistryEditorConfig getConfig()
Returns the ContentRegistryEditorConfig.

Returns:
the configuration.

init

public final void init(ConfigBean c)
initializes the ContentRegistryEditor.

Specified by:
init in interface DeprecatedConfigurable
Parameters:
c - the ConfigBean of this Controller

create

public abstract java.lang.Object create(Bundle bundle, ServiceRequest request)
Starts the "create-editor" for the current Bundle.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
an AJAX-result