WebLogic Integration


com.bea.wlai.common
Class ServiceDescriptor

java.lang.Object
  |
  +--com.bea.wlai.common.AbstractDescriptor
        |
        +--com.bea.wlai.common.AbstractPropertiedDescriptor
              |
              +--com.bea.wlai.common.ServiceDescriptor

public class ServiceDescriptor
extends AbstractPropertiedDescriptor
implements IServiceDescriptor

An implementation of the IServiceDescriptor interface for use by the WLAI server.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
Serialized Form

Constructor Summary
ServiceDescriptor(java.lang.String name, java.lang.String description, java.lang.String interactionSpecClassName, java.lang.String requestDocumentType, java.lang.String responseDocumentType)
          Construct a new ServiceDescriptor with the given name, description, interaction spec class name, and request/response document descriptors.
 
Method Summary
static IDocumentDescriptor createDocumentDescriptorFromDocumentType(java.lang.String documentType)
          Create a document descriptor from a document type specification in / format.
 void fromXML(IDocument doc)
          Extract the data for this descriptor from the given IDocument instance, replacing all contents of the current descriptor with the new data.
 java.lang.String getInteractionSpecClassName()
          Get the name of the class that implements the javax.resource.cci.InteractionSpec interface for the adapter that will implement this service.
 IDocumentDescriptor getRequestDocumentDescriptor()
          Get a descriptor for the request document required for this service.
 IDocumentDescriptor getResponseDocumentDescriptor()
          Get a descriptor for the response document returned from this service.
 boolean ownsRequestSchema()
           
 boolean ownsResponseSchema()
           
 void setInteractionSpecClassName(java.lang.String className)
          Set the name of the class that implements the javax.resource.cci.InteractionSpec interface for the adapter that will implement this service.
 void setOwnsRequestSchemaFlag(boolean bOwns)
          Sets a flag that indicates if this service owns the request schema it references; this flag is true by default.
 void setOwnsResponseSchemaFlag(boolean bOwns)
          Sets a flag that indicates if this service owns the response schema it references; this flag is true by default.
 void setRequestDocumentDescriptor(IDocumentDescriptor descriptor)
          Set the descriptor for the request document required for this service.
 void setResponseDocumentDescriptor(IDocumentDescriptor descriptor)
          Set the descriptor for the response document returned from this service.
 java.lang.String toXML()
          Get an XML representation of this descriptor.
 void toXML(IDocument doc)
          Output an XML representation of this descriptor into an IDocument instance.
 void toXML(java.io.Writer writer)
          Write an XML representation of this descriptor to the given Writer.
 
Methods inherited from class com.bea.wlai.common.AbstractPropertiedDescriptor
addProperty, getProperty, listPropertyNames, removeProperty
 
Methods inherited from class com.bea.wlai.common.AbstractDescriptor
fromXML, fromXML, getDescription, getName, isReadOnly, makeReadOnly, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDescriptor

public ServiceDescriptor(java.lang.String name,
                         java.lang.String description,
                         java.lang.String interactionSpecClassName,
                         java.lang.String requestDocumentType,
                         java.lang.String responseDocumentType)
                  throws java.lang.IllegalArgumentException
Construct a new ServiceDescriptor with the given name, description, interaction spec class name, and request/response document descriptors.
Method Detail

createDocumentDescriptorFromDocumentType

public static IDocumentDescriptor createDocumentDescriptorFromDocumentType(java.lang.String documentType)
Create a document descriptor from a document type specification in / format.


setOwnsRequestSchemaFlag

public void setOwnsRequestSchemaFlag(boolean bOwns)
Sets a flag that indicates if this service owns the request schema it references; this flag is true by default. Setting the flag to false indicates that the request schema is referenced by other components and not solely owned by this service
Specified by:
setOwnsRequestSchemaFlag in interface IServiceDescriptor


ownsRequestSchema

public boolean ownsRequestSchema()
Specified by:
ownsRequestSchema in interface IServiceDescriptor

Returns:
true if this service owns the request schema it references, false otherwise.

setOwnsResponseSchemaFlag

public void setOwnsResponseSchemaFlag(boolean bOwns)
Sets a flag that indicates if this service owns the response schema it references; this flag is true by default. Setting the flag to false indicates that the response schema is referenced by other components and not solely owned by this service
Specified by:
setOwnsResponseSchemaFlag in interface IServiceDescriptor


ownsResponseSchema

public boolean ownsResponseSchema()
Specified by:
ownsResponseSchema in interface IServiceDescriptor

Returns:
true if this service owns the response schema it references, false otherwise.

getRequestDocumentDescriptor

public IDocumentDescriptor getRequestDocumentDescriptor()
Get a descriptor for the request document required for this service.
Specified by:
getRequestDocumentDescriptor in interface IServiceDescriptor

Returns:
An IDocumentDescriptor that describes the schema (structure and content) for the request document, and the root element name that all request documents for this service must have.

setRequestDocumentDescriptor

public void setRequestDocumentDescriptor(IDocumentDescriptor descriptor)
Set the descriptor for the request document required for this service.
Specified by:
setRequestDocumentDescriptor in interface IServiceDescriptor

Parameters:
descriptor - An IDocumentDescriptor that describes the schema (structure and content) for the request document, and the root element name that all request documents for this service must have.

getResponseDocumentDescriptor

public IDocumentDescriptor getResponseDocumentDescriptor()
Get a descriptor for the response document returned from this service.
Specified by:
getResponseDocumentDescriptor in interface IServiceDescriptor

Returns:
An IDocumentDescriptor that describes the schema (structure and content) for the response document, and the root element name that all response documents from this service will have.

setResponseDocumentDescriptor

public void setResponseDocumentDescriptor(IDocumentDescriptor descriptor)
Set the descriptor for the response document returned from this service.
Specified by:
setResponseDocumentDescriptor in interface IServiceDescriptor

Parameters:
descriptor - An IDocumentDescriptor that describes the schema (structure and content) for the response document, and the root element name that all request documents for this service will have.

getInteractionSpecClassName

public java.lang.String getInteractionSpecClassName()
Get the name of the class that implements the javax.resource.cci.InteractionSpec interface for the adapter that will implement this service.
Specified by:
getInteractionSpecClassName in interface IServiceDescriptor

Returns:
The name of the class that implements the javax.resource.cci.InteractionSpec interface for the adapter that will implement this service.

setInteractionSpecClassName

public void setInteractionSpecClassName(java.lang.String className)
Set the name of the class that implements the javax.resource.cci.InteractionSpec interface for the adapter that will implement this service.
Specified by:
setInteractionSpecClassName in interface IServiceDescriptor

Parameters:
className - The name of the class that implements the javax.resource.cci.InteractionSpec interface for the adapter that will implement this service.

toXML

public java.lang.String toXML()
                       throws DocumentException
Get an XML representation of this descriptor.

Returns:
An XML string containing the data for this descriptor.
Throws:
DocumentException - If any error occurs while processing the XML for this descriptor.
Overrides:
toXML in class AbstractDescriptor

toXML

public void toXML(java.io.Writer writer)
           throws DocumentException,
                  java.io.IOException
Write an XML representation of this descriptor to the given Writer.

Parameters:
A - Writer object representing the destination for an XML stream containing the data for this descriptor.
Throws:
DocumentException - If any error occurs while processing the XML for this descriptor.
java.io.IOException - If an error occurs writing to the given Writer.
Overrides:
toXML in class AbstractDescriptor

toXML

public void toXML(IDocument doc)
           throws DocumentException
Output an XML representation of this descriptor into an IDocument instance. The context node of the given IDocument must be set to the service element this descriptor is intended to write its state into.

Parameters:
doc - An IDocument instance to receive the data for this descriptor.
Throws:
DocumentException - If any error occurs while processing the XML for this descriptor.
Overrides:
toXML in class AbstractDescriptor

fromXML

public void fromXML(IDocument doc)
             throws DocumentException
Extract the data for this descriptor from the given IDocument instance, replacing all contents of the current descriptor with the new data.

Parameters:
doc - An IDocument instance from which the data for this descriptor will be extracted.
Throws:
DocumentException - If any error occurs while processing the XML for this descriptor.
Overrides:
fromXML in class AbstractDescriptor

WebLogic Integration

WebLogic Integration (WLI)