Class WsdlManager


  • public class WsdlManager
    extends Object
    This provides the management functionality for WSDL artifacts stored on the registry.
    • Constructor Summary

      Constructors 
      Constructor Description
      WsdlManager​(org.wso2.carbon.registry.core.Registry registry)
      Constructor accepting an instance of the registry to use.
    • 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​(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.