com.collabnet.tracker.ws.handler
Class SaveMetadataHandler

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

public class SaveMetadataHandler
extends java.lang.Object
implements DocumentHandler

Handler for [XMLConstants.NAMESPACE]saveMetadata documents

The document format is the following:

 <saveMetadata xmlns="urn:ws.tracker.collabnet.com"/>
 

The response document is of the type [XMLConstants.NAMESPACE]loadMetadata. Its format is:

 <loadMetadata xmlns="urn:ws.tracker.collabnet.com">
   <artifactTypes>
     see ArtifactTypeXMLHelper
   </artifactTypes>
   <queries>
     <query>
       <queryMetadata>
          see QueryMetadataXMLHelper
       </queryMetadata>
       <adhocQuery>
          see QueryXMLHelper
       </adhocQuery>
     </query>
     .... additional <query> tags
   </queries>
   <hasArtifactTemplates>true | false</hasArtifactTemplates>
   <hasReports>true | false</hasReports>
   <hasPersonalQueries>true | false</hasPersonalQueries>
 </loadMetadata>
 

Author:
sszego

Field Summary
static java.lang.String NAMESPACE_TAG_NAME
          The name of the namespace tag
static java.lang.String REQUEST_ROOT_ELEMENT_NAME
          The root element of the updateArtifactList document
 
Constructor Summary
SaveMetadataHandler()
           
 
Method Summary
 DocumentType[] getHandledDocumentTypes()
          Returns the [XMLConstants.NAMESPACE]saveMetadata DocumentType.
 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}saveMetadata 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

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

NAMESPACE_TAG_NAME

public static final java.lang.String NAMESPACE_TAG_NAME
The name of the namespace tag

See Also:
Constant Field Values
Constructor Detail

SaveMetadataHandler

public SaveMetadataHandler()
Method Detail

handle

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

Specified by:
handle in interface DocumentHandler
Throws:
java.lang.Exception
See Also:
DocumentHandler.handle(Callcontext, XMLRequest, 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.

Specified by:
getSchemaReferences in interface DocumentHandler
Throws:
SchemaReferenceException
See Also:
DocumentHandler.getSchemaReferences(Callcontext, XMLRequest)

getHandledDocumentTypes

public DocumentType[] getHandledDocumentTypes()
Returns the [XMLConstants.NAMESPACE]saveMetadata DocumentType.

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.

Specified by:
produceSchema in interface DocumentHandler
Throws:
SchemaGenerationException
See Also:
DocumentHandler.produceSchema(Callcontext, XMLRequest, SchemaVisitor)