Skip navigation links


oracle.idm.util.progress.info
Class StateInfo

java.lang.Object
  extended by oracle.idm.util.progress.info.StateInfo

All Implemented Interfaces:
java.lang.Cloneable, XmlPrintable

public class StateInfo
extends java.lang.Object
implements java.lang.Cloneable, XmlPrintable

StateInfo represents state information about the operation whose progress is being reported.


Field Summary
static long UNKNOWN
          UNKNOWN has a value of -1L and indicates unknown time stamp.

 

Constructor Summary
StateInfo()
          Creates StateInfo with null current state and UNKNOWN time stamp.
StateInfo(long timeStamp)
          Creates StateInfo with null current state and the given time stamp
StateInfo(java.lang.String current)
          Creates StateInfo with the given current state and UNKNOWN time stamp.
StateInfo(java.lang.String current, long timeStamp)
          Creates StateInfo with the given current state and time stamp.

 

Method Summary
 java.lang.Object clone()
          Clones StateInfo.
 java.lang.String getCurrent()
          Getter for the current state property.
 long getTimeStamp()
          Getter for the timeStamp property.
 boolean isCurrent(java.lang.String state)
          Checks if the current state equals the state parameter.
 void setCurrent(java.lang.String current)
          Setter for the current state property.
 void setTimeStamp()
          Setter for the timeStamp property.
 void setTimeStamp(long timeStamp)
          Setter for the timeStamp property.
 java.lang.String toString()
          Returns a string representation of StateInfo.
 void xprint(XmlPrintWriter out)
          Prints stateInfo properties to the PrintWriter as an XML element.

 

Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

UNKNOWN

public static final long UNKNOWN
UNKNOWN has a value of -1L and indicates unknown time stamp.
See Also:
Constant Field Values

Constructor Detail

StateInfo

public StateInfo()
Creates StateInfo with null current state and UNKNOWN time stamp.

StateInfo

public StateInfo(long timeStamp)
Creates StateInfo with null current state and the given time stamp

StateInfo

public StateInfo(java.lang.String current)
Creates StateInfo with the given current state and UNKNOWN time stamp.
Parameters:
current - String representation of the current state.

StateInfo

public StateInfo(java.lang.String current,
                 long timeStamp)
Creates StateInfo with the given current state and time stamp.
Parameters:
current - String representation of the current state.

Method Detail

clone

public java.lang.Object clone()
Clones StateInfo.
Overrides:
clone in class java.lang.Object

getCurrent

public java.lang.String getCurrent()
Getter for the current state property. Value of null indicates pre-initial current state.
Returns:
String representation of the current state.

setCurrent

public void setCurrent(java.lang.String current)
Setter for the current state property. Use value of null to indicate pre-initial current state.

isCurrent

public boolean isCurrent(java.lang.String state)
Checks if the current state equals the state parameter.

getTimeStamp

public long getTimeStamp()
Getter for the timeStamp property. Value of UNKNOWN indicates unknown state time stamp.
Returns:
long representing the state time stamp.

setTimeStamp

public void setTimeStamp(long timeStamp)
Setter for the timeStamp property. Use value of UNKNOWN to indicate unknown state time stamp.

setTimeStamp

public void setTimeStamp()
Setter for the timeStamp property. Sets the time stamp to System.currentTimeMillis();

xprint

public void xprint(XmlPrintWriter out)
Prints stateInfo properties to the PrintWriter as an XML element.
Specified by:
xprint in interface XmlPrintable
Parameters:
out - PrintWriter for printing stateInfo propeties.

toString

public java.lang.String toString()
Returns a string representation of StateInfo.
Overrides:
toString in class java.lang.Object

Skip navigation links