Class WsdlManager
java.lang.Object
org.wso2.carbon.governance.api.wsdls.WsdlManager
This provides the management functionality for WSDL artifacts stored on the
registry.
-
Constructor Summary
ConstructorsConstructorDescriptionWsdlManager(org.wso2.carbon.registry.core.Registry registry) Constructor accepting an instance of the registry to use. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given WSDL artifact to the registry.Wsdl[]findWsdls(WsdlFilter criteria) Finds all WSDL artifacts matching the given filter criteria.Wsdl[]Finds all WSDL artifacts on the registry.Fetches the given WSDL artifact on the registry.newWsdl(byte[] content) Create a new WSDL based on content either embedded or passed to a service.Create a new WSDL based on content either embedded or passed to a service.Adds a new WSDL artifact from the given URL.voidremoveWsdl(String wsdlId) Removes the given WSDL artifact from the registry.protected voidsetContent(Wsdl wsdl, org.wso2.carbon.registry.core.Resource wsdlResource) Sets content of the given WSDL artifact to the given resource on the registry.voidupdateWsdl(Wsdl wsdl) Updates the given WSDL artifact on the registry.
-
Constructor Details
-
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 Details
-
newWsdl
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 contentname- the WSDL name- Returns:
- the artifact added.
- Throws:
GovernanceException- if the operation failed.org.wso2.carbon.registry.core.exceptions.RegistryException
-
addWsdl
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
Updates the given WSDL artifact on the registry.- Parameters:
wsdl- the WSDL artifact.- Throws:
GovernanceException- if the operation failed.
-
getWsdl
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
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
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
Finds all WSDL artifacts on the registry.- Returns:
- all WSDL artifacts on the registry.
- Throws:
GovernanceException- if the operation failed.
-