com.anwrt.anycontent.plugins.web.repository.action
Class CreateNewPageContentAction

java.lang.Object
  extended byAbstractAction
      extended bycom.anwrt.anycontent.plugins.web.repository.action.CreateNewPageContentAction

public class CreateNewPageContentAction
extends AbstractAction

This action creates a page content in a virgin page.
The required request parameters are:

If PARAMETER_TEMPLATE is empty, the action gets the list of templates available: if there is only one, action succeed normaly, if there are more, action return the list.

See Also:
Serialized Form

Field Summary
static java.lang.String PARAMETER_LANG
          The parameter's name in request for the lang to consider
static java.lang.String PARAMETER_PAGE
          The parameter's name in request for the page where to create the page content
static java.lang.String PARAMETER_SITE
          The parameter's name in request for the site of the page to create
static java.lang.String PARAMETER_SITEMAP
          The parameter's name in request for the sitemap of the page to create
static java.lang.String PARAMETER_TEMPLATE
          The parameter's name in request for content type to choose
 
Constructor Summary
CreateNewPageContentAction()
           
 
Method Summary
 java.util.Map act(Redirector redirector, SourceResolver resolver, java.util.Map objectModel, java.lang.String source, Parameters parameters)
           
static java.lang.String computeOptions(Page page, ServiceManager manager, Logger logger)
          Compute the attributes and icon to send back for repository action
 void service(ServiceManager manager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_PAGE

public static final java.lang.String PARAMETER_PAGE
The parameter's name in request for the page where to create the page content

See Also:
Constant Field Values

PARAMETER_TEMPLATE

public static final java.lang.String PARAMETER_TEMPLATE
The parameter's name in request for content type to choose

See Also:
Constant Field Values

PARAMETER_SITE

public static final java.lang.String PARAMETER_SITE
The parameter's name in request for the site of the page to create

See Also:
Constant Field Values

PARAMETER_SITEMAP

public static final java.lang.String PARAMETER_SITEMAP
The parameter's name in request for the sitemap of the page to create

See Also:
Constant Field Values

PARAMETER_LANG

public static final java.lang.String PARAMETER_LANG
The parameter's name in request for the lang to consider

See Also:
Constant Field Values
Constructor Detail

CreateNewPageContentAction

public CreateNewPageContentAction()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Throws:
ServiceException

act

public java.util.Map act(Redirector redirector,
                         SourceResolver resolver,
                         java.util.Map objectModel,
                         java.lang.String source,
                         Parameters parameters)
                  throws java.lang.Exception
Throws:
java.lang.Exception

computeOptions

public static java.lang.String computeOptions(Page page,
                                              ServiceManager manager,
                                              Logger logger)
                                       throws java.lang.Exception
Compute the attributes and icon to send back for repository action

Parameters:
page - The page concerned
manager - The cocoon service manager
logger - The logger
Returns:
A string with \n separated attributes name
Throws:
java.lang.Exception - If an error occured


Copyright © 2006 Anyware Technologies. All Rights Reserved.