org.dspace.sword
Class SWORDService

java.lang.Object
  extended by org.dspace.sword.SWORDService

public class SWORDService
extends Object

Author:
Richard Jones This class represents the actual sword service provided by dspace. It is the central location for the authentcated contexts, the installation specific configuration, and the url management. It is ubiquotous in the sword implementation, and all related information and services should be retrived via this api

Field Summary
static Logger log
          Log4j logging instance
 
Constructor Summary
SWORDService(SWORDContext sc)
          Construct a new service instance around the given authenticated sword context
 
Method Summary
 Context getContext()
           
 String getFilename(Context context, Deposit deposit, boolean original)
          Construct the most appropriate filename for the incoming deposit
 SWORDConfiguration getSwordConfig()
           
 SWORDContext getSwordContext()
           
 String getTempFilename()
          Get the name of the temp files that should be used
 SWORDUrlManager getUrlManager()
           
 StringBuilder getVerboseDescription()
           
 boolean isVerbose()
           
 void message(String message)
          shortcut to registering a message with the verboseDescription member variable.
 void setSwordConfig(SWORDConfiguration swordConfig)
           
 void setSwordContext(SWORDContext swordContext)
           
 void setUrlManager(SWORDUrlManager urlManager)
           
 void setVerbose(boolean verbose)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static Logger log
Log4j logging instance

Constructor Detail

SWORDService

public SWORDService(SWORDContext sc)
Construct a new service instance around the given authenticated sword context

Parameters:
sc -
Method Detail

getUrlManager

public SWORDUrlManager getUrlManager()

setUrlManager

public void setUrlManager(SWORDUrlManager urlManager)

getSwordContext

public SWORDContext getSwordContext()

setSwordContext

public void setSwordContext(SWORDContext swordContext)

getSwordConfig

public SWORDConfiguration getSwordConfig()

setSwordConfig

public void setSwordConfig(SWORDConfiguration swordConfig)

getContext

public Context getContext()

isVerbose

public boolean isVerbose()

setVerbose

public void setVerbose(boolean verbose)

getVerboseDescription

public StringBuilder getVerboseDescription()

message

public void message(String message)
shortcut to registering a message with the verboseDescription member variable. This checks to see if the request is verbose, meaning we don't have to do it inline and break nice looking code up

Parameters:
message -

getFilename

public String getFilename(Context context,
                          Deposit deposit,
                          boolean original)
                   throws DSpaceSWORDException
Construct the most appropriate filename for the incoming deposit

Parameters:
context -
deposit -
original -
Returns:
Throws:
DSpaceSWORDException

getTempFilename

public String getTempFilename()
Get the name of the temp files that should be used

Returns:


Copyright © 2009 The DSpace Foundation. All Rights Reserved.