|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cmis.interopserver.services.capv2.CAPv2Handler
public class CAPv2Handler
Nested Class Summary | |
---|---|
(package private) class |
CAPv2Handler.CAPErrorHandler
|
Field Summary | |
---|---|
(package private) boolean |
addNoteElement
whether we're adding a "note" element that says who posted this attachment and when. |
protected static org.cmis.common.alerts.AlertsConstants |
alertsConstants
|
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
|
protected org.cmis.client.common.ThinRPCLayer |
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 | |
---|---|
CAPv2Handler(org.cmis.client.common.ThinRPCLayer proxy)
normal constructor |
Method Summary | |
---|---|
java.lang.String |
addResourceElement(org.w3c.dom.Document doc,
org.cmis.interopserver.beans.capv2.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.capv2.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)
|
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.capv2.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)
|
static org.w3c.dom.Document |
getDocumentFromString(java.lang.String capXML)
|
java.lang.String |
getLastTime()
|
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)
|
protected void |
handleAttachments(long dmisId,
long cogId,
org.w3c.dom.Document cap,
java.util.List attachments,
java.util.List descriptors,
java.util.List mailList)
"handles" attachments. |
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. |
protected org.w3c.dom.Document |
processCAPForPosting(org.w3c.dom.Document doc,
long cogId)
|
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.capv2.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
protected static final org.cmis.common.alerts.AlertsConstants alertsConstants
static java.util.logging.Logger log
protected org.cmis.client.common.ThinRPCLayer proxy
java.lang.String lastTime
boolean verifyAgainstSchema
boolean addNoteElement
Constructor Detail |
---|
public CAPv2Handler(org.cmis.client.common.ThinRPCLayer proxy)
Method Detail |
---|
protected org.cmis.client.common.ThinRPCLayer getProxy()
public org.cmis.interopserver.beans.capv2.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.
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.capv2.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
SAXException
java.lang.Exception
public long getUniqueId() throws org.cmis.transport.common.TransportException
org.cmis.transport.common.TransportException
protected void handleAttachments(long dmisId, long cogId, org.w3c.dom.Document cap, java.util.List attachments, java.util.List descriptors, java.util.List mailList) throws java.lang.IllegalArgumentException, org.xml.sax.SAXException, java.rmi.RemoteException, org.cmis.client.app.attachments.AttachmentFTPException
dmisId
- -- needed to place the attachments in the proper place.cogId
- cap
- attachments
- -- the attachment objects from the message. I think they must be DataHandlers,
but don't quote me. Check what BaseSoapBindingImpl.addAttachments is expecting.
Man, I'll be happy when java has typesafe lists.descriptors
- -- describe the above attachments, must match 1 to 1 in proper order.
java.lang.IllegalArgumentException
SAXException
java.rmi.RemoteException
org.cmis.client.app.attachments.AttachmentFTPException
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
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
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.capv2.Alert XMLToAlert(java.lang.String string) throws java.io.IOException
string
-
java.io.IOException
public java.lang.String getLastTime()
public void setLastTime(java.lang.String newTime)
newTime
- public org.w3c.dom.Document verifyCAPAlert(org.w3c.dom.Document doc) throws java.lang.Exception
w3cDoc
- cogid
-
SAXException
java.io.IOException
java.lang.Exception
protected org.w3c.dom.Document processCAPForPosting(org.w3c.dom.Document doc, long cogId) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public 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.capv2.CAPAttachmentDescriptor ad, org.cmis.client.app.attachments.AttachmentObject attachObj) throws org.xml.sax.SAXException
attachObj
-
org.xml.sax.SAXException
public static org.w3c.dom.Document getDocumentFromString(java.lang.String capXML) throws org.xml.sax.SAXException, java.io.IOException
capXML
-
SAXException
java.io.IOException
public java.lang.String getPrettyXMLFromDocument(org.w3c.dom.Document doc) throws java.io.IOException
doc
-
java.io.IOException
public java.lang.String getXMLFromDocument(org.w3c.dom.Document doc)
doc
-
public org.w3c.dom.Document getValidatedDocumentFromString(java.lang.String capXML) throws java.lang.Exception
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 |