org.wso2.carbon.governance.api.wsdls

## Class WsdlManager

- java.lang.Object
- - org.wso2.carbon.governance.api.wsdls.WsdlManager

-     public class WsdlManager
      extends Object

  This provides the management functionality for WSDL artifacts stored on the registry.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WsdlManager(org.wso2.carbon.registry.core.Registry registry)` Constructor accepting an instance of the registry to use.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addWsdl(Wsdl wsdl)` Adds the given WSDL artifact to the registry.
    `Wsdl[]` | `findWsdls(WsdlFilter criteria)` Finds all WSDL artifacts matching the given filter criteria.
    `Wsdl[]` | `getAllWsdls()` Finds all WSDL artifacts on the registry.
    `Wsdl` | `getWsdl(String wsdlId)` Fetches the given WSDL artifact on the registry.
    `Wsdl` | `newWsdl(byte[] content)` Create a new WSDL based on content either embedded or passed to a service.
    `Wsdl` | `newWsdl(byte[] content, String name)` Create a new WSDL based on content either embedded or passed to a service.
    `Wsdl` | `newWsdl(String url)` Adds a new WSDL artifact from the given URL.
    `void` | `removeWsdl(String wsdlId)` Removes the given WSDL artifact from the registry.
    `protected void` | `setContent(Wsdl wsdl, org.wso2.carbon.registry.core.Resource wsdlResource)` Sets content of the given WSDL artifact to the given resource on the registry.
    `void` | `updateWsdl(Wsdl wsdl)` Updates the given WSDL artifact on the registry.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WsdlManager

          public WsdlManager(org.wso2.carbon.registry.core.Registry registry)

      Constructor accepting an instance of the registry to use.
      Parameters:
        `registry` - the instance of the registry.

  - ### Method Detail

    - #### newWsdl

          public Wsdl newWsdl(String url)
                       throws GovernanceException

      Adds a new WSDL artifact from the given URL.
      Parameters:
        `url` - the given URL.
      Returns:
        the artifact added.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### newWsdl

          public Wsdl newWsdl(byte[] content)
                       throws org.wso2.carbon.registry.core.exceptions.RegistryException

      Create a new WSDL based on content either embedded or passed to a service.
      Parameters:
        `content` - the WSDL content
      Returns:
        the artifact added.
      Throws:
        `GovernanceException` - if the operation failed.
        `org.wso2.carbon.registry.core.exceptions.RegistryException`

    - #### newWsdl

          public Wsdl newWsdl(byte[] content,
                              String name)
                       throws org.wso2.carbon.registry.core.exceptions.RegistryException

      Create a new WSDL based on content either embedded or passed to a service.
      Parameters:
        `content` - the WSDL content
        `name` - the WSDL name
      Returns:
        the artifact added.
      Throws:
        `GovernanceException` - if the operation failed.
        `org.wso2.carbon.registry.core.exceptions.RegistryException`

    - #### addWsdl

          public void addWsdl(Wsdl wsdl)
                       throws GovernanceException

      Adds the given WSDL artifact to the registry. Please do not use this method to update an existing artifact use the update method instead. If this method is used to update an existing artifact, all existing properties (such as lifecycle details) will be removed from the existing artifact.
      Parameters:
        `wsdl` - the WSDL artifact.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### updateWsdl

          public void updateWsdl(Wsdl wsdl)
                          throws GovernanceException

      Updates the given WSDL artifact on the registry.
      Parameters:
        `wsdl` - the WSDL artifact.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### getWsdl

          public Wsdl getWsdl(String wsdlId)
                       throws GovernanceException

      Fetches the given WSDL artifact on the registry.
      Parameters:
        `wsdlId` - the identifier of the WSDL artifact.
      Returns:
        the WSDL artifact.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### removeWsdl

          public void removeWsdl(String wsdlId)
                          throws GovernanceException

      Removes the given WSDL artifact from the registry.
      Parameters:
        `wsdlId` - the identifier of the WSDL artifact.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### setContent

          protected void setContent(Wsdl wsdl,
                                    org.wso2.carbon.registry.core.Resource wsdlResource)
                             throws GovernanceException

      Sets content of the given WSDL artifact to the given resource on the registry.
      Parameters:
        `wsdl` - the WSDL artifact.
        `wsdlResource` - the content resource.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### findWsdls

          public Wsdl[] findWsdls(WsdlFilter criteria)
                           throws GovernanceException

      Finds all WSDL artifacts matching the given filter criteria.
      Parameters:
        `criteria` - the filter criteria to be matched.
      Returns:
        the WSDL artifacts that match.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### getAllWsdls

          public Wsdl[] getAllWsdls()
                             throws GovernanceException

      Finds all WSDL artifacts on the registry.
      Returns:
        all WSDL artifacts on the registry.
      Throws:
        `GovernanceException` - if the operation failed.

Copyright © 2017 WSO2. All rights reserved.