org.purl.sword.client
Class PostMessage

java.lang.Object
  extended by org.purl.sword.client.PostMessage

public class PostMessage
extends Object

Represents the details of a post to a server. The message holds all of the possible values that are to be sent from the client to the server. Not all elements of the message must be filled in. Any required fields are defined in the current SWORD specification.

Author:
Neil Taylor

Constructor Summary
PostMessage()
           
 
Method Summary
 boolean getChecksumError()
          Get the status of the checksum error.
 boolean getCorruptRequest()
          Get the status of the corrupt request flag.
 String getDestination()
          Get the destination collection.
 String getFilename()
          Get the filename.
 String getFilepath()
          Get the filepath.
 String getFiletype()
          Get the filetype.
 String getOnBehalfOf()
          Get the onBehalfOf value.
 String getPackaging()
          Get the packaging format.
 String getSlug()
          Get the Slug value.
 String getUserAgent()
           
 boolean isNoOp()
          Get the no-op state.
 boolean isUseMD5()
          Get the MD5 status.
 boolean isVerbose()
          Get the verbose value.
 void setChecksumError(boolean checksumError)
          Set the state of the checksum error.
 void setCorruptRequest(boolean corruptRequest)
          Set the state of the corrupt request flag.
 void setDestination(String destination)
          Set the destination collection.
 void setFilepath(String filepath)
          Set the filepath.
 void setFiletype(String filetype)
          Set the filetype.
 void setFormatNamespace(String packaging)
          Set the packaging format.
 void setNoOp(boolean noOp)
          Set the no-op state.
 void setOnBehalfOf(String onBehalfOf)
          Set the onBehalfOf value.
 void setSlug(String slug)
          Set the Slug value.
 void setUseMD5(boolean useMD5)
          Set the md5 state.
 void setUserAgent(String userAgent)
          Set the user agent
 void setVerbose(boolean verbose)
          Set the verbose state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostMessage

public PostMessage()
Method Detail

getFilepath

public String getFilepath()
Get the filepath.

Returns:
The filepath.

getFilename

public String getFilename()
Get the filename. This is the last element of the filepath that has been set in this class.


setFilepath

public void setFilepath(String filepath)
Set the filepath.

Parameters:
filepath - The filepath.

getDestination

public String getDestination()
Get the destination collection.

Returns:
The collection.

setDestination

public void setDestination(String destination)
Set the destination collection.

Parameters:
destination - The destination.

getFiletype

public String getFiletype()
Get the filetype.

Returns:
The filetype.

setFiletype

public void setFiletype(String filetype)
Set the filetype.

Parameters:
filetype - The filetype.

getOnBehalfOf

public String getOnBehalfOf()
Get the onBehalfOf value.

Returns:
The value.

setOnBehalfOf

public void setOnBehalfOf(String onBehalfOf)
Set the onBehalfOf value.

Parameters:
onBehalfOf - The value.

isUseMD5

public boolean isUseMD5()
Get the MD5 status.

Returns:
The value.

setUseMD5

public void setUseMD5(boolean useMD5)
Set the md5 state.

Parameters:
useMD5 - True if the message should use an MD5 checksum.

isNoOp

public boolean isNoOp()
Get the no-op state.

Returns:
The value.

setNoOp

public void setNoOp(boolean noOp)
Set the no-op state.

Parameters:
noOp - The no-op.

isVerbose

public boolean isVerbose()
Get the verbose value.

Returns:
The value.

setVerbose

public void setVerbose(boolean verbose)
Set the verbose state.

Parameters:
verbose - True if the post message should send a verbose header.

getPackaging

public String getPackaging()
Get the packaging format.

Returns:
The value.

setFormatNamespace

public void setFormatNamespace(String packaging)
Set the packaging format.

Parameters:
formatNamespace - The packaging format.

getChecksumError

public boolean getChecksumError()
Get the status of the checksum error.

Returns:
True if the client should simulate a checksum error.

setChecksumError

public void setChecksumError(boolean checksumError)
Set the state of the checksum error.

Parameters:
checksumError - True if the item should include a checksum error.

getCorruptRequest

public boolean getCorruptRequest()
Get the status of the corrupt request flag.

Returns:
True if the client should corrupt the POST header.

setCorruptRequest

public void setCorruptRequest(boolean corruptRequest)
Set the state of the corrupt request flag.

Parameters:
checksumError - True if the item should corrupt the POST header.

setSlug

public void setSlug(String slug)
Set the Slug value.

Parameters:
slug - The value.

getSlug

public String getSlug()
Get the Slug value.

Returns:
The Slug.

getUserAgent

public String getUserAgent()
Returns:
the userAgent

setUserAgent

public void setUserAgent(String userAgent)
Set the user agent

Parameters:
userAgent - the userAgent to set


Copyright © 2013 DuraSpace. All Rights Reserved.