com.collabnet.tracker.ws.handler
Class UpdateArtifactListHandler

java.lang.Object
  extended by com.collabnet.tracker.ws.handler.UpdateArtifactListHandler
All Implemented Interfaces:
DocumentHandler

public class UpdateArtifactListHandler
extends java.lang.Object
implements DocumentHandler

Handler for [XMLConstants.NAMESPACE]updateArtifactList documents.

The format of the request document is the following:

 <updateArtifactList xmlns="urn:ws.tracker.collabnet.com">
   <artifactList>
     <ns1:{artifactTypeXMLName} xmlns:ns1="{urn:xmlURI}">
        [attributes-to-update]
        <id>{unique-id}</id>
        <modifiedBy>{login-name}</modifiedBy>
        <lastReadOn>{last-read-in-ms}</lastReadOn>
        <reason>{reason}</reason>
     </ns1:artifactType>
     <!-- more artifacts to update, maximum 25 -->
   </artifactList>
   <sendMail>true | false</sendMail>
 </updateArtifactList>
 

where

The format of the response document generated by the handle method is described in GetArtifactListHandler. Note, that the <artifactList> document will not contain a <pageInfo> element, since the list of artifacts is not a result of a query.

A few notes on updating URL 'pseudo-attributes':

Author:
sszego

Field Summary
static java.lang.String REQUEST_ROOT_ELEMENT_NAME
          The root element of the updateArtifactList document
static java.lang.String SEND_EMAIL_XPATH
          The XPath to the sendEmail element
 
Constructor Summary
UpdateArtifactListHandler()
           
 
Method Summary
 DocumentType[] getHandledDocumentTypes()
          Returns the [XMLConstants.NAMESPACE]updateArtifactList DocumentType (non-Javadoc)
 java.util.List getSchemaReferences(Callcontext context, XMLRequest request)
          Returns the references to the schemas used by artifactList and updateArtifactList documents.
 void handle(Callcontext context, XMLRequest request, XMLResponse response)
          Handles {XMLConstants.NAMESPACE}updateArtifactList documents.
 void produceSchema(Callcontext context, XMLRequest request, SchemaVisitor visitor)
          Generates the schema for updateArtifactList and artifactList documents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEND_EMAIL_XPATH

public static final java.lang.String SEND_EMAIL_XPATH
The XPath to the sendEmail element

See Also:
Constant Field Values

REQUEST_ROOT_ELEMENT_NAME

public static final java.lang.String REQUEST_ROOT_ELEMENT_NAME
The root element of the updateArtifactList document

See Also:
Constant Field Values
Constructor Detail

UpdateArtifactListHandler

public UpdateArtifactListHandler()
Method Detail

handle

public void handle(Callcontext context,
                   XMLRequest request,
                   XMLResponse response)
            throws java.lang.Exception
Handles {XMLConstants.NAMESPACE}updateArtifactList documents. (non-Javadoc)

Specified by:
handle in interface DocumentHandler
Throws:
java.lang.Exception
See Also:
DocumentHandler.handle(com.collabnet.core.ws.services.Callcontext, com.collabnet.core.ws.dispatcher.XMLRequest, com.collabnet.core.ws.dispatcher.XMLResponse)

getSchemaReferences

public java.util.List getSchemaReferences(Callcontext context,
                                          XMLRequest request)
                                   throws SchemaReferenceException
Returns the references to the schemas used by artifactList and updateArtifactList documents. (non-Javadoc)

Specified by:
getSchemaReferences in interface DocumentHandler
Throws:
SchemaReferenceException
See Also:
DocumentHandler.getSchemaReferences(com.collabnet.core.ws.services.Callcontext, com.collabnet.core.ws.dispatcher.XMLRequest)

getHandledDocumentTypes

public DocumentType[] getHandledDocumentTypes()
Returns the [XMLConstants.NAMESPACE]updateArtifactList DocumentType (non-Javadoc)

Specified by:
getHandledDocumentTypes in interface DocumentHandler
See Also:
DocumentHandler.getHandledDocumentTypes()

produceSchema

public void produceSchema(Callcontext context,
                          XMLRequest request,
                          SchemaVisitor visitor)
                   throws SchemaGenerationException
Generates the schema for updateArtifactList and artifactList documents. (non-Javadoc)

Specified by:
produceSchema in interface DocumentHandler
Throws:
SchemaGenerationException
See Also:
DocumentHandler.produceSchema(com.collabnet.core.ws.services.Callcontext, com.collabnet.core.ws.dispatcher.XMLRequest, com.collabnet.core.xml.SchemaVisitor)