com.sage.orion.sdata.servlet
Class ServiceSchema

java.lang.Object
  extended by com.sage.orion.sdata.servlet.ServiceSchema
All Implemented Interfaces:
SDataSchema

public class ServiceSchema
extends java.lang.Object
implements SDataSchema

The ServiceSchema is a class that represents the schema of a service operation. In particular it handles the generation of the schema through the getAsElement(Document) method.


Constructor Summary
ServiceSchema(java.lang.String operationFullName, java.lang.String operationName, java.util.List<ServiceField> requestFields, java.util.List<ServiceField> responseFields, java.lang.String path)
          constructor.
 
Method Summary
 org.w3c.dom.Element getAsElement(org.w3c.dom.Document document)
          returns a schema element that expresses the schema.
 java.lang.String getVersion()
          a version that identifies the schema or null if there is none
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceSchema

public ServiceSchema(java.lang.String operationFullName,
                     java.lang.String operationName,
                     java.util.List<ServiceField> requestFields,
                     java.util.List<ServiceField> responseFields,
                     java.lang.String path)
constructor.

Parameters:
operationFullName - the full name of the operation. This must be unique within the contract since it is used to form type names. It is normally the concatenation of the resource tree and the operation name.
operationName - the name of the operation
requestFields - the list of fields in the request
responseFields - the list of fields in the response
path - found. Typically this will consist of the resource name(s) followed by the $service keyword and the name of the operation, all separated by the URL separator.
Method Detail

getAsElement

public org.w3c.dom.Element getAsElement(org.w3c.dom.Document document)
Description copied from interface: SDataSchema
returns a schema element that expresses the schema.

The schema returned is intended either to be made the content of a document or added to a link element etc.

Specified by:
getAsElement in interface SDataSchema
Parameters:
document - the element to which to add itself

getVersion

public java.lang.String getVersion()
Description copied from interface: SDataSchema
a version that identifies the schema or null if there is none

Specified by:
getVersion in interface SDataSchema


Copyright © 2011 Sage Software, Inc. All rights reserved.