|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.purl.sword.server.DummyServer
public class DummyServer
A 'dummy server' which acts as dumb repository which implements the SWORD ServerInterface. It accepts any type of deposit, and tries to return appropriate responses. It supports authentication: if the username and password match (case sensitive) it authenticates the user, if not, the authentication fails.
| Constructor Summary | |
|---|---|
DummyServer()
|
|
| Method Summary | |
|---|---|
AtomDocumentResponse |
doAtomDocument(AtomDocumentRequest adr)
Answer a request for an entry document |
DepositResponse |
doDeposit(Deposit deposit)
Answer a SWORD deposit |
ServiceDocument |
doServiceDocument(ServiceDocumentRequest sdr)
Provides a dumb but plausible service document - it contains an anonymous workspace and collection, and one personalised for the onBehalfOf user. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DummyServer()
| Method Detail |
|---|
public ServiceDocument doServiceDocument(ServiceDocumentRequest sdr)
throws SWORDAuthenticationException,
SWORDErrorException,
SWORDException
doServiceDocument in interface SWORDServeronBehalfOf - The user that the client is acting on behalf of
SWORDAuthenticationException - If the credentials are bad
SWORDErrorException - If something goes wrong, such as
SWORDException - Thrown in an un-handalable Exception occurs.
This will be dealt with by sending a HTTP 500 Server Exception
public DepositResponse doDeposit(Deposit deposit)
throws SWORDAuthenticationException,
SWORDErrorException,
SWORDException
SWORDServer
doDeposit in interface SWORDServerdeposit - The Deposit object
SWORDAuthenticationException - Thrown if the authentication fails
SWORDErrorException - Thrown if there was an error with the input not matching
the capabilities of the server
SWORDException - Thrown if an un-handalable Exception occurs.
This will be dealt with by sending a HTTP 500 Server Exception
public AtomDocumentResponse doAtomDocument(AtomDocumentRequest adr)
throws SWORDAuthenticationException,
SWORDErrorException,
SWORDException
SWORDServer
doAtomDocument in interface SWORDServeradr - The Atom Document Request object
SWORDAuthenticationException - Thrown if the authentication fails
SWORDErrorException - Thrown if there was an error with the input not matching
the capabilities of the server
SWORDException - Thrown if an un-handalable Exception occurs.
This will be dealt with by sending a HTTP 500 Server Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||