Style Intelligence v12.0

inetsoft.sree.schedule
Class DefaultUserCondition

java.lang.Object
  extended by inetsoft.sree.schedule.DefaultUserCondition
All Implemented Interfaces:
ScheduleCondition, UserCondition, inetsoft.util.XMLSerializable, Serializable

public abstract class DefaultUserCondition
extends Object
implements UserCondition, inetsoft.util.XMLSerializable

See Also:
Serialized Form

Field Summary
protected  RepletRequest request
           
 
Constructor Summary
DefaultUserCondition()
          Constructor.
 
Method Summary
 String byteDecode(String encString)
          Convert the encoded string to the original unencoded string.
 String byteEncode(String source)
          Encode non-ascii characters to unicode enclosed in '[]'.
abstract  boolean check(long curr)
          Check the condition.
 boolean equals(Object val)
          Check if the two user condition is same condition.
abstract  String getLabel()
          Get the condition label.
 RepletRequest getRepletRequest()
          Get the action request object.
abstract  long getRetryTime(long curr)
          Get the next time to retry the condition.
 int hashCode()
          return the condition's hashCode.
 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)
          Write the xml segment to print writer.
 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)
          Method to parse an xml segment.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

request

protected RepletRequest request
Constructor Detail

DefaultUserCondition

public DefaultUserCondition()
Constructor. Set default replet request.

Method Detail

getLabel

public abstract String getLabel()
Get the condition label.

Specified by:
getLabel in interface UserCondition

getRepletRequest

public RepletRequest getRepletRequest()
Get the action request object.

Specified by:
getRepletRequest in interface UserCondition

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 UserCondition
Parameters:
request - ation request.

check

public abstract boolean check(long curr)
Check the condition.

Specified by:
check in interface ScheduleCondition
Parameters:
curr - current time.
Returns:
true if the condition is met.

getRetryTime

public abstract long getRetryTime(long curr)
Get the next time to retry the condition.

Specified by:
getRetryTime in interface ScheduleCondition
Parameters:
curr - current time.
Returns:
the next time to retry. Negative value to stop retry.

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.

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.

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.

parseXML

public void parseXML(Element tag)
              throws Exception
Write the xml segment to print writer.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Parameters:
tag - the XML representation of this action.
Throws:
Exception

writeXML

public void writeXML(PrintWriter writer)
Method to parse an xml segment.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable

byteDecode

public String byteDecode(String encString)
Convert the encoded string to the original unencoded string.

Parameters:
encString - a string encoded using the byteEncode method.
Returns:
original string.

byteEncode

public String byteEncode(String source)
Encode non-ascii characters to unicode enclosed in '[]'.

Parameters:
source - source string.
Returns:
encoded string.

equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
return the condition's hashCode.

Overrides:
hashCode in class Object

toString

public String toString()
To String.

Overrides:
toString in class Object

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