org.nakedobjects.plugins.html.task
Class Task

java.lang.Object
  extended by org.nakedobjects.plugins.html.task.Task
Direct Known Subclasses:
AddItemToCollectionTask, EditTask, MethodTask

public abstract class Task
extends java.lang.Object

Represents a task that the user is working through. Is used for both editing objects and setting up parameters for an action method.


Field Summary
protected  java.lang.String[] descriptions
           
protected  java.lang.String error
           
protected  java.lang.String[] errors
           
protected  NakedObjectSpecification[] fieldSpecifications
           
protected  int id
           
protected  NakedObject[] initialState
           
protected  int[] maxLength
           
protected  java.lang.String[] names
           
protected  int[] noLines
           
protected  int numberOfEntries
           
protected  boolean[] optional
           
protected  boolean[] readOnly
           
protected  int[] typicalLength
           
protected  boolean[] wraps
           
 
Constructor Summary
Task(Context context, java.lang.String name, java.lang.String description, NakedObject target, int noFields)
           
 
Method Summary
abstract  void checkForValidity(Context context)
           
 void checkInstances(Context context, NakedObject[] objects)
           
abstract  NakedObject completeTask(Context context, Page page)
           
 void debug(DebugString debug)
           
 java.lang.String getDescription()
           
protected  NakedObject[] getEntries(Context context)
           
 java.lang.String[] getEntryText()
           
 java.lang.String getError()
           
 java.lang.String[] getErrors()
          Returns an array of errors, one for each element in the task.
 java.lang.String[] getFieldDescriptions()
           
 java.lang.String getId()
           
 int[] getMaxLength()
           
 java.lang.String getName()
           
 java.lang.String[] getNames()
           
 int[] getNoLines()
           
 boolean[] getOptional()
           
 NakedObject[][] getOptions(Context context)
           
protected  NakedObject[][] getOptions(Context context, int from, int len)
           
 boolean[] getReadOnly()
           
 int getStep()
           
 NakedObject getTarget(Context context)
           
 java.lang.String[] getTrail()
           
 NakedObjectSpecification[] getTypes()
           
 int[] getTypicalLength()
           
 boolean[] getWraps()
           
 void init(Context context)
           
 boolean isEditing()
           
 void nextStep()
           
 int numberOfSteps()
           
 void previousStep()
           
 void setFromFields(Request request, Context context)
           
protected  boolean simpleField(NakedObjectSpecification specification, int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errors

protected final java.lang.String[] errors

error

protected java.lang.String error

initialState

protected final NakedObject[] initialState

names

protected final java.lang.String[] names

descriptions

protected final java.lang.String[] descriptions

optional

protected final boolean[] optional

readOnly

protected final boolean[] readOnly

numberOfEntries

protected final int numberOfEntries

fieldSpecifications

protected final NakedObjectSpecification[] fieldSpecifications

noLines

protected final int[] noLines

wraps

protected final boolean[] wraps

maxLength

protected final int[] maxLength

typicalLength

protected final int[] typicalLength

id

protected final int id
Constructor Detail

Task

public Task(Context context,
            java.lang.String name,
            java.lang.String description,
            NakedObject target,
            int noFields)
Method Detail

init

public void init(Context context)

completeTask

public abstract NakedObject completeTask(Context context,
                                         Page page)

checkInstances

public void checkInstances(Context context,
                           NakedObject[] objects)

debug

public void debug(DebugString debug)

simpleField

protected boolean simpleField(NakedObjectSpecification specification,
                              int i)

getDescription

public java.lang.String getDescription()

getError

public java.lang.String getError()

getErrors

public java.lang.String[] getErrors()
Returns an array of errors, one for each element in the task.


getFieldDescriptions

public java.lang.String[] getFieldDescriptions()

getEntryText

public java.lang.String[] getEntryText()

getName

public java.lang.String getName()

getNames

public java.lang.String[] getNames()

getOptions

public NakedObject[][] getOptions(Context context)

getOptions

protected NakedObject[][] getOptions(Context context,
                                     int from,
                                     int len)

getEntries

protected NakedObject[] getEntries(Context context)

getId

public java.lang.String getId()

getOptional

public boolean[] getOptional()

getNoLines

public int[] getNoLines()

getWraps

public boolean[] getWraps()

getMaxLength

public int[] getMaxLength()

getTypicalLength

public int[] getTypicalLength()

getReadOnly

public boolean[] getReadOnly()

getStep

public int getStep()

getTarget

public NakedObject getTarget(Context context)

getTrail

public java.lang.String[] getTrail()

getTypes

public NakedObjectSpecification[] getTypes()

isEditing

public boolean isEditing()

nextStep

public void nextStep()

numberOfSteps

public int numberOfSteps()

previousStep

public void previousStep()

setFromFields

public void setFromFields(Request request,
                          Context context)

checkForValidity

public abstract void checkForValidity(Context context)


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.