Extension SDK 9.0.5

oracle.jdeveloper.webservices
Class JAXRPCJavaModel

java.lang.Object
  extended byoracle.jdeveloper.webservices.JAXRPCSvcModel
      extended byoracle.jdeveloper.webservices.JAXRPCJavaModel
All Implemented Interfaces:
Observer

public class JAXRPCJavaModel
extends JAXRPCSvcModel
implements Observer

This class represents the data model for a Java class or EJB exposed as a Java web service. Interaction with the JAXRPCJavaModel is governed by the rules described in JAXRPCSvcModel.


Field Summary
static java.lang.String CLASS
          Property identifier.
static int DONT_KNOW_WHAT_IT_IS_YET
          Constant identifying the type of EJB that is exposed by the service.
static int EJB_ENTITY
          Constant identifying the type of EJB that is exposed by the service.
static int EJB_STATEFUL_SESSION
          Constant identifying the type of EJB that is exposed by the service.
static int EJB_STATELESS_SESSION
          Constant identifying the type of EJB that is exposed by the service.
static java.lang.String HOME_INTERFACE
          Property identifier.
static int MESSAGE_DOCUMENT_LITERAL
          Constant specifying that the service should communicate by document-literal messages.
static int MESSAGE_RPC_ENCODED
          Constant specifying that the service should communicate by rpc-encoded messages.
static int MESSAGE_RPC_LITERAL
          Constant specifying that the service should communicate by rpc-literal messages.
static java.lang.String METHODS_PUBLISHED
          Property identifier.
static int NOT_AN_EJB
          Constant identifying the type of EJB that is exposed by the service.
static int SCOPE_APPLICATION
          Application scope constant.
static int SCOPE_REQUEST
          Application scope constant.
static int SCOPE_SESSION
          Application scope constant.
static java.lang.String SERVICE_INTERFACE
          Property identifier.
static java.lang.String STATEFUL_SCOPE
          Property identifier.
static java.lang.String TIMEOUT
          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
JAXRPCJavaModel()
          Default constructor.
JAXRPCJavaModel(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.
JAXRPCJavaModel(java.net.URI uri, java.lang.String className)
          Create a new web service with the supplied URI, that exposes the supplied class.
 
Method Summary
 int addAllPublishableMethods(boolean declaredOnly)
          Determine all publishable methods in the service class (or endpoint interface for a JAX-RPC service), and mark them for publication.
 void addMethod(MethodSignature add)
          Add the method signature supplied to the list of methods to be published.
 void beginEdit()
          Make a copy of this model and store it internally, ready for updates that can be applied or undone.
 boolean canEditImplementationFile(MethodSignature method)
          Determine whether the implementation files of the service can be modified during generation.
 void clearMethodUpdateLists()
          Clear all of the method update lists.
 void clearUntaggedMethods()
          Clear the untagged selected methods list.
static JAXRPCJavaModel createWebServiceFromClass(java.net.URI uri, java.lang.String className, int servicePlatform)
          Create and generate a web service for the given class.
 java.net.URL deriveSoapDDFileLocation()
          Derive a default value for the Oracle/Apache SOAP deployment descriptor file location.
 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.util.List getAddMethods()
           
 java.net.URL[] getBeansFound()
           
 java.util.Set getBeansUsedByMethod(JotMethod method)
          Determine which JavaBeans are used by a particular method in a web service.
 JotClass getClassJOT()
           
 java.lang.String getClassName()
           
 java.net.URL getClassURL()
          Find the URL at which the class being published resides.
 java.lang.String getEJBClass()
           
 int getEJBType()
           
 java.lang.String getHomeInterface()
           
 JotManager getJotManager()
          Find and return the appropriate JotManager for this data model.
 int getMessageFormat()
           
 java.lang.String getMethodPublishableStatus(JotMethod method)
          Determine whether a particular JotMethod is publishable, and return a reason why if it isn't.
 java.util.List getMethodsPublished()
          Find all of the methods published on the class, by looking for @webmethod tags in source and by looking at the untaggedMethodsPublished list held in this data model.
 int getMinimumMethods()
           
 java.net.URL getModelLocation()
          Determine what the location of the persisted model will be after generation.
 java.util.List getRemoveMethods()
           
 java.util.List getRenameMethods()
           
 int getScope()
           
 java.lang.String getServiceInterface()
           
 JotClass getServiceInterfaceJOT()
           
 java.lang.String[] getServiceInterfacesOnClass()
          Find all of the interfaces implemented by the class which extend the java.rmi.Remote interface, and return their names.
 java.util.List getTaggedMethods()
          Find and return all of the tagged methods directly declared on the service's implementing class.
 URLPath getTargetDirectories()
          Work out all of the directories that will be touched by the JAX-RPC assembler in creating the service.
 long getTimeout()
           
 int getType()
           
 oracle.jdevimpl.webservices.util.JavaXSDTypeMap getTypeMap()
           
 java.util.List getUntaggedMethodsPublished()
           
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 isMethodRemoveable(MethodSignature remove)
          Determine whether the method supplied can be unpublished from the service.
 boolean isPublishable(java.lang.String name, boolean isClass, int modifiers)
          Determines whether the named class/interface having the supplied modifiers is publishable as a web service.
 boolean isPublishSuperclass()
           
 boolean isServicePlatformEditable()
           
 boolean isStateless()
           
 boolean isStaticInvocation()
           
 void removeMethod(MethodSignature remove)
          Remove the method signature supplied from the list of methods to be published.
 void renameMethod(MethodSignature oldSig, MethodSignature newSig)
          Rename a method in the service.
static java.lang.String resolvePrimitives(java.lang.String typeName)
          Given the name of a type, check if it's one of the primitive wrappers, and if so replace it with the name of the the primitive.
protected  void saveEditInternal()
          Discard the backup copy of the model.
 void setBeansFound(java.net.URL[] beansFound)
           
 void setCanEditImplementationFile(boolean editImplementationFile)
          Deprecated. canEditImplementationFile property is now governed by whether the implementation file is read-only or not.
 void setClassName(java.lang.String className)
           
 void setEJBClass(java.lang.String ejbClass)
          This method exists for use only by Object2Dom and refactoring.
 void setEJBType(int ejbType)
          This method exists for use only by Object2Dom and refactoring.
 void setHomeInterface(java.lang.String homeInterface)
          This method exists for use only by Object2Dom and refactoring.
 void setMessageFormat(int messageFormat)
           
 void setMinimumMethods(int minimumMethods)
           
 void setPublishSuperclass(boolean publishSuperclass)
           
 void setScope(int scope)
           
 void setServiceInterface(java.lang.String serviceInterface)
           
 void setStateless(boolean stateless)
           
 void setStaticInvocation(boolean staticInvocation)
           
 void setTargetProject(JProject targetProject)
          Specialisation of setTargetProject that resets the JOTManager for the model.
 void setTimeout(long timeout)
           
 void setTypeMap(oracle.jdevimpl.webservices.util.JavaXSDTypeMap typeMap)
           
 void setUntaggedMethodsPublished(java.util.List untaggedMethodsPublished)
           
 void undoEdit()
          Restore the state of the model to what it was when beginEdit was called.
 void update(java.lang.Object observed, UpdateMessage change)
          Notification message.
 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, generateWar, getContainer, getDefaultEndpointFromAppServer, getDependents, getEndpoint, getGUID, getHostName, getJNDILocation, getMethodsFromWSDL, getPreviousState, getServicePlatform, getSoapDDFileLocation, getTargetNamespace, getTargetNamespaceString, getTargetProject, getTargetProjectURL, getURI, getURIString, getWebXMLFileLocation, getWSDLFileLocation, invokeWizard, isBeingEdited, isNewModel, isReadOnly, isWarGenerationSuppressed, remove, remove, removeModelListener, saveEdit, setEndpoint, setGUID, setJNDILocation, setServicePlatform, setServicePlatformEditable, setTargetNamespace, setTargetNamespaceString, 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

CLASS

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

See Also:
Constant Field Values

SERVICE_INTERFACE

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

See Also:
Constant Field Values

TIMEOUT

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

See Also:
Constant Field Values

STATEFUL_SCOPE

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

See Also:
Constant Field Values

HOME_INTERFACE

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

See Also:
Constant Field Values

METHODS_PUBLISHED

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

See Also:
Constant Field Values

SCOPE_APPLICATION

public static final int SCOPE_APPLICATION
Application scope constant. Used by getScope and setScope.

See Also:
Constant Field Values

SCOPE_SESSION

public static final int SCOPE_SESSION
Application scope constant. Used by getScope and setScope.

See Also:
Constant Field Values

SCOPE_REQUEST

public static final int SCOPE_REQUEST
Application scope constant. Used by getScope and setScope.

See Also:
Constant Field Values

DONT_KNOW_WHAT_IT_IS_YET

public static final int DONT_KNOW_WHAT_IT_IS_YET
Constant identifying the type of EJB that is exposed by the service. Used by getEJBType and setEJBType.

See Also:
Constant Field Values

NOT_AN_EJB

public static final int NOT_AN_EJB
Constant identifying the type of EJB that is exposed by the service. Used by getEJBType and setEJBType.

See Also:
Constant Field Values

EJB_ENTITY

public static final int EJB_ENTITY
Constant identifying the type of EJB that is exposed by the service. Used by getEJBType and setEJBType.

See Also:
Constant Field Values

EJB_STATELESS_SESSION

public static final int EJB_STATELESS_SESSION
Constant identifying the type of EJB that is exposed by the service. Used by getEJBType and setEJBType.

See Also:
Constant Field Values

EJB_STATEFUL_SESSION

public static final int EJB_STATEFUL_SESSION
Constant identifying the type of EJB that is exposed by the service. Used by getEJBType and setEJBType.

See Also:
Constant Field Values

MESSAGE_RPC_ENCODED

public static final int MESSAGE_RPC_ENCODED
Constant specifying that the service should communicate by rpc-encoded messages.

See Also:
Constant Field Values

MESSAGE_RPC_LITERAL

public static final int MESSAGE_RPC_LITERAL
Constant specifying that the service should communicate by rpc-literal messages.

See Also:
Constant Field Values

MESSAGE_DOCUMENT_LITERAL

public static final int MESSAGE_DOCUMENT_LITERAL
Constant specifying that the service should communicate by document-literal messages.

See Also:
Constant Field Values
Constructor Detail

JAXRPCJavaModel

public JAXRPCJavaModel()
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.


JAXRPCJavaModel

public JAXRPCJavaModel(java.net.URI uri,
                       java.lang.String className)
Create a new web service with the supplied URI, that exposes the supplied class. By calling this constructor, the model will be put into "edit" mode by default.

Parameters:
uri - URI to give to the new service.
className - Name of the class exposed by the service.

JAXRPCJavaModel

public JAXRPCJavaModel(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

setTargetProject

public void setTargetProject(JProject targetProject)
Specialisation of setTargetProject that resets the JOTManager for the model.

Overrides:
setTargetProject in class JAXRPCSvcModel
Parameters:
targetProject - Target project for the service under consideration.

setClassName

public void setClassName(java.lang.String className)
Parameters:
className - The fully-qualified name of the class being published.

getClassName

public java.lang.String getClassName()
Returns:
The fully-qualified name of the class being published.

setEJBClass

public void setEJBClass(java.lang.String ejbClass)
This method exists for use only by Object2Dom and refactoring. Do not use under any other circumstances.


getEJBClass

public java.lang.String getEJBClass()
Returns:
The fully-qualified name of the EJB class being published. Null if a normal Java class is being published.

setHomeInterface

public void setHomeInterface(java.lang.String homeInterface)
This method exists for use only by Object2Dom and refactoring. Do not use under any other circumstances.


getHomeInterface

public java.lang.String getHomeInterface()
Returns:
The fully-qualified name of the EJB home interface, if an EJB is being published.

setEJBType

public void setEJBType(int ejbType)
This method exists for use only by Object2Dom and refactoring. Do not use under any other circumstances.


getEJBType

public int getEJBType()
Returns:
The type of EJB we are dealing with, zero if not an EJB, otherwise see the EJB_ constants at the top of the class.

setMessageFormat

public void setMessageFormat(int messageFormat)
Parameters:
messageFormat - The message format that the service should use to communciate. See the MESSAGE_ constants at the top of the class.

getMessageFormat

public int getMessageFormat()
Returns:
The message format that the service should use to communciate. See the MESSAGE_ constants at the top of the class.

setScope

public void setScope(int scope)
Parameters:
scope - Scope of stateful services. See the SCOPE_ constants at the top of the class for allowable values. This only applies to Oracle SOAP services.

getScope

public int getScope()
Returns:
Scope of stateful services. See the SCOPE_ constants at the top of the class for allowable values. This only applies to Oracle SOAP services.

setStaticInvocation

public void setStaticInvocation(boolean staticInvocation)
Parameters:
staticInvocation - Boolean flag, indicating whether the service invokes static methods. This only applies to Oracle SOAP services.

isStaticInvocation

public boolean isStaticInvocation()
Returns:
Boolean flag, indicating whether the service invokes static methods. This only applies to Oracle SOAP services.

setPublishSuperclass

public void setPublishSuperclass(boolean publishSuperclass)
Parameters:
publishSuperclass - Boolean flag, indicating whether the service includes methods from a superclass.

isPublishSuperclass

public boolean isPublishSuperclass()
Returns:
Boolean flag, indicating whether the service includes methods from a superclass.

setServiceInterface

public void setServiceInterface(java.lang.String serviceInterface)
Parameters:
serviceInterface - The fully-qualified name of the service interface of the class being published. Applicable only to JAX-RPC services.

getServiceInterface

public java.lang.String getServiceInterface()
Returns:
The fully-qualified name of the service interface of the class being published. Applicable only to JAX-RPC services.

setUntaggedMethodsPublished

public void setUntaggedMethodsPublished(java.util.List untaggedMethodsPublished)
Parameters:
untaggedMethodsPublished - The signatures of all methods being published which don't have corresponding @webmethod tags in source, represented as instances of MethodSignature.

getUntaggedMethodsPublished

public java.util.List getUntaggedMethodsPublished()
Returns:
The signatures of all methods being published which don't have corresponding @webmethod tags in source, represented as instances of MethodSignature.

setMinimumMethods

public void setMinimumMethods(int minimumMethods)
Parameters:
minimumMethods - The minimum number of methods that must be selected for publication in this model. This can be set to 0 so that the web service modeller can create a default implementation class with no methods in it.

getMinimumMethods

public int getMinimumMethods()
Returns:
The minimum number of methods that must be selected for publication in this model. This can be set to 0 so that the web service modeller can create a default implementation class with no methods in it.

setStateless

public void setStateless(boolean stateless)
Parameters:
stateless - Boolean flag, indicating whether the service is stateful or stateless.

isStateless

public boolean isStateless()
Returns:
Boolean flag, indicating whether the service is stateful or stateless.

setTimeout

public void setTimeout(long timeout)
Parameters:
timeout - Long value of the timeout for stateful services.

getTimeout

public long getTimeout()
Returns:
Long value of the timeout for stateful services.

getServiceInterfaceJOT

public JotClass getServiceInterfaceJOT()
Returns:
JOT representation of the service interface. (JAX-RPC services only.)

getClassJOT

public JotClass getClassJOT()
Returns:
JOT representation of the service class.

getBeansFound

public java.net.URL[] getBeansFound()
Returns:
Array of URLs to JavaBeans used as parameters or return types to published methods.

setBeansFound

public void setBeansFound(java.net.URL[] beansFound)
Parameters:
beansFound - Array of URLs to JavaBeans used as parameters or return types to published methods.

setCanEditImplementationFile

public void setCanEditImplementationFile(boolean editImplementationFile)
Deprecated. canEditImplementationFile property is now governed by whether the implementation file is read-only or not.

Parameters:
editImplementationFile - Flag indicating whether the implementation file for this service should be edited if the edit is saved.

canEditImplementationFile

public boolean canEditImplementationFile(MethodSignature method)
Determine whether the implementation files of the service can be modified during generation. This may involve adding new methods, or manipulating webmethod Javadoc tags on methods. There may be more than one implementation file for a service, if that service exposes methods on a superclass of the class the user has chosen as the "service class". New methods will always be added to this "service class", but to publish or unpublish methods on a superclass should change the superclass. As such, canEditImplementationFile has an optional MethodSignature parameter. If this is null, the result of the method will be the editable status of the "service class". If it is non-null, the result of the method will be the editable status of the declaring class of the method supplied.

Parameters:
method - MethodSignature of a method whose editable status is required. If null, the editable status of the service class chosen by the user will be returned.
Returns:
Editable status of the appropriate implementation file.

getAddMethods

public java.util.List getAddMethods()
Returns:
A copy of the list of signatures for methods to be added.

getRemoveMethods

public java.util.List getRemoveMethods()
Returns:
A copy of the list of signatures for methods to be removed.

getRenameMethods

public java.util.List getRenameMethods()
Returns:
A copy of the list of signatures for methods to be renamed. Each element in the list is a 2-element array of signatures, the first being the current signature and the second being the required signature.

setTypeMap

public void setTypeMap(oracle.jdevimpl.webservices.util.JavaXSDTypeMap typeMap)
Parameters:
typeMap - The type map being used during generation of this service. For an Oracle/Apache SOAP service, this will be needed in order to generate user type mappings.

getTypeMap

public oracle.jdevimpl.webservices.util.JavaXSDTypeMap getTypeMap()
                                                           throws TransientMarker
Returns:
The type map being used during generation of this service. For an Oracle/Apache SOAP service, this will be needed in order to generate user type mappings.
Throws:
TransientMarker

isServicePlatformEditable

public boolean isServicePlatformEditable()
Overrides:
isServicePlatformEditable in class JAXRPCSvcModel
Returns:
Always true for Java services.

update

public void update(java.lang.Object observed,
                   UpdateMessage change)
Description copied from interface: Observer
Notification message. Subjects call this method when they notify their observers that the subjects state has changed.

Specified by:
update in interface Observer
Parameters:
observed - the subject whose state has changed.
change - what has changed.

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 Java web service, the model goes in the same package as the implementation file.

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.

deriveSoapDDFileLocation

public java.net.URL deriveSoapDDFileLocation()
Description copied from class: JAXRPCSvcModel
Derive a default value for the Oracle/Apache SOAP deployment descriptor file location. The implementation in the base model returns a null value.

Overrides:
deriveSoapDDFileLocation in class JAXRPCSvcModel

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

saveEditInternal

protected void saveEditInternal()
Description copied from class: JAXRPCSvcModel
Discard the backup copy of the model.

Overrides:
saveEditInternal 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.

getTaggedMethods

public java.util.List getTaggedMethods()
Find and return all of the tagged methods directly declared on the service's implementing class.

Returns:
List of tagged JotMethods, null if there were none or the service is a JAX-RPC service.
Throws:
java.lang.IllegalStateException - if the implementing class hasn't yet been set.

isMethodRemoveable

public boolean isMethodRemoveable(MethodSignature remove)
Determine whether the method supplied can be unpublished from the service. Methods can be unpublished if they are stored as untagged methods in the service's data model, or if they are tagged methods in source, and the source is editable.


removeMethod

public void removeMethod(MethodSignature remove)
Remove the method signature supplied from the list of methods to be published.

Parameters:
remove - Signature of the method to be unpublished.

renameMethod

public void renameMethod(MethodSignature oldSig,
                         MethodSignature newSig)
Rename a method in the service.

Parameters:
oldSig - Old signature of the method.
newSig - New signature of the method.

addMethod

public void addMethod(MethodSignature add)
Add the method signature supplied to the list of methods to be published.

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

addAllPublishableMethods

public int addAllPublishableMethods(boolean declaredOnly)
Determine all publishable methods in the service class (or endpoint interface for a JAX-RPC service), and mark them for publication. If the class has a subset of methods marked with webmethod tags, only those methods will be exposed in the generated service.

Parameters:
declaredOnly - Set this to true if you want to add only the methods declared in this class/interface, and not any in superclasses/superinterfaces. This value is ignored if any webmethod tags are found in the class or any of its superclasses.
Returns:
The number of methods published.
Throws:
java.lang.IllegalStateException - if no class or service endpoint interface has yet been specified.

clearMethodUpdateLists

public void clearMethodUpdateLists()
Clear all of the method update lists. This method is for use after a pseudo-transaction has been saved or undone.


clearUntaggedMethods

public void clearUntaggedMethods()
Clear the untagged selected methods list. This method is for use when untagged selected methods are turned into tagged selected methods during editing of an implementation file.


getMethodsPublished

public java.util.List getMethodsPublished()
Find all of the methods published on the class, by looking for @webmethod tags in source and by looking at the untaggedMethodsPublished list held in this data model.


getServiceInterfacesOnClass

public java.lang.String[] getServiceInterfacesOnClass()
Find all of the interfaces implemented by the class which extend the java.rmi.Remote interface, and return their names.

Returns:
Array of strings containing the names of the service interfaces.

getMethodPublishableStatus

public java.lang.String getMethodPublishableStatus(JotMethod method)
Determine whether a particular JotMethod is publishable, and return a reason why if it isn't.

Parameters:
method - JotMethod that should be checked.
Returns:
String which will be null if the method is publishable, and will contain a translated method containing the reason why it isn't publishable if it isn't.

getBeansUsedByMethod

public java.util.Set getBeansUsedByMethod(JotMethod method)
Determine which JavaBeans are used by a particular method in a web service.

Parameters:
method - Method to check.
Returns:
Set containing the names of all the beans used by the method.

getClassURL

public java.net.URL getClassURL()
Find the URL at which the class being published resides. If the class hasn't yet been created, the URL returned will be a location in the first part of the source path at which a class will be created.

Returns:
URL of the class being published.

getJotManager

public JotManager getJotManager()
Find and return the appropriate JotManager for this data model.

Returns:
JotManager for the project that is the target of generation.

isPublishable

public boolean isPublishable(java.lang.String name,
                             boolean isClass,
                             int modifiers)
Determines whether the named class/interface having the supplied modifiers is publishable as a web service. Public classes not part of EJBs and EJB remote interfaces are publishable, everything else isn't.

Parameters:
name - Name of the class or interface to test.
isClass - True if it's a class, false if it's an interface.
modifiers - Modifiers of the class.
Returns:
True if it's publishable, false otherwise.

createWebServiceFromClass

public static JAXRPCJavaModel createWebServiceFromClass(java.net.URI uri,
                                                        java.lang.String className,
                                                        int servicePlatform)
                                                 throws java.lang.Exception
Create and generate a web service for the given class. After invocation of this method, the service's data model will have been created, along with all of the required artifacts for the service. All publishable methods declared in the class will be published in the service. A progress bar will be displayed as the service generates, and no generated artifacts will be opened in editors afterwards.

Parameters:
uri - URI of the web service.
className - Package-qualified name of the class to be published.
Returns:
Data model for the generated service.
Throws:
java.lang.Exception - if creation of the service failed for any reason.

resolvePrimitives

public static java.lang.String resolvePrimitives(java.lang.String typeName)
Given the name of a type, check if it's one of the primitive wrappers, and if so replace it with the name of the the primitive.

Parameters:
typeName - Name of the type to check.
Returns:
For primitive wrappers, returns the name of the matching primitive. Otherwise returns whatever was passed in.

Extension SDK

 

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