public class EndpointManager extends Object
Constructor and Description |
---|
EndpointManager(org.wso2.carbon.registry.core.Registry registry)
Constructor accepting an instance of the registry to use.
|
Modifier and Type | Method and Description |
---|---|
void |
addEndpoint(Endpoint endpoint)
Adds the given endpoint artifact to the registry.
|
Endpoint[] |
getAllEndpoints()
Finds all Endpoint artifacts on the registry.
|
Endpoint |
getEndpoint(String endpointId)
Fetches the given endpoint artifact on the registry.
|
Endpoint |
getEndpointByUrl(String url)
Finds the endpoint artifact that matches the given URL.
|
Endpoint |
newEndpoint(String url)
Creates a new endpoint artifact from the given URL.
|
void |
removeEndpoint(String endpointId)
Removes the given endpoint artifact from the registry.
|
void |
setContent(Endpoint endpoint,
org.wso2.carbon.registry.core.Resource endpointResource)
Sets content of the given endpoint artifact to the given resource on the
registry.
|
void |
updateEndpoint(Endpoint endpoint)
Updates the given endpoint artifact on the registry.
|
public EndpointManager(org.wso2.carbon.registry.core.Registry registry)
registry
- the instance of the registry.public Endpoint newEndpoint(String url) throws GovernanceException
url
- the given URL.GovernanceException
- if the operation failed.public void addEndpoint(Endpoint endpoint) throws GovernanceException
endpoint
- the endpoint artifact.GovernanceException
- if the operation failed.public void updateEndpoint(Endpoint endpoint) throws GovernanceException
endpoint
- the endpoint artifact.GovernanceException
- if the operation failed.public Endpoint getEndpoint(String endpointId) throws GovernanceException
endpointId
- the identifier of the endpoint artifact.GovernanceException
- if the operation failed.public void removeEndpoint(String endpointId) throws GovernanceException
endpointId
- the identifier of the endpoint artifact.GovernanceException
- if the operation failed.public void setContent(Endpoint endpoint, org.wso2.carbon.registry.core.Resource endpointResource) throws GovernanceException
endpoint
- the endpoint artifact.endpointResource
- the content resource.GovernanceException
- if the operation failed.public Endpoint getEndpointByUrl(String url) throws GovernanceException
url
- the URL.GovernanceException
- if the operation failed.public Endpoint[] getAllEndpoints() throws GovernanceException
GovernanceException
- if the operation failed.Copyright © 2021 WSO2. All Rights Reserved.