edu.sdsc.inca
Class WrapSeries

java.lang.Object
  extended by edu.sdsc.inca.WrapSeries

public class WrapSeries
extends java.lang.Object

A class that wraps a SeriesConfig and its accompanying Series with some convenience methods.


Field Summary
protected  java.awt.Color color
           
protected  edu.sdsc.inca.dataModel.util.SeriesConfig config
           
protected  edu.sdsc.inca.dataModel.util.Series series
           
 
Constructor Summary
WrapSeries()
          Constructs a new WrapSeries.
WrapSeries(edu.sdsc.inca.dataModel.util.SeriesConfig config)
          Constructs a new WrapSeries to wrap an existing SeriesConfig.
 
Method Summary
 void copy(WrapSeries original)
          Copies all information from another series into this one.
 boolean equals(java.lang.Object o)
          Override of the default equals method.
 java.lang.String getAcceptedComparison()
          Returns the output comparison associated with series acceptable output testing, or null if there is none.
 java.lang.String getAcceptedComparitor()
          Returns the Comparitor class name associated with series acceptable output testing, or null if there is none.
 java.lang.String getAcceptedNotifier()
          Returns the notifier associated with series acceptable output testing, or null if there is none.
 java.lang.String getAcceptedTarget()
          Returns the notification target associated with series acceptable output testing, or null if there is none.
 java.lang.String getAction()
          Returns the action ("add", "delete") associated with the series.
 java.util.Properties getArgs()
          Returns the reporter arguments associated with the series.
 java.awt.Color getColor()
          Returns the display color used with this series.
 java.lang.String getContext()
          Returns the context string for the series.
 java.lang.String getCpuLimit()
          Returns the maximum CPU seconds an instance of the series is allowed to use; null if unlimited.
 java.lang.String getCron()
          Returns the schedule associated with the series via a cron spec.
 java.lang.String getMemoryLimit()
          Returns the maximum Memory MBs an instance of the series is allowed to use; null if unlimited.
 java.lang.String getNickname()
          Returns the nickname for the series.
 java.lang.String getReporter()
          Returns the name of the reporter.
 java.lang.String getReporterVersion()
          Returns the version of the reporter.
 java.lang.String getResource()
          Returns the name of the resource group associated with this series.
 edu.sdsc.inca.dataModel.util.SeriesConfig getSeries()
          Returns the SeriesConfig contained in this WrapSeries.
 java.lang.String getWallClockLimit()
          Returns the maximum wall clock seconds an instance of the series is allowed to use; null if unlimited.
 void setAcceptedComparison(java.lang.String comparison)
          Sets the output comparison associated with series acceptable output testing.
 void setAcceptedComparitor(java.lang.String comparitor)
          Sets the Comparitor class name associated with series acceptable output testing.
 void setAcceptedTarget(java.lang.String notifier, java.lang.String target)
          Sets the notifier and notification target associated with series acceptable output testing.
 void setAction(java.lang.String action)
          Sets the action associated with this series to a specified value.
 void setArgs(java.util.Properties args)
          Sets the reporter arguments associated with the series.
 void setColor(java.awt.Color c)
          Sets the display color used with this series.
 void setContext(java.lang.String context)
          Sets the context string for the series.
 void setCpuLimit(java.lang.String limit)
          Sets the maximum CPU seconds an instance of the series is allowed to use.
 void setCron(java.lang.String cron)
          Sets the schedule associated with the series via a cron spec.
 void setMemoryLimit(java.lang.String limit)
          Sets the maximum memory MBs an instance of the series is allowed to use.
 void setNickname(java.lang.String nickname)
          Sets the nickname for the series.
 void setReporter(java.lang.String reporter)
          Sets the name of the reporter that this series runs.
 void setReporterVersion(java.lang.String version)
          Sets the version of the reporter that this series runs.
 void setResource(java.lang.String name)
          Sets the name of the resource/group to which this series applies.
 void setWallClockLimit(java.lang.String limit)
          Sets the maximum wall seconds an instance of the series is allowed to use.
 java.lang.String toString()
          An override of the default toString function.
 java.lang.String toXml()
          Returns XML for the series.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

color

protected java.awt.Color color

config

protected edu.sdsc.inca.dataModel.util.SeriesConfig config

series

protected edu.sdsc.inca.dataModel.util.Series series
Constructor Detail

WrapSeries

public WrapSeries()
Constructs a new WrapSeries.


WrapSeries

public WrapSeries(edu.sdsc.inca.dataModel.util.SeriesConfig config)
Constructs a new WrapSeries to wrap an existing SeriesConfig.

Parameters:
config - the SeriesConfig to wrap
Method Detail

copy

public void copy(WrapSeries original)
Copies all information from another series into this one.

Parameters:
original - the WrapSeries to duplicate

equals

public boolean equals(java.lang.Object o)
Override of the default equals method.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to compare to this one
Returns:
true iff o specifies the same series

getAcceptedComparison

public java.lang.String getAcceptedComparison()
Returns the output comparison associated with series acceptable output testing, or null if there is none.

Returns:
the accepted output body, null if none

getAcceptedComparitor

public java.lang.String getAcceptedComparitor()
Returns the Comparitor class name associated with series acceptable output testing, or null if there is none.

Returns:
the accepted output Comparitor class name, null if none

getAcceptedNotifier

public java.lang.String getAcceptedNotifier()
Returns the notifier associated with series acceptable output testing, or null if there is none.

Returns:
the accepted notifier, null if none

getAcceptedTarget

public java.lang.String getAcceptedTarget()
Returns the notification target associated with series acceptable output testing, or null if there is none.

Returns:
the accepted notification target, null if none

getAction

public java.lang.String getAction()
Returns the action ("add", "delete") associated with the series.

Returns:
the action associated with the series

getArgs

public java.util.Properties getArgs()
Returns the reporter arguments associated with the series.

Returns:
the arguments as a Properties with the argument names as the keys and the argument values as the values

getColor

public java.awt.Color getColor()
Returns the display color used with this series.

Returns:
this series' display color

getContext

public java.lang.String getContext()
Returns the context string for the series.

Returns:
the series context string

getCpuLimit

public java.lang.String getCpuLimit()
Returns the maximum CPU seconds an instance of the series is allowed to use; null if unlimited.

Returns:
the maximum allowed CPU usage, null if unlimited

getCron

public java.lang.String getCron()
Returns the schedule associated with the series via a cron spec.

Returns:
a cron spec--a space-delimited list of values for the minutes, hours, day of month, month, and day of week for the schedule
See Also:
crontab(5)

getMemoryLimit

public java.lang.String getMemoryLimit()
Returns the maximum Memory MBs an instance of the series is allowed to use; null if unlimited.

Returns:
the maximum allowed memory usage, null if unlimited

getNickname

public java.lang.String getNickname()
Returns the nickname for the series.

Returns:
the series nickname

getReporter

public java.lang.String getReporter()
Returns the name of the reporter.

Returns:
the reporter name

getReporterVersion

public java.lang.String getReporterVersion()
Returns the version of the reporter.

Returns:
the reporter version, null for latest

getResource

public java.lang.String getResource()
Returns the name of the resource group associated with this series.

Returns:
the name of the series resource group

getSeries

public edu.sdsc.inca.dataModel.util.SeriesConfig getSeries()
Returns the SeriesConfig contained in this WrapSeries.

Returns:
the wrapped SeriesConfig

getWallClockLimit

public java.lang.String getWallClockLimit()
Returns the maximum wall clock seconds an instance of the series is allowed to use; null if unlimited.

Returns:
the maximum allowed wall clock usage, null if unlimited

setAcceptedComparison

public void setAcceptedComparison(java.lang.String comparison)
Sets the output comparison associated with series acceptable output testing.

Parameters:
comparison - the accepted output comparison, null if none

setAcceptedComparitor

public void setAcceptedComparitor(java.lang.String comparitor)
Sets the Comparitor class name associated with series acceptable output testing.

Parameters:
comparitor - the accepted output Comparitor class name, null if none

setAcceptedTarget

public void setAcceptedTarget(java.lang.String notifier,
                              java.lang.String target)
Sets the notifier and notification target associated with series acceptable output testing.

Parameters:
notifier - the accepted notifier, null if none
target - the accepted notification target, null if none

setAction

public void setAction(java.lang.String action)
Sets the action associated with this series to a specified value.

Parameters:
action - the action value ("add", "delete")

setArgs

public void setArgs(java.util.Properties args)
Sets the reporter arguments associated with the series.

Parameters:
args - the arguments as a Properties with the argument names as the keys and the argument values as the values

setColor

public void setColor(java.awt.Color c)
Sets the display color used with this series.

Parameters:
c - this series' display color

setContext

public void setContext(java.lang.String context)
Sets the context string for the series.

Parameters:
context - the context string of the series

setCpuLimit

public void setCpuLimit(java.lang.String limit)
Sets the maximum CPU seconds an instance of the series is allowed to use.

Parameters:
limit - the maximum allowed CPU usage in seconds, null if unlimited

setCron

public void setCron(java.lang.String cron)
Sets the schedule associated with the series via a cron spec.

Parameters:
cron - a cron spec--a space-delimited list of values for the minutes, hours, day of month, month, and day of week for the schedule
See Also:
crontab(1)

setMemoryLimit

public void setMemoryLimit(java.lang.String limit)
Sets the maximum memory MBs an instance of the series is allowed to use.

Parameters:
limit - the maximum allowed memory usage in MBs, null if unlimited

setNickname

public void setNickname(java.lang.String nickname)
Sets the nickname for the series.

Parameters:
nickname - the nickname of the series

setReporter

public void setReporter(java.lang.String reporter)
Sets the name of the reporter that this series runs.

Parameters:
name - the name of the reporter

setReporterVersion

public void setReporterVersion(java.lang.String version)
Sets the version of the reporter that this series runs.

Parameters:
version - the version of the reporter, null for latest

setResource

public void setResource(java.lang.String name)
Sets the name of the resource/group to which this series applies.

Parameters:
name - the name for the resource/group

setWallClockLimit

public void setWallClockLimit(java.lang.String limit)
Sets the maximum wall seconds an instance of the series is allowed to use.

Parameters:
limit - the maximum allowed wall usage in secs, null if unlimited

toString

public java.lang.String toString()
An override of the default toString function.

Overrides:
toString in class java.lang.Object

toXml

public java.lang.String toXml()
Returns XML for the series.

Returns:
the suite, as an XML string