|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.cmis.interopserver.services.cap.CAPHandler
public class CAPHandler
| Nested Class Summary | |
|---|---|
(package private) class |
CAPHandler.CAPErrorHandler
|
| Field Summary | |
|---|---|
(package private) boolean |
addNoteElement
whether we're adding a "note" element that says who posted this attachment and when. |
(package private) static org.cmis.common.alerts.AlertsConstants |
alertsConstants
CAP uses the Alerts service for all of it's server-side work. |
static java.lang.String |
INTEROP_CONFIG_FILE_NAME
|
java.lang.String |
INTEROP_SERVER
|
(package private) java.lang.String |
lastTime
This holds the time of the most recent request. |
(package private) static java.util.logging.Logger |
log
CMIS logger |
(package private) org.cmis.client.common.ThinRPCLayer |
proxy
every CAPHandler must be initialized with a proxy. |
(package private) boolean |
verifyAgainstSchema
whether we'll verify incoming cap messages against the schema (the location of which is hardcoded, by the way) |
| Constructor Summary | |
|---|---|
CAPHandler(org.cmis.client.common.ThinRPCLayer proxy)
normal constructor |
|
| Method Summary | |
|---|---|
java.lang.String |
addResourceElement(org.w3c.dom.Document doc,
org.cmis.interopserver.beans.cap.CAPAttachmentDescriptor ad,
org.cmis.client.app.attachments.AttachmentObject attachObj)
Adds a resource tag containing the information from this attachObj and attachment descriptor. |
CAPAlert |
getCAPAlertById(java.lang.String messageid,
long cogId)
gets the CAP that corresponds to this ID, or null if it isn't there. |
org.cmis.interopserver.beans.cap.Alert[] |
getCAPAlertsByDate(java.util.Calendar lastupdate,
long cogId)
Gets all cap alerts on or after the given date. |
java.lang.String[] |
getCAPAlertsByMultiSearch(java.util.List searchTerms,
long cogId)
The mondo search method that is not tested enough. |
java.lang.String[] |
getCAPAlertsByXPath(java.lang.String query,
long cogId)
Returns a list of all cap alerts (in XML form that match a given xpath expression. |
org.cmis.interopserver.beans.cap.Alert |
getCAPById(java.lang.String messageid,
long cogId)
gets the CAP that corresponds to this ID, or null if it isn't there. |
java.lang.String |
getCOGName(long cogId)
gets the cog name that corresponds to this cog id. |
org.w3c.dom.Document[] |
getDocumentArrayFromStringArray(java.lang.String[] strings)
|
org.w3c.dom.Document |
getDocumentFromString(java.lang.String capXML)
|
java.lang.String |
getLastTime()
wraps verifier.verify(string) in case we change verifiers at some point, or want to do something interesting when verifying. |
java.lang.String |
getPrettyXMLFromDocument(org.w3c.dom.Document doc)
|
protected org.cmis.client.common.ThinRPCLayer |
getProxy()
|
long |
getUniqueId()
fetch a new unique id in the standard DMIS way. |
org.w3c.dom.Document |
getValidatedDocumentFromString(java.lang.String capXML)
|
java.lang.String |
getXMLFromDocument(org.w3c.dom.Document doc)
|
boolean |
isAddNoteElement()
|
boolean |
isVerifyAgainstSchema()
|
java.lang.String |
pingServerTime()
pings the server to find what time it thinks it is. |
long |
postCAPAlert(org.w3c.dom.Document cap)
|
long |
postCAPAlert(org.w3c.dom.Document cap,
java.util.List attachObjects)
|
long |
postCAPAlert(org.w3c.dom.Document cap,
java.lang.String messageId,
java.util.List mailList)
post a cap to the given list of COGs. |
long |
postCAPAlert(org.w3c.dom.Document cap,
java.lang.String messageId,
java.util.List mailList,
java.util.List attachmentDescriptors,
java.util.List dataHandlers)
Posts a cap alert. |
void |
postMultipleCAPAlerts(java.util.List alertList,
java.util.List cogList)
|
void |
postMultipleCAPAlerts(java.util.List alertList,
java.util.List cogList,
java.util.List attachObjects)
see CapMessage for usage example. |
void |
setAddNoteElement(boolean b)
|
void |
setLastTime(java.lang.String newTime)
|
void |
setVerifyAgainstSchema(boolean b)
|
org.w3c.dom.Document |
verifyCAPAlert(org.w3c.dom.Document doc)
This is quite inefficient. |
protected org.cmis.interopserver.beans.cap.Alert |
XMLToAlert(java.lang.String string)
Alert objects are rarely (if ever) used anymore, but they were used early on in CAPdom and so this method is still here. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INTEROP_CONFIG_FILE_NAME
public java.lang.String INTEROP_SERVER
static final org.cmis.common.alerts.AlertsConstants alertsConstants
static java.util.logging.Logger log
org.cmis.client.common.ThinRPCLayer proxy
java.lang.String lastTime
boolean verifyAgainstSchema
boolean addNoteElement
| Constructor Detail |
|---|
public CAPHandler(org.cmis.client.common.ThinRPCLayer proxy)
| Method Detail |
|---|
protected org.cmis.client.common.ThinRPCLayer getProxy()
public org.cmis.interopserver.beans.cap.Alert getCAPById(java.lang.String messageid,
long cogId)
throws java.lang.Exception
messageid - cogId - cog ID of the COG we're looking up.
a - TransportException if there are communication problems; if the TransportException
wraps another exception, it throws that exception instead.
java.lang.Exception
public CAPAlert getCAPAlertById(java.lang.String messageid,
long cogId)
throws java.lang.Exception
messageid - cogId - cog ID of the COG we're looking up.
a - TransportException if there are communication problems; if the TransportException
wraps another exception, it throws that exception instead.
5.16.2005 - New method to replace getCAPById which returns an Alert
that is converted here and in the caller.
java.lang.Exception
public java.lang.String pingServerTime()
throws java.lang.Exception
messageid - cogId - cog ID of the COG we're looking up.
java.lang.Exception
public java.lang.String[] getCAPAlertsByMultiSearch(java.util.List searchTerms,
long cogId)
throws java.lang.Exception
searchTerms - cogId -
java.lang.Exception
org.cmis.transport.common.TransportException
public org.cmis.interopserver.beans.cap.Alert[] getCAPAlertsByDate(java.util.Calendar lastupdate,
long cogId)
throws java.lang.Exception
lastupdate - cogId - cog ID of the COG we're looking up.
java.lang.Exception
public java.lang.String[] getCAPAlertsByXPath(java.lang.String query,
long cogId)
throws java.lang.Exception
query - cogId -
java.lang.Exception
public long postCAPAlert(org.w3c.dom.Document cap,
java.lang.String messageId,
java.util.List mailList)
throws org.cmis.transport.common.TransportException,
org.xml.sax.SAXException,
java.lang.Exception
cap - messageId - mailList -
org.cmis.transport.common.TransportException
org.xml.sax.SAXException
java.lang.Exception
public long getUniqueId()
throws org.cmis.transport.common.TransportException
org.cmis.transport.common.TransportException
public long postCAPAlert(org.w3c.dom.Document cap,
java.lang.String messageId,
java.util.List mailList,
java.util.List attachmentDescriptors,
java.util.List dataHandlers)
throws org.cmis.transport.common.TransportException,
org.xml.sax.SAXException,
java.lang.Exception
cap - messageId - mailList - attachmentDescriptors - dataHandlers -
org.cmis.transport.common.TransportException
org.xml.sax.SAXException
java.lang.Exception
public long postCAPAlert(org.w3c.dom.Document cap)
throws org.cmis.transport.common.TransportException,
org.xml.sax.SAXException,
java.lang.Exception
cap - cogId -
org.cmis.transport.common.TransportException
org.xml.sax.SAXException
java.lang.Exception
public long postCAPAlert(org.w3c.dom.Document cap,
java.util.List attachObjects)
throws org.cmis.transport.common.TransportException,
org.xml.sax.SAXException,
java.lang.Exception
cap - attachObjects -
org.cmis.transport.common.TransportException
org.xml.sax.SAXException
java.lang.Exception
public java.lang.String getCOGName(long cogId)
throws java.lang.Exception
cogId -
java.lang.Exception
org.cmis.transport.common.TransportException
public void postMultipleCAPAlerts(java.util.List alertList,
java.util.List cogList)
throws org.cmis.transport.common.TransportException
alertList - cogList -
org.cmis.transport.common.TransportException
public void postMultipleCAPAlerts(java.util.List alertList,
java.util.List cogList,
java.util.List attachObjects)
throws org.cmis.transport.common.TransportException
alertList - cogList - attachObjects -
org.cmis.transport.common.TransportException
protected org.cmis.interopserver.beans.cap.Alert XMLToAlert(java.lang.String string)
throws java.io.IOException
string -
java.io.IOExceptionpublic java.lang.String getLastTime()
capXML -
org.xml.sax.SAXException
java.io.IOExceptionpublic void setLastTime(java.lang.String newTime)
newTime -
public org.w3c.dom.Document verifyCAPAlert(org.w3c.dom.Document doc)
throws java.lang.Exception
w3cDoc - cogid -
org.xml.sax.SAXException
java.io.IOException
java.lang.Exceptionpublic boolean isAddNoteElement()
public boolean isVerifyAgainstSchema()
public void setAddNoteElement(boolean b)
b - public void setVerifyAgainstSchema(boolean b)
b -
public java.lang.String addResourceElement(org.w3c.dom.Document doc,
org.cmis.interopserver.beans.cap.CAPAttachmentDescriptor ad,
org.cmis.client.app.attachments.AttachmentObject attachObj)
throws org.xml.sax.SAXException
attachObj -
org.xml.sax.SAXException
public org.w3c.dom.Document getDocumentFromString(java.lang.String capXML)
throws org.xml.sax.SAXException,
java.io.IOException
capXML -
org.xml.sax.SAXException
java.io.IOException
public java.lang.String getPrettyXMLFromDocument(org.w3c.dom.Document doc)
throws java.io.IOException
doc -
java.io.IOExceptionpublic java.lang.String getXMLFromDocument(org.w3c.dom.Document doc)
doc -
public org.w3c.dom.Document getValidatedDocumentFromString(java.lang.String capXML)
throws java.lang.Exception
capXML -
org.xml.sax.SAXException
java.io.IOException
java.lang.Exception
public org.w3c.dom.Document[] getDocumentArrayFromStringArray(java.lang.String[] strings)
throws org.xml.sax.SAXException,
java.io.IOException
strings -
org.xml.sax.SAXException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||