Extension SDK 9.0.5

oracle.jdeveloper.webservices
Class JAXRPCPlsqlModel

java.lang.Object
  extended byoracle.jdeveloper.webservices.JAXRPCSvcModel
      extended byoracle.jdeveloper.webservices.JAXRPCPlsqlModel

public class JAXRPCPlsqlModel
extends JAXRPCSvcModel

This class represents the data model for a PL/SQL package exposed as a web service.


Field Summary
static java.lang.String DB_CONNECTION
          Property identifier.
static java.lang.String DB_PACKAGE
          Property identifier.
static java.lang.String JAVA_PACKAGE
          Property identifier.
static java.lang.String UNITS_PUBLISHED
          Property identifier.
 
Fields inherited from class oracle.jdeveloper.webservices.JAXRPCSvcModel
ALL_WRITEABLE, ENDPOINT, m_backup, m_modelRenameRequired, m_targetProject, PLATFORM_ALL_SERVERS, PLATFORM_APACHE_2X, PLATFORM_JAX_RPC, PLATFORM_ORACLE_IAS_20, PLATFORM_ORACLE_J2EE, TARGET_NAMESPACE, TYPE_JAVA, TYPE_JMS, TYPE_PLSQL, TYPE_UNKNOWN, URI, WEB_XML_URL, WSDL_URL
 
Constructor Summary
JAXRPCPlsqlModel()
          Default constructor.
JAXRPCPlsqlModel(boolean migratedService)
          Create a new web service model, allowing the creator to specify that it is being created to hold data being migrated from an older version of JDeveloper.
JAXRPCPlsqlModel(java.net.URI uri)
          Create a new web service with the supplied URI.
 
Method Summary
 void addProgramUnit(ProgramUnit add)
          Add the program unit supplied to the list of program units to be published.
 void beginEdit()
          Make a copy of this model and store it internally, ready for updates that can be applied or undone.
 java.net.URI deriveTargetNamespace()
          Derive a model-specific default target namespace URI for the service.
 java.net.URL deriveWSDLFileLocation()
          Derive a location for a WSDL file for this service.
 java.lang.String[] getAuxiliaryClasses()
           
 java.sql.Connection getConnection(java.lang.String name)
          Retrieve the connection for the named database connection.
 java.lang.String getDBConnection()
           
 java.lang.String getDBPackage()
           
 java.lang.String getJavaPackage()
           
 java.net.URL getModelLocation()
          Determine what the location of the persisted model will be after generation.
 URLPath getTargetDirectories()
          Work out all of the directories that will be touched by the JAX-RPC assembler in creating the service.
 int getType()
           
 java.util.List getUnitsPublished()
           
 java.lang.String getWrapperClassName()
           
protected  boolean invokeWizardInternal(oracle.bali.ewt.wizard.BaseWizard baseWizard, boolean showProgressBar, boolean openFiles, java.awt.Component dialogParent)
          Invoke a wizard to edit this data model.
 boolean isPackageValid(java.lang.String connectionName, java.lang.String packageName)
          Check whether a package with the given name exists on the given connection, and that it is valid.
 void removeProgramUnit(ProgramUnit remove)
          Remove the program unit supplied from the list of program units to be published.
 void setDBConnection(java.lang.String dbConnection)
           
 void setDBPackage(java.lang.String dbPackage)
           
 void setJavaPackage(java.lang.String javaPackage)
           
 void setUnitsPublished(java.util.List unitsPublished)
           
 void undoEdit()
          Restore the state of the model to what it was when beginEdit was called.
 void validate(java.lang.String[] properties)
          Validate all of the properties whose identifiers have been supplied in the String array.
 
Methods inherited from class oracle.jdeveloper.webservices.JAXRPCSvcModel
addModelListener, deriveSoapDDFileLocation, generateWar, getContainer, getDefaultEndpointFromAppServer, getDependents, getEndpoint, getGUID, getHostName, getJNDILocation, getMethodsFromWSDL, getPreviousState, getServicePlatform, getSoapDDFileLocation, getTargetNamespace, getTargetNamespaceString, getTargetProject, getTargetProjectURL, getURI, getURIString, getWebXMLFileLocation, getWSDLFileLocation, invokeWizard, isBeingEdited, isNewModel, isReadOnly, isServicePlatformEditable, isWarGenerationSuppressed, remove, remove, removeModelListener, saveEdit, saveEditInternal, setEndpoint, setGUID, setJNDILocation, setServicePlatform, setServicePlatformEditable, setTargetNamespace, setTargetNamespaceString, setTargetProject, setTargetProjectURL, setURI, setURIString, startEmbeddedServer, suppressWarGeneration, terminateEmbeddedServer, trim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DB_CONNECTION

public static final java.lang.String DB_CONNECTION
Property identifier. Use this in calls to the validate method.

See Also:
Constant Field Values

DB_PACKAGE

public static final java.lang.String DB_PACKAGE
Property identifier. Use this in calls to the validate method.

See Also:
Constant Field Values

JAVA_PACKAGE

public static final java.lang.String JAVA_PACKAGE
Property identifier. Use this in calls to the validate method.

See Also:
Constant Field Values

UNITS_PUBLISHED

public static final java.lang.String UNITS_PUBLISHED
Property identifier. Use this in calls to the validate method.

See Also:
Constant Field Values
Constructor Detail

JAXRPCPlsqlModel

public JAXRPCPlsqlModel()
Default constructor. It's safe to call this if you want to. The model will be in "read" mode by default, and you must call beginEdit before you modify it.


JAXRPCPlsqlModel

public JAXRPCPlsqlModel(java.net.URI uri)
Create a new web service with the supplied URI. By calling this constructor, the model will be put into "edit" mode by default.

Parameters:
uri - URI to give to the new service.

JAXRPCPlsqlModel

public JAXRPCPlsqlModel(boolean migratedService)
Create a new web service model, allowing the creator to specify that it is being created to hold data being migrated from an older version of JDeveloper.

Parameters:
migratedService - Set this to true to indicate that the model will contain data being migrated from an older version of JDeveloper.
Method Detail

setDBConnection

public void setDBConnection(java.lang.String dbConnection)
Parameters:
dbConnection - The name of the database connection on which the package being published resides.

getDBConnection

public java.lang.String getDBConnection()
Returns:
The name of the database connection on which the package being published resides.

setDBPackage

public void setDBPackage(java.lang.String dbPackage)
Parameters:
dbPackage - The name of the database package to publish.

getDBPackage

public java.lang.String getDBPackage()
Returns:
The name of the database package to publish.

setJavaPackage

public void setJavaPackage(java.lang.String javaPackage)
Parameters:
javaPackage - The name of the target Java package for classes generated by JPublisher.

getJavaPackage

public java.lang.String getJavaPackage()
Returns:
The name of the target Java package for classes generated by JPublisher.

setUnitsPublished

public void setUnitsPublished(java.util.List unitsPublished)
Parameters:
unitsPublished - Representations of the signatures of all program units being published, held as instances of ProgramUnit.

getUnitsPublished

public java.util.List getUnitsPublished()
Returns:
Representations of the signatures of all program units being published, held as instances of ProgramUnit.

getType

public int getType()
Specified by:
getType in class JAXRPCSvcModel
Returns:
Constant representing what type of web service this is.

getModelLocation

public java.net.URL getModelLocation()
Determine what the location of the persisted model will be after generation. For a PL/SQL web service, the model goes in the same package as the generated wrapper classes.

Specified by:
getModelLocation in class JAXRPCSvcModel
Returns:
URL pointing to the place where the model will be saved.

deriveWSDLFileLocation

public java.net.URL deriveWSDLFileLocation()
Description copied from class: JAXRPCSvcModel
Derive a location for a WSDL file for this service.

Specified by:
deriveWSDLFileLocation in class JAXRPCSvcModel
Returns:
URL pointing to the location at which the WSDL file will be created.

deriveTargetNamespace

public java.net.URI deriveTargetNamespace()
Description copied from class: JAXRPCSvcModel
Derive a model-specific default target namespace URI for the service.

Specified by:
deriveTargetNamespace in class JAXRPCSvcModel
Returns:
A default target namespace URI for the service.

getTargetDirectories

public URLPath getTargetDirectories()
Description copied from class: JAXRPCSvcModel
Work out all of the directories that will be touched by the JAX-RPC assembler in creating the service.

Specified by:
getTargetDirectories in class JAXRPCSvcModel
Returns:
URLPath containing all of the directories that will be touched by the assembler.

beginEdit

public void beginEdit()
Description copied from class: JAXRPCSvcModel
Make a copy of this model and store it internally, ready for updates that can be applied or undone. If beginEdit is called more than once without a saveEdit or undoEdit appearing in between, all calls except the first will be disregarded.

Overrides:
beginEdit in class JAXRPCSvcModel

undoEdit

public void undoEdit()
Description copied from class: JAXRPCSvcModel
Restore the state of the model to what it was when beginEdit was called.

Overrides:
undoEdit in class JAXRPCSvcModel

invokeWizardInternal

protected boolean invokeWizardInternal(oracle.bali.ewt.wizard.BaseWizard baseWizard,
                                       boolean showProgressBar,
                                       boolean openFiles,
                                       java.awt.Component dialogParent)
Description copied from class: JAXRPCSvcModel
Invoke a wizard to edit this data model. Instantiable subclasses must supply their own wizard-specific code in this method.

Specified by:
invokeWizardInternal in class JAXRPCSvcModel
Parameters:
baseWizard - Wizard class that pages and panels should be added to.
showProgressBar - Boolean flag, set this to true if a progress bar should be shown during generation.
openFiles - Boolean flag, set this to true if generated files should be opened after generation.
dialogParent - Parent component for any progress or error dialogs displayed during generation.
Returns:
Boolean value; true if the wizard was applied, false if it was cancelled.

validate

public void validate(java.lang.String[] properties)
              throws java.lang.Exception
Description copied from class: JAXRPCSvcModel
Validate all of the properties whose identifiers have been supplied in the String array.

Overrides:
validate in class JAXRPCSvcModel
Parameters:
properties - Array of string identifiers of all the properties that should be validated. If the array is null or empty, all properties will be validated.
Throws:
java.lang.Exception - containing a translated message that explains why validation failed.

getWrapperClassName

public java.lang.String getWrapperClassName()
Returns:
The Java wrapper class that will be generated by JPublisher for the package being published.

getAuxiliaryClasses

public java.lang.String[] getAuxiliaryClasses()
Returns:
Array of names of auxiliary Java and SQLJ classes which have been generated for the service. This method will return null if the service hasn't been generated yet, or if no auxiliary classes could be found.

removeProgramUnit

public void removeProgramUnit(ProgramUnit remove)
Remove the program unit supplied from the list of program units to be published.

Parameters:
remove - Signature of the program unit to be unpublished.

addProgramUnit

public void addProgramUnit(ProgramUnit add)
Add the program unit supplied to the list of program units to be published.

Parameters:
add - Signature of the new program unit to be published.

isPackageValid

public boolean isPackageValid(java.lang.String connectionName,
                              java.lang.String packageName)
                       throws CMException,
                              java.io.IOException,
                              java.sql.SQLException
Check whether a package with the given name exists on the given connection, and that it is valid.

Parameters:
connectionName - Name of the connection that the package is on.
packageName - Name of the package.
Returns:
True if the package exists and is valid, false otherwise.
Throws:
CMException, - IOException or SQLException if there are any errors running the query that does the check.
CMException
java.io.IOException
java.sql.SQLException

getConnection

public java.sql.Connection getConnection(java.lang.String name)
                                  throws CMException,
                                         java.io.IOException
Retrieve the connection for the named database connection. The reason we use this method, rather than just calling ConnectionManager directly, is so that we can cache the connections.

Parameters:
name - Name of the connection to retrieve the wrapper for.
Returns:
Connection found, null if none was found.
Throws:
java.io.IOException - or CMException if the connection could not be accessed.
CMException

Extension SDK

 

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