org.wso2.carbon.governance.api.wsdls.dataobjects
Class Wsdl

java.lang.Object
  extended by org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact
      extended by org.wso2.carbon.governance.api.wsdls.dataobjects.Wsdl

public class Wsdl
extends GovernanceArtifact

This represents a WSDL artifact stored on the Registry. WSDL artifacts are created as a result of importing or uploading a WSDL, or when a service which has an attached WSDL is created.


Field Summary
 
Fields inherited from class org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact
attributes
 
Constructor Summary
Wsdl(String id, String url)
          Constructor accepting resource identifier and the WSDL URL.
Wsdl(String path, String id, org.wso2.carbon.registry.core.Registry registry)
          Constructor accepting resource path, identifier and a registry instance.
 
Method Summary
 void attachEndpoint(Endpoint endpoint)
          Attach an endpoint artifact to a WSDL artifact.
 void attachSchema(Schema schema)
          Attach a schema artifact to a WSDL artifact.
 void detachEndpoint(String endpointId)
          Detach an endpoint artifact from a WSDL artifact.
 void detachSchema(String schemaId)
          Detach a schema artifact from a WSDL artifact.
 Endpoint[] getAttachedEndpoints()
          Method to retrieve all endpoints attached to this WSDL artifact.
 Schema[] getAttachedSchemas()
          Method to retrieve all schemas attached to this WSDL artifact.
 String getPath()
          Returns the path.
 QName getQName()
          Returns the QName of the artifact.
 String getUrl()
          Method to obtain the WSDL URL.
 org.apache.axiom.om.OMElement getWsdlElement()
          Method to obtain the WSDL element of this WSDL artifact.
 void loadWsdlDetails()
          Method to load the WSDL details into this artifact.
 void setWsdlElement(org.apache.axiom.om.OMElement wsdlElement)
          Method to set the WSDL element of this WSDL artifact.
 
Methods inherited from class org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact
addAttribute, associateRegistry, attach, checkRegistryResourceAssociation, createVersion, detach, getAssociatedRegistry, getAttribute, getAttributeKeys, getAttributes, getDependencies, getDependents, getId, removeAttribute, setAttribute, setAttributes, setId, setPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wsdl

public Wsdl(String path,
            String id,
            org.wso2.carbon.registry.core.Registry registry)
     throws GovernanceException
Constructor accepting resource path, identifier and a registry instance.

Parameters:
path - the resource path.
id - the resource identifier.
registry - the registry instance.
Throws:
GovernanceException - if the construction fails.

Wsdl

public Wsdl(String id,
            String url)
Constructor accepting resource identifier and the WSDL URL.

Parameters:
id - the resource identifier.
url - the WSDL URL.
Method Detail

getQName

public QName getQName()
Description copied from class: GovernanceArtifact
Returns the QName of the artifact.

Specified by:
getQName in class GovernanceArtifact
Returns:
the QName of the artifact

getWsdlElement

public org.apache.axiom.om.OMElement getWsdlElement()
Method to obtain the WSDL element of this WSDL artifact.

Returns:
the WSDL element.

setWsdlElement

public void setWsdlElement(org.apache.axiom.om.OMElement wsdlElement)
Method to set the WSDL element of this WSDL artifact.

Parameters:
wsdlElement - the WSDL element.

getUrl

public String getUrl()
Method to obtain the WSDL URL.

Returns:
the WSDL URL.

getPath

public String getPath()
Description copied from class: GovernanceArtifact
Returns the path.

Overrides:
getPath in class GovernanceArtifact
Returns:
the path.

attachSchema

public void attachSchema(Schema schema)
                  throws GovernanceException
Attach a schema artifact to a WSDL artifact. Both the artifacts should be saved, before calling this method.

Parameters:
schema - the schema to attach.
Throws:
GovernanceException - if the operation failed.

detachSchema

public void detachSchema(String schemaId)
                  throws GovernanceException
Detach a schema artifact from a WSDL artifact. Both the artifacts should be saved, before calling this method.

Parameters:
schemaId - the identifier of the schema to detach.
Throws:
GovernanceException - if the operation failed.

getAttachedSchemas

public Schema[] getAttachedSchemas()
                            throws GovernanceException
Method to retrieve all schemas attached to this WSDL artifact.

Returns:
all schemas attached to this WSDL artifact.
Throws:
GovernanceException - if the operation failed.

attachEndpoint

public void attachEndpoint(Endpoint endpoint)
                    throws GovernanceException
Attach an endpoint artifact to a WSDL artifact. Both the artifacts should be saved, before calling this method.

Parameters:
endpoint - the endpoint to attach.
Throws:
GovernanceException - if the operation failed.

detachEndpoint

public void detachEndpoint(String endpointId)
                    throws GovernanceException
Detach an endpoint artifact from a WSDL artifact. Both the artifacts should be saved, before calling this method.

Parameters:
endpointId - the identifier of the endpoint to detach.
Throws:
GovernanceException - if the operation failed.

getAttachedEndpoints

public Endpoint[] getAttachedEndpoints()
                                throws GovernanceException
Method to retrieve all endpoints attached to this WSDL artifact.

Returns:
all endpoints attached to this WSDL artifact.
Throws:
GovernanceException - if the operation failed.

loadWsdlDetails

public void loadWsdlDetails()
                     throws GovernanceException
Method to load the WSDL details into this artifact.

Throws:
GovernanceException - if the operation failed.


Copyright © 2010 WSO2 Inc. All Rights Reserved.