edu.wisc.ssec.mcidasv.supportform
Class McvStateCollector

java.lang.Object
  extended by edu.wisc.ssec.mcidasv.supportform.McvStateCollector
All Implemented Interfaces:
StateCollector

public class McvStateCollector
extends Object
implements StateCollector


Field Summary
private static String BUNDLE
          Name of the attachment used for the system state bundle.
private static String EXTRA
          Name of the attachment used for system properties.
private  McIDASV mcv
          Reference used to query McIDAS-V's application state.
 
Constructor Summary
McvStateCollector(McIDASV mcv)
          Builds a state collector that knows how to query McIDAS-V for specific information.
 
Method Summary
 boolean canBundleState()
          Whether or not this StateCollector allows for attaching current McIDAS-V state as a bundle.
 String getBundleAttachmentName()
          What should the name of the bundled version of McIDAS-V's current state be named?
 byte[] getBundledState()
          Current McIDAS-V state as an XML bundle named by getBundleAttachmentName().
 byte[] getContents()
          The results of getContentsAsString() as an array of bytes.
 String getContentsAsString()
          Builds the McIDAS-V system properties and returns the results as a nicely formatted String.
 String getExtraAttachmentName()
          What should the set of McIDAS-V system properties be named?
 String getLogPath()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mcv

private final McIDASV mcv
Reference used to query McIDAS-V's application state.


BUNDLE

private static final String BUNDLE
Name of the attachment used for the system state bundle.

See Also:
Constant Field Values

EXTRA

private static final String EXTRA
Name of the attachment used for system properties.

See Also:
Constant Field Values
Constructor Detail

McvStateCollector

public McvStateCollector(McIDASV mcv)
Builds a state collector that knows how to query McIDAS-V for specific information.

Parameters:
mcv - The McIDAS-V reference that we'll interrogate.
Method Detail

getBundleAttachmentName

public String getBundleAttachmentName()
What should the name of the bundled version of McIDAS-V's current state be named?

Specified by:
getBundleAttachmentName in interface StateCollector
Returns:
Filename to use as an email attachment. Note that this file is created specifically for the support request and will not exist otherwise.

getExtraAttachmentName

public String getExtraAttachmentName()
What should the set of McIDAS-V system properties be named?

Specified by:
getExtraAttachmentName in interface StateCollector
Returns:
Filename to use as an email attachment. Again, this file does not actually exist outside of the support request.

getLogPath

public String getLogPath()
Specified by:
getLogPath in interface StateCollector

getContentsAsString

public String getContentsAsString()
Builds the McIDAS-V system properties and returns the results as a nicely formatted String.

Specified by:
getContentsAsString in interface StateCollector
Returns:
The McIDAS-V system properties in the following format: KEY=VALUE\n. This is so we kinda-sorta conform to the standard Properties file format.

getContents

public byte[] getContents()
The results of getContentsAsString() as an array of bytes. This makes for a particularly easy way to attach to a HTTP POST.

Specified by:
getContents in interface StateCollector

toString

public String toString()
Specified by:
toString in interface StateCollector
Overrides:
toString in class Object

canBundleState

public boolean canBundleState()
Whether or not this StateCollector allows for attaching current McIDAS-V state as a bundle.

Specified by:
canBundleState in interface StateCollector

getBundledState

public byte[] getBundledState()
Current McIDAS-V state as an XML bundle named by getBundleAttachmentName().

Specified by:
getBundledState in interface StateCollector