Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


oracle.adfinternal.model.adapter.webservice
Class WSDefinition

java.lang.Object
  extended by oracle.adf.model.adapter.AbstractDefinition
      extended by oracle.adfinternal.model.adapter.webservice.WSDefinition

All Implemented Interfaces:
DataControlDefinition, Definition, NamedDefinition

public class WSDefinition
extends AbstractDefinition

/** Definition of the WebService data control instance.

The webservice data control definitions can be created in following ways

Since:
10.1.3
See Also:
AbstractDefinition

Field Summary
static java.lang.String ATTR_CONNECTION
          Connection Attribute for the Adapter.
static java.lang.String ATTR_DATATYPE
          Part Datatype attribute
static java.lang.String ATTR_DEFAULT_VALUE
          Parameter Value tag
static java.lang.String ATTR_FORMAT
          Format attribute
static java.lang.String ATTR_NAME
          Name attribute
static java.lang.String ATTR_NAMESPACE
          Operation Name Space Attribute
static java.lang.String ATTR_PROVIDER
          Provider element, describes the underlying invocation provider for the data control.
static java.lang.String ATTR_VERSION
          Version attribute
static java.lang.String ATTR_WSDL
          WSDL attribute
static java.lang.String ELEM_DATAFORMAT
          Data Format element, describes a Data format
static java.lang.String ELEM_DEFINITION
          The definition node for this data control
static java.lang.String ELEM_OPERATION
          Operation Element
static java.lang.String ELEM_PARAMETER
          Parameter tag
static java.lang.String ELEM_PARAMETERS
          Parameters tag
static java.lang.String ELEM_PORT
          Port Element, describes a port.
static java.lang.String ELEM_SERVICE
          Service Element in the XML Metadata file
static java.lang.String LOGGER
           
static java.lang.String USE_PERSIST_STRUCT
           
static java.lang.String XMLNS
          Namespace in which this metadata is defined

 

Fields inherited from class oracle.adf.model.adapter.AbstractDefinition
CACHE_TO_CLASSPATH, CACHE_TO_SOURCEPATH, DONT_CACHE, mFullName

 

Fields inherited from interface oracle.binding.meta.Definition
TYPE_ACCESSOR, TYPE_ATTRIBUTE, TYPE_CRITERIA, TYPE_CRITERIA_ITEM, TYPE_CRITERIA_OPERATOR, TYPE_CRITERIA_ROW, TYPE_DATACONTROL, TYPE_DEFINITION, TYPE_DEFINITIONCONTEXT, TYPE_NAMED, TYPE_OPERATION, TYPE_OPERATIONRETURN, TYPE_PARAMETER, TYPE_STRUCTURE, TYPE_VARIABLE

 

Constructor Summary
WSDefinition()
          Create this Data Control defintion
WSDefinition(java.lang.String name)
          Create Data Control defintion
WSDefinition(java.lang.String name, java.net.URL wsdlURL)
          Create this Data control definition instance.
WSDefinition(java.lang.String name, java.net.URL wsdlURL, boolean createConn)
          Create this Data control definition instance.
WSDefinition(java.lang.String name, java.net.URL wsdlURL, WSModel model, javax.xml.namespace.QName serviceName)
          Create this Data control definition instance from the WSDL url and the model representing the service.
WSDefinition(java.net.URL wsdlURL)
          Create this Data Control defintion from the WSDL source

 

Method Summary
 void bindServiceConnection(javax.naming.Context context)
          Bind the underlying connection used by this data control into the context provided by the caller.
 DataControl createDataControl()
          Creates an instance of the Webservice data control generated from the metadata definition.
protected  void destroy()
          Destroy this definition instance.
 java.lang.String getAdapterType()
          Get the adapter type of this data control.
 java.lang.String getConnectionName()
           
 java.lang.String getDCName()
          Get the name of the Data control for which this Definition is created.
 java.util.Map getDCOperations()
          Get the operations that the data control can invoke on the service
 java.util.Map getDefaultDCOperations(javax.xml.namespace.QName serviceName)
          Get the Default operations for a given service.
 Node getMetadata()
          Returns the element that defines the metadata for the data control.
 WSModel getModel()
          Get the underlying webservice model for this definition's source.
 java.lang.String getRootStructureName()
          Get the root structure definition name for this dc
 SecurityModel getSecurityModel()
          Get the underlying security model for this Data control.
 javax.xml.namespace.QName getServiceName()
          Get the default service name for this Data control definition
 StructureDefinition getStructure()
          Get the strcuture definition for the data
 java.net.URL getWSDL()
           
 boolean isStructureDirty(boolean refresh)
          Tells the framework whether the Data control structure is dirty and needs to be refreshed on the palette.
 boolean isSupported(java.lang.String flag)
          Indicates if the adapter support things like sorting, transaction etc.
 void loadFromMetadata(Node node, java.util.Map params)
          Loads the definition from a metadata Node.
 void refresh()
           
 void refresh(WSModel model)
          Refresh the underlying model of the data control.
 void setConnectionName(java.lang.String connName)
           
 void setDCOperations(java.util.Map dcOperations)
          Set the Data control operations in this Defintion.
 void setRootStructureName(java.lang.String rootDefName)
          Set the qualified root structure def name for this dc structure
 void setServiceName(javax.xml.namespace.QName serviceName)
          Set the Service Name for this data control definition

 

Methods inherited from class oracle.adf.model.adapter.AbstractDefinition
assignDefaultPackage, createDuplicateDetailIterator, getAdapterContext, getCachingMode, getConfigurationFullName, getDefClassName, getDefinitionParent, getDefinitionType, getFactoryClassName, getFullName, getName, getParameters, getProperties, getProperty, setAdapterContext, setCachingMode, setCompileProjectOnCreate, setConfigurationFullName, setFullName, setName, setProperty, shouldCompileProjectOnCreate, shouldStoreStructureDefinition, usePersistedStructure

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

XMLNS

public static final java.lang.String XMLNS
Namespace in which this metadata is defined
See Also:
Constant Field Values

ELEM_DEFINITION

public static final java.lang.String ELEM_DEFINITION
The definition node for this data control
See Also:
Constant Field Values

ELEM_SERVICE

public static final java.lang.String ELEM_SERVICE
Service Element in the XML Metadata file
See Also:
Constant Field Values

ELEM_OPERATION

public static final java.lang.String ELEM_OPERATION
Operation Element
See Also:
Constant Field Values

ELEM_PORT

public static final java.lang.String ELEM_PORT
Port Element, describes a port.
See Also:
Constant Field Values

ELEM_DATAFORMAT

public static final java.lang.String ELEM_DATAFORMAT
Data Format element, describes a Data format
See Also:
Constant Field Values

ATTR_FORMAT

public static final java.lang.String ATTR_FORMAT
Format attribute
See Also:
Constant Field Values

ATTR_PROVIDER

public static final java.lang.String ATTR_PROVIDER
Provider element, describes the underlying invocation provider for the data control.
See Also:
Constant Field Values

ATTR_CONNECTION

public static final java.lang.String ATTR_CONNECTION
Connection Attribute for the Adapter.
See Also:
Constant Field Values

ATTR_NAME

public static final java.lang.String ATTR_NAME
Name attribute
See Also:
Constant Field Values

ATTR_NAMESPACE

public static final java.lang.String ATTR_NAMESPACE
Operation Name Space Attribute
See Also:
Constant Field Values

ATTR_DATATYPE

public static final java.lang.String ATTR_DATATYPE
Part Datatype attribute
See Also:
Constant Field Values

ATTR_WSDL

public static final java.lang.String ATTR_WSDL
WSDL attribute
See Also:
Constant Field Values

ATTR_VERSION

public static final java.lang.String ATTR_VERSION
Version attribute
See Also:
Constant Field Values

USE_PERSIST_STRUCT

public static final java.lang.String USE_PERSIST_STRUCT
See Also:
Constant Field Values

ELEM_PARAMETERS

public static final java.lang.String ELEM_PARAMETERS
Parameters tag
See Also:
Constant Field Values

ELEM_PARAMETER

public static final java.lang.String ELEM_PARAMETER
Parameter tag
See Also:
Constant Field Values

ATTR_DEFAULT_VALUE

public static final java.lang.String ATTR_DEFAULT_VALUE
Parameter Value tag
See Also:
Constant Field Values

LOGGER

public static final java.lang.String LOGGER
See Also:
Constant Field Values

Constructor Detail

WSDefinition

public WSDefinition()
Create this Data Control defintion

WSDefinition

public WSDefinition(java.net.URL wsdlURL)
             throws AdapterException
Create this Data Control defintion from the WSDL source
Parameters:
wsdlURL - The WSDL URL describing the service.
Throws:
{@link - AdapterException} if the data control definition cannot be created from the WSDL URL
AdapterException

WSDefinition

public WSDefinition(java.lang.String name)
Create Data Control defintion
Parameters:
name - Data Control name.

WSDefinition

public WSDefinition(java.lang.String name,
                    java.net.URL wsdlURL,
                    boolean createConn)
             throws AdapterException
Create this Data control definition instance. The defintion creation initializes the underlying model and the connection to the service.
Parameters:
name - The name of the data control for which the definition is being created.
wsdlURL - The URL of the service description.
createconn - Whether to create service connection and register with context. Required for dc created at runtime.
Throws:
{@link - AdapterException} if the definition for this data control could be created. This failure may happen if the WSDL url is invalid and the model cannot be initialized. or the underlying connection cannot be created.
AdapterException

WSDefinition

public WSDefinition(java.lang.String name,
                    java.net.URL wsdlURL)
             throws AdapterException
Create this Data control definition instance. The defintion creation initializes the underlying model and the connection to the service.
Parameters:
name - The name of the data control for which the definition is being created.
wsdlURL - The URL of the service description.
Throws:
{@link - AdapterException} if the definition for this data control could be created. This failure may happen if the WSDL url is invalid and the model cannot be initialized. or the underlying connection cannot be created.
AdapterException

WSDefinition

public WSDefinition(java.lang.String name,
                    java.net.URL wsdlURL,
                    WSModel model,
                    javax.xml.namespace.QName serviceName)
             throws AdapterException
Create this Data control definition instance from the WSDL url and the model representing the service.
Parameters:
name - The name of the data control for which the definition is being created.
wsdlURL - The URL of the service description.
model - The model representing the Service. The model describes all the ports and operations exposed by the service description.
serviceName - The qualified service name for which the definition is to be intialized. The service description may describe more that one service. In such a case the definition is created for the requested service.
Throws:
{@link - AdapterException} if the definition for this data control could be created. This failure may happen if the WSDL url is invalid and the model cannot be initialized. or the underlying connection cannot be created.
AdapterException

Method Detail

getDCName

public java.lang.String getDCName()
Get the name of the Data control for which this Definition is created.
Specified by:
getDCName in class AbstractDefinition
Returns:
The Data Control name.

getModel

public WSModel getModel()
Get the underlying webservice model for this definition's source.
Returns:
The instance of the webservice model.

getWSDL

public java.net.URL getWSDL()

getDCOperations

public java.util.Map getDCOperations()
Get the operations that the data control can invoke on the service
Returns:
A Map of the operations for this data control

setDCOperations

public void setDCOperations(java.util.Map dcOperations)
Set the Data control operations in this Defintion.
Parameters:
dcOperations - The Map of the operations for this data control

getServiceName

public javax.xml.namespace.QName getServiceName()
Get the default service name for this Data control definition
Returns:
The default service name.

setServiceName

public void setServiceName(javax.xml.namespace.QName serviceName)
Set the Service Name for this data control definition
Parameters:
serviceName - The Service name for for this definition

getAdapterType

public java.lang.String getAdapterType()
Get the adapter type of this data control. The adapter type is a string description of this adapter. The adapter type is needed to associate the dependent libraries when creating a project that uses this data control.
Overrides:
getAdapterType in class AbstractDefinition
Returns:
the type description of this data control.
See Also:
AdapterDefinition

getSecurityModel

public SecurityModel getSecurityModel()
Get the underlying security model for this Data control.

createDataControl

public DataControl createDataControl()
Creates an instance of the Webservice data control generated from the metadata definition.
Specified by:
createDataControl in class AbstractDefinition
Returns:
the instance of the Webservice data control. null If the data control instance could not be created.

loadFromMetadata

public void loadFromMetadata(Node node,
                             java.util.Map params)
                      throws AdapterException
Loads the definition from a metadata Node.
Specified by:
loadFromMetadata in class AbstractDefinition
Parameters:
node - the metadata node. It can be null if no metadata is defined.
params - context parameters.
Throws:
{@link - AdapterException} if the data control definition cannot be reconstructed back from the metadata information.
AdapterException

getStructure

public StructureDefinition getStructure()
Get the strcuture definition for the data
Specified by:
getStructure in interface DataControlDefinition
Specified by:
getStructure in class AbstractDefinition
Returns:
The StructureDefinition representing the strcuture of the data returned by this data control.

refresh

public void refresh()
             throws AdapterException
Throws:
AdapterException

refresh

public void refresh(WSModel model)
             throws AdapterException
Refresh the underlying model of the data control. Refreshing the definition, creates a new backend MDDS model for the wsdl once the backend definition is updated, any call to get the dc metadata or the strucutre will result in the new updated metadata and structure being sent.
Throws:
AdapterException

isStructureDirty

public boolean isStructureDirty(boolean refresh)
Tells the framework whether the Data control structure is dirty and needs to be refreshed on the palette. The framework passes a flag refresh if refresh is requested. If a refresh is needed, the data control definition recreates the underlying model and connection to update the metadata of any possible changes to the service operation signature.
Overrides:
isStructureDirty in class AbstractDefinition
Parameters:
refresh - flag to indicate if the refresh is requested for the structure. If true, the definition regenerates the underlying model, operation map and connection information. This re-generation is needed to rebuild the structure and make sure that the runtime has the right connection metadata to execute any modified operation bindings
Returns:
true if the implementation decides that the structure of the data should be regenerated, false otherwise.

getMetadata

public Node getMetadata()
Returns the element that defines the metadata for the data control.

The WSDL is parsed to extract as much information as is needed to be stored in the metdata to invoke the service operation at runtime.

Specified by:
getMetadata in class AbstractDefinition
Returns:
a Node that defines the metadata for this instance. This metadata will be used at the runtime to fetch data from the data source.

getDefaultDCOperations

public java.util.Map getDefaultDCOperations(javax.xml.namespace.QName serviceName)
                                     throws AdapterException
Get the Default operations for a given service.
Parameters:
serviceName - The Qualified service Name for which operations must be fetched.
Returns:
Map of Operations for this service.
Throws:
{@link - AdapterException} if the service does not exist in the underlying model.
AdapterException

bindServiceConnection

public void bindServiceConnection(javax.naming.Context context)
                           throws AdapterException
Bind the underlying connection used by this data control into the context provided by the caller. The data control loads the connection both at design time and runtime. Allowing the context to be provided by caller allows more flexibility to bind and load the connection information irrespective of the DT / RT operations.
Parameters:
context - The Context provided by the caller into which the connection for this service is to be bound.
Throws:
{@link - AdapterException} If the connection cannot be bound into the context provided.
AdapterException

isSupported

public boolean isSupported(java.lang.String flag)
Description copied from class: AbstractDefinition
Indicates if the adapter support things like sorting, transaction etc. Adapter data control definition should overwrite this method to provide the info specific to the data control instance.
Overrides:
isSupported in class AbstractDefinition
Parameters:
flag - one of the values defined in DataControlDefinition.
Returns:
boolean true if supported. The default implementation returns "false" for all flags.

setRootStructureName

public void setRootStructureName(java.lang.String rootDefName)
Set the qualified root structure def name for this dc structure
Parameters:
rootDefName - The qualified root structure name for this dc

getRootStructureName

public java.lang.String getRootStructureName()
Get the root structure definition name for this dc
Returns:
The root structure name for this dc

destroy

protected void destroy()
                throws AdapterException
Destroy this definition instance.

Should be invoked by the data control when it is released from an application. The data control definition is voided out once the destroy is invoked. This includes cleaning up of the operations table, purging out the security model and the underlying connection bindings. The definition is not usable anymore once it is destroyed. A new instance of the definition must be created for the dc by loading the definition from the metadata.

Throws:
AdapterException - if the definition cannot be destroyed.

getConnectionName

public java.lang.String getConnectionName()

setConnectionName

public void setConnectionName(java.lang.String connName)
                       throws java.lang.Exception
Throws:
java.lang.Exception

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


Copyright © 1997, 2011, Oracle. All rights reserved.