org.ow2.dragon.api.service.deployment
Interface EndpointManager

All Known Implementing Classes:
EndpointManagerImpl

@Transactional
public interface EndpointManager

A manager of endpoints. Provides methods to create, retrieve, delete or update endpoints. Method arguments must be non null, unless the contrary is explicitly specified.

Author:
ambarthe, ofabre - eBM WebSourcing

Method Summary
 void addCategory(java.lang.String endpointId, java.lang.String categoryId, java.lang.String categoryValueId)
          Add a category to the given endpoint.
 void addCategory(java.lang.String endpointId, java.lang.String categoryId, java.lang.String categoryValue, java.lang.String categoryDesc)
          Add a category to the given endpoint.
 java.util.List<EndpointTO> getAllEndpoints(RequestOptionsTO requestOptionsTO)
          Return the list of all endpoints in the registry.
 java.util.List<KeyedRefTO> getCategoriesForEndpoint(java.lang.String endpointId)
          Return the list of categories related to the endpoint matching the given id
 EndpointTO getEndpoint(java.lang.String endpointId, java.lang.String user)
          Retrieve an endpoint matching the given ID
 java.util.List<EndpointTO> getEndpointsByBinding(java.lang.String bindingId, RequestOptionsTO requestOptionsTO)
          Return the list of all endpoints linked to the binding matching the given ID.
 java.util.List<EndpointTO> getEndpointsByTag(java.lang.String tag)
          Get all Endpoints tagged by the String tag.
 java.util.List<EndpointTO> getEndpointsByTechService(java.lang.String techServiceId, RequestOptionsTO requestOptionsTO)
          Return the list of all endpoints linked to the technical service matching the given ID.
 void removeCategories(java.lang.String endpointId, java.util.List<java.lang.String> categoryIds)
          Remove the selected categories linked to a technical service
 void removeComment(java.lang.String serviceId, java.lang.String commentId)
          Remove a Comment from the endpoint.
 void removeEndpoint(java.lang.String endpointId)
          Remove the endpoint matching the given ID from the registry
 void removeTag(java.lang.String tag, java.lang.String endpointId)
          Remove a String tag from the endpoint.
 void updateComments(java.lang.String endpointId, CommentTO comment)
          Update the Comments of an Endpoint.
 java.lang.String updateEndpoint(EndpointTO endpointTO)
          Update the endpoint in the registry.
 float updateGlobalRating(java.lang.String endpointId)
          Calculate the global rating of a technical service.
 

Method Detail

getAllEndpoints

@Transactional(readOnly=true)
java.util.List<EndpointTO> getAllEndpoints(RequestOptionsTO requestOptionsTO)
                                           throws DeploymentException
Return the list of all endpoints in the registry.

Parameters:
requestOptionsTO - sort, pagination and case sensitive parameters. Could be null.
Returns:
the List of all EndpointTO in the registry, not null, can be empty
Throws:
DeploymentException - if an error occurs during endpoints retrieval

getEndpoint

@Transactional(readOnly=true)
EndpointTO getEndpoint(java.lang.String endpointId,
                                     java.lang.String user)
                       throws DeploymentException
Retrieve an endpoint matching the given ID

Parameters:
endpointId - an endpoint ID
user - a user login, could be null
Returns:
an EndpointTO matching the given ID, can be null
Throws:
DeploymentException - if no Endpoint found matching the given id

getEndpointsByBinding

@Transactional(readOnly=true)
java.util.List<EndpointTO> getEndpointsByBinding(java.lang.String bindingId,
                                                               RequestOptionsTO requestOptionsTO)
                                                 throws DeploymentException
Return the list of all endpoints linked to the binding matching the given ID. Not implemented yet

Parameters:
bindingId - a binding ID
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of all EndpointTO linked to the binding matching the given ID, not null, can be empty
Throws:
DeploymentException - if an error occurs during endpoints retrieval

getEndpointsByTechService

@Transactional(readOnly=true)
java.util.List<EndpointTO> getEndpointsByTechService(java.lang.String techServiceId,
                                                                   RequestOptionsTO requestOptionsTO)
Return the list of all endpoints linked to the technical service matching the given ID.

Parameters:
techServiceId - a tech service ID
requestOptionsTO - sort, pagination and case sensitive parameters, could be null
Returns:
the List of all EndpointTO linked to the tech service matching the given ID, not null, can be empty

removeEndpoint

void removeEndpoint(java.lang.String endpointId)
                    throws DeploymentException
Remove the endpoint matching the given ID from the registry

Parameters:
endpointId - an endpoint ID
Throws:
DeploymentException - if an error occurs during endpoint removal

updateEndpoint

java.lang.String updateEndpoint(EndpointTO endpointTO)
                                throws DeploymentException
Update the endpoint in the registry.

Parameters:
endpointTO - EndpointTO to update
Returns:
the ID of the updated endpoint
Throws:
DeploymentException - if no Endpoint found for the given techServ id to update

getCategoriesForEndpoint

java.util.List<KeyedRefTO> getCategoriesForEndpoint(java.lang.String endpointId)
                                                    throws DeploymentException
Return the list of categories related to the endpoint matching the given id

Parameters:
endpointId - an Endpoint identifier
Returns:
the list of categories as KeyedRefTO related to the endpoint matching the given id
Throws:
DeploymentException - if no Endpoint found for the given id

addCategory

void addCategory(java.lang.String endpointId,
                 java.lang.String categoryId,
                 java.lang.String categoryValueId)
                 throws DeploymentException
Add a category to the given endpoint. The added category is of the type of the category denoted by the categoryId argument and the selected value is denoted by the categoryValueId argument.

Parameters:
endpointId - a Endpoint id
categoryId - a Category id
categoryValueId - an identifier of a CategoryValue containing category info to add.
Throws:
DeploymentException - if at least one of the given id doesn't exist in database

addCategory

void addCategory(java.lang.String endpointId,
                 java.lang.String categoryId,
                 java.lang.String categoryValue,
                 java.lang.String categoryDesc)
                 throws DeploymentException
Add a category to the given endpoint. The added category is of the type of the category denoted by the categoryId argument and the selected value is denoted by the categoryValueId argument.

Parameters:
endpointId - a Endpoint id
categoryId - a Category id
categoryValue - a category value (UDDI: categoryValue)
categoryDesc - a category description (UDDI: categoryName), could be null
Throws:
DeploymentException - if at least one of the given id doesn't exist in database or if value is null or empty

removeCategories

void removeCategories(java.lang.String endpointId,
                      java.util.List<java.lang.String> categoryIds)
                      throws DeploymentException
Remove the selected categories linked to a technical service

Parameters:
endpointId - an Endpoint identifier
categoryIds - ids of categories to remove, can be empty
Throws:
DeploymentException - if no endpoint found for the given id or if no category found for the given ids

updateGlobalRating

float updateGlobalRating(java.lang.String endpointId)
Calculate the global rating of a technical service.

Parameters:
endpointId - the id of this endpoint.

updateComments

void updateComments(java.lang.String endpointId,
                    CommentTO comment)
Update the Comments of an Endpoint.

Parameters:
endpointId - The endpoint ID
comment - The comment to add to this endpoint.

getEndpointsByTag

java.util.List<EndpointTO> getEndpointsByTag(java.lang.String tag)
Get all Endpoints tagged by the String tag.

Parameters:
tag - the tag.
Returns:
Endpoints related to tag.

removeTag

void removeTag(java.lang.String tag,
               java.lang.String endpointId)
Remove a String tag from the endpoint.

Parameters:
endpointId - The endpoint ID
tag - The tag to remove from.

removeComment

void removeComment(java.lang.String serviceId,
                   java.lang.String commentId)
Remove a Comment from the endpoint.

Parameters:
endpointId - The endpoint ID
commentId - The comment ID.


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.