java.lang.Object
org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl
org.wso2.carbon.governance.api.wsdls.dataobjects.WsdlImpl
All Implemented Interfaces:
GovernanceArtifact, Wsdl

public class WsdlImpl extends GovernanceArtifactImpl implements Wsdl
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.
  • Constructor Details

    • WsdlImpl

      public WsdlImpl(String id, org.wso2.carbon.registry.core.Registry registry) throws GovernanceException
      Constructor accepting resource path, identifier and a registry instance. This constructor should be used only when the wsdl already saved in the registry.
      Parameters:
      id - the resource identifier.
      registry - the registry instance.
      Throws:
      GovernanceException - if the construction fails.
    • WsdlImpl

      public WsdlImpl(String id, String url)
      Constructor accepting resource identifier and the WSDL URL. Can be used to create and save new wsdl instances.
      Parameters:
      id - the resource identifier.
      url - the WSDL URL.
  • Method Details

    • getQName

      public QName getQName()
      Description copied from interface: GovernanceArtifact
      Returns the QName of the artifact.
      Specified by:
      getQName in interface 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.
      Specified by:
      getWsdlElement in interface Wsdl
      Returns:
      the WSDL element.
    • setWsdlElement

      public void setWsdlElement(org.apache.axiom.om.OMElement wsdlElement)
      Method to set the WSDL element of this WSDL artifact.
      Specified by:
      setWsdlElement in interface Wsdl
      Parameters:
      wsdlElement - the WSDL element.
    • getUrl

      public String getUrl()
      Method to obtain the WSDL URL.
      Returns:
      the WSDL URL.
    • 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.
      Specified by:
      attachSchema in interface Wsdl
      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.
      Specified by:
      detachSchema in interface Wsdl
      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.
      Specified by:
      getAttachedSchemas in interface Wsdl
      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.
      Specified by:
      attachEndpoint in interface Wsdl
      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.
      Specified by:
      detachEndpoint in interface Wsdl
      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.
      Specified by:
      getAttachedEndpoints in interface Wsdl
      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.
    • setQName

      public void setQName(QName qName) throws GovernanceException
      Method to set the qualified name of this service artifact.
      Specified by:
      setQName in interface GovernanceArtifact
      Parameters:
      qName - the qualified name.
      Throws:
      GovernanceException - if the operation failed.