dk.netarkivet.archive.arcrepositoryadmin
Class ArchiveStoreState

java.lang.Object
  extended by dk.netarkivet.archive.arcrepositoryadmin.ArchiveStoreState

public class ArchiveStoreState
extends java.lang.Object

This class contains a storestate, and the time, when it was last set.


Constructor Summary
ArchiveStoreState(BitArchiveStoreState storestate)
          Constructor for this class.
ArchiveStoreState(BitArchiveStoreState storestate, java.util.Date lastchanged)
          Constructor for this class.
 
Method Summary
 java.util.Date getLastChanged()
          Get the Date for when the state was lastchanged.
 BitArchiveStoreState getState()
          Return the current BitArchiveStoreState.
 void setState(BitArchiveStoreState storestate)
          Sets the current BitarchiveStoreState.
 void setState(BitArchiveStoreState storestate, java.util.Date lastchanged)
          Sets the current BitarchiveStoreState.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArchiveStoreState

public ArchiveStoreState(BitArchiveStoreState storestate)
Constructor for this class. This sets the lastchanged value to Now.

Parameters:
storestate - A BitArchiveStoreState

ArchiveStoreState

public ArchiveStoreState(BitArchiveStoreState storestate,
                         java.util.Date lastchanged)
Constructor for this class.

Parameters:
storestate - A BitArchiveStoreState
lastchanged - Time for when this state was set
Method Detail

getState

public BitArchiveStoreState getState()
Return the current BitArchiveStoreState.

Returns:
the current BitArchiveStoreState

setState

public void setState(BitArchiveStoreState storestate,
                     java.util.Date lastchanged)
Sets the current BitarchiveStoreState.

Parameters:
storestate - the BitarchiveStoreState
lastchanged - the lastchanged

setState

public void setState(BitArchiveStoreState storestate)
Sets the current BitarchiveStoreState. As a sideeffect sets lastchanged to NOW.

Parameters:
storestate - the BitarchiveStoreState

getLastChanged

public java.util.Date getLastChanged()
Get the Date for when the state was lastchanged.

Returns:
the Date for when the state was lastchanged

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object