dk.netarkivet.archive.arcrepository.bitpreservation
Class AdminDataMessage

java.lang.Object
  extended by dk.netarkivet.common.distribute.NetarkivetMessage
      extended by dk.netarkivet.archive.distribute.ArchiveMessage
          extended by dk.netarkivet.archive.arcrepository.bitpreservation.AdminDataMessage
All Implemented Interfaces:
java.io.Serializable

public class AdminDataMessage
extends ArchiveMessage

Class encapsulating a request to update AdminData. The message has two different types: changestorestate-type, and changechecksum-type. There is a constructor for each type.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
replyOfId
 
Constructor Summary
AdminDataMessage(java.lang.String theFileName, java.lang.String theChecksum)
          Constructor used when you want to change the checksum for the given filename.
AdminDataMessage(java.lang.String theFileName, java.lang.String theBitarchiveName, BitArchiveStoreState newval)
          Constructor used when you change the BitarchiveStoreState.
 
Method Summary
 void accept(ArchiveMessageVisitor v)
          Should be implemented as a part of the visitor pattern.
 java.lang.String getBitarchiveName()
           
 java.lang.String getChecksum()
           
 java.lang.String getFileName()
           
 BitArchiveStoreState getNewvalue()
           
 boolean isChangeChecksum()
          Return the state of the changechecksum - flag.
 boolean isChangeStoreState()
          Return the state of the changestorestate - flag.
 
Methods inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
getErrMsg, getID, getReplyOfId, getReplyTo, getTo, hasBeenSent, isOk, setNotOk, setNotOk, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdminDataMessage

public AdminDataMessage(java.lang.String theFileName,
                        java.lang.String theBitarchiveName,
                        BitArchiveStoreState newval)
Constructor used when you change the BitarchiveStoreState.

Parameters:
theFileName -
theBitarchiveName -
newval - The new BitarchiveStoreState

AdminDataMessage

public AdminDataMessage(java.lang.String theFileName,
                        java.lang.String theChecksum)
Constructor used when you want to change the checksum for the given filename.

Parameters:
theFileName - the given filename
theChecksum - the new checksum for the filename
Method Detail

accept

public void accept(ArchiveMessageVisitor v)
Should be implemented as a part of the visitor pattern. fx.: public void accept(ArchiveMessageVisitor v) { v.visit(this); }

Specified by:
accept in class ArchiveMessage
Parameters:
v - A message visitor
See Also:
ArchiveMessageVisitor

getBitarchiveName

public java.lang.String getBitarchiveName()
Returns:
Returns the bitarchiveName.

getFileName

public java.lang.String getFileName()
Returns:
Returns the fileName.

getChecksum

public java.lang.String getChecksum()

isChangeStoreState

public boolean isChangeStoreState()
Return the state of the changestorestate - flag.

Returns:
true, if this message is a changestorestate message

isChangeChecksum

public boolean isChangeChecksum()
Return the state of the changechecksum - flag.

Returns:
true, if this message is a changechecksum message

getNewvalue

public BitArchiveStoreState getNewvalue()
Returns:
Returns the newvalue.