org.apache.lenya.cms.task
Interface Task

All Superinterfaces:
org.apache.avalon.framework.parameters.Parameterizable
All Known Implementing Classes:
AbstractExporter, AbstractFilePublisher, AbstractPublisher, AbstractTask, AntTask, CommandLineTask, CopyDocumentToArea, Deactivate, DefaultFilePublisher, DocumentTask, EmptyTask, HelloWorldTask, LuceneTask, MailTask, PublicationTask, Publish, ResourceFilePublisher, StaticHTMLExporter, TaskSequence

public interface Task
extends org.apache.avalon.framework.parameters.Parameterizable

A Task is a command that can be executed.
When a Task is executed from a TaskAction or initialized from a TaskJob, the default parameters are provided. This is not a contract!


Field Summary
static java.lang.String DEFAULT_PREFIX
           
static int FAILURE
           
static java.lang.String NAMESPACE
           
static java.lang.String PARAMETER_CONTEXT_PREFIX
          The part of the URI that precedes the publication ID:
http://www.yourhost.com:8080/lenya/publication/index.html
static java.lang.String PARAMETER_PUBLICATION_ID
          The publication ID:
http://www.yourhost.com:8080/lenya/publication/index.html
static java.lang.String PARAMETER_SERVER_PORT
          The server port:
http://www.yourhost.com:8080/lenya/publication/index.html
static java.lang.String PARAMETER_SERVER_URI
          The server URI:
http://www.yourhost.com:8080/lenya/publication/index.html
static java.lang.String PARAMETER_SERVLET_CONTEXT
          The path of the servlet context:
/home/user_id/build/jakarta-tomcat/webapps/lenyacms
static int SUCCESS
           
 
Method Summary
 void execute(java.lang.String servletContextPath)
          Execute the task.
 int getResult()
          Returns the result of the task (SUCCESS, FAILURE).
 void setLabel(java.lang.String label)
          Set the label that is used to identify the task.
 
Methods inherited from interface org.apache.avalon.framework.parameters.Parameterizable
parameterize
 

Field Detail

NAMESPACE

static final java.lang.String NAMESPACE
See Also:
Constant Field Values

DEFAULT_PREFIX

static final java.lang.String DEFAULT_PREFIX
See Also:
Constant Field Values

SUCCESS

static final int SUCCESS
See Also:
Constant Field Values

FAILURE

static final int FAILURE
See Also:
Constant Field Values

PARAMETER_SERVLET_CONTEXT

static final java.lang.String PARAMETER_SERVLET_CONTEXT
The path of the servlet context:
/home/user_id/build/jakarta-tomcat/webapps/lenyacms

See Also:
Constant Field Values

PARAMETER_SERVER_URI

static final java.lang.String PARAMETER_SERVER_URI
The server URI:
http://www.yourhost.com:8080/lenya/publication/index.html

See Also:
Constant Field Values

PARAMETER_SERVER_PORT

static final java.lang.String PARAMETER_SERVER_PORT
The server port:
http://www.yourhost.com:8080/lenya/publication/index.html

See Also:
Constant Field Values

PARAMETER_CONTEXT_PREFIX

static final java.lang.String PARAMETER_CONTEXT_PREFIX
The part of the URI that precedes the publication ID:
http://www.yourhost.com:8080/lenya/publication/index.html

See Also:
Constant Field Values

PARAMETER_PUBLICATION_ID

static final java.lang.String PARAMETER_PUBLICATION_ID
The publication ID:
http://www.yourhost.com:8080/lenya/publication/index.html

See Also:
Constant Field Values
Method Detail

execute

void execute(java.lang.String servletContextPath)
             throws ExecutionException
Execute the task. All parameters must have been set with parameterize().

Parameters:
servletContextPath - the servlet-context
Throws:
ExecutionException - if the execution fails

setLabel

void setLabel(java.lang.String label)
Set the label that is used to identify the task.

Parameters:
label - the label

getResult

int getResult()
Returns the result of the task (SUCCESS, FAILURE).

Returns:


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.