org.openvpms.esci.service
Class InboxWebService

java.lang.Object
  extended by org.openvpms.esci.service.InboxWebService
All Implemented Interfaces:
InboxService

public class InboxWebService
extends Object
implements InboxService

Default implementation of the InboxService.

Version:
$LastChangedDate: $
Author:
OpenVPMS Team

Constructor Summary
InboxWebService()
           
 
Method Summary
 void acknowledge(DocumentReferenceType reference)
          Acknowledges a document.
 Document getDocument(DocumentReferenceType reference)
          Returns the document with the specified reference.
 List<DocumentReferenceType> getDocuments()
          Returns a list of document references, in the order that they were received.
 InboxService getInboxService()
          Returns the inbox service.
 void setInboxService(InboxService service)
          Registers the inbox service to delegate to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InboxWebService

public InboxWebService()
Method Detail

getDocuments

public List<DocumentReferenceType> getDocuments()
Returns a list of document references, in the order that they were received.

Each reference uniquely identifies a single document.

Specified by:
getDocuments in interface InboxService
Returns:
a list of document references

getDocument

public Document getDocument(DocumentReferenceType reference)
Returns the document with the specified reference.

Specified by:
getDocument in interface InboxService
Parameters:
reference - the document reference
Returns:
the corresponding document, or null if the document is not found

acknowledge

public void acknowledge(DocumentReferenceType reference)
                 throws DocumentNotFoundException
Acknowledges a document.

Once acknowledged, the document will no longer be returned by getDocuments() nor getDocument(org.openvpms.esci.ubl.common.aggregate.DocumentReferenceType).

Specified by:
acknowledge in interface InboxService
Parameters:
reference - the document reference
Throws:
DocumentNotFoundException - if the reference doesn't refer to a valid document

setInboxService

public void setInboxService(InboxService service)
Registers the inbox service to delegate to.

Parameters:
service - the inbox service

getInboxService

public InboxService getInboxService()
Returns the inbox service.

Returns:
the inbox service


Copyright © 2010-2011 OpenVPMS. All Rights Reserved..