Style Intelligence v12.0

inetsoft.sree.schedule
Class DefaultUserAction

java.lang.Object
  extended by inetsoft.sree.schedule.DefaultUserAction
All Implemented Interfaces:
ScheduleAction, UserAction, inetsoft.util.XMLSerializable, Serializable

public abstract class DefaultUserAction
extends Object
implements UserAction, inetsoft.util.XMLSerializable

This is the base class for all user defined schedule actions. All user defined actions must extend this class or implements the UserAction interface. A user action should always implements the equals method, otherwise a task with user action will always be treated as modified when it is reloaded by the Scheduler.

See Also:
Serialized Form

Field Summary
protected  RepletRequest request
           
 
Constructor Summary
DefaultUserAction()
           
 
Method Summary
 boolean equals(Object val)
          Check if the two user action is same action.
abstract  String getLabel()
          Get the action label.
 RepletRequest getRepletRequest()
          Get the action request object.
 void parseAttributes(Element element)
          Parses the custom XML attributes for this action.
 void parseContent(Element element)
          Parses the custom XML body content for this action.
 void parseXML(Element tag)
          
abstract  void run(Principal principal)
          Execute the action.
 void setRepletRequest(RepletRequest request)
          Set the request to use for this action.
 String toString()
          To String.
 void writeAttributes(PrintWriter writer)
          Writes the custom XML attributes for this action.
 void writeContent(PrintWriter writer)
          Writes the custom XML body content for this action.
 void writeXML(PrintWriter writer)
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

request

protected RepletRequest request
Constructor Detail

DefaultUserAction

public DefaultUserAction()
Method Detail

run

public abstract void run(Principal principal)
                  throws Throwable
Execute the action. This method must be called from the derived class if run() is overridden.

Specified by:
run in interface ScheduleAction
Parameters:
principal - represents an entity
Throws:
Throwable

setRepletRequest

public void setRepletRequest(RepletRequest request)
Set the request to use for this action. It is entered as part of the scheduling.

Specified by:
setRepletRequest in interface UserAction
Parameters:
request - action request.

getRepletRequest

public RepletRequest getRepletRequest()
Get the action request object.

Specified by:
getRepletRequest in interface UserAction

writeAttributes

public void writeAttributes(PrintWriter writer)
Writes the custom XML attributes for this action.

Parameters:
writer - the stream to which the XML is written.

parseAttributes

public void parseAttributes(Element element)
                     throws Exception
Parses the custom XML attributes for this action.

Parameters:
element - the XML representation of this action.
Throws:
Exception - if an error occurs while parsing.

writeContent

public void writeContent(PrintWriter writer)
Writes the custom XML body content for this action.

Parameters:
writer - the stream to which the XML is written.

parseContent

public void parseContent(Element element)
                  throws Exception
Parses the custom XML body content for this action.

Parameters:
element - the XML representation of this action.
Throws:
Exception - if an error occurs during parsing.

writeXML

public final void writeXML(PrintWriter writer)

Specified by:
writeXML in interface inetsoft.util.XMLSerializable

parseXML

public final void parseXML(Element tag)
                    throws Exception

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Throws:
Exception

equals

public boolean equals(Object val)
Check if the two user action is same action.

Overrides:
equals in class Object

getLabel

public abstract String getLabel()
Get the action label.

Specified by:
getLabel in interface UserAction

toString

public String toString()
To String.

Overrides:
toString in class Object

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.