org.ow2.dragon.service.deployment
Class EndpointManagerImpl

java.lang.Object
  extended by org.ow2.dragon.service.deployment.EndpointManagerImpl
All Implemented Interfaces:
EndpointManager

public class EndpointManagerImpl
extends java.lang.Object
implements EndpointManager

Author:
ofabre - eBM WebSourcing

Constructor Summary
EndpointManagerImpl()
           
 
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 endpointId, 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 setCommentDAO(CommentDAO commentDAO)
           
 void setEndpointDAO(EndpointDAO endpointDAO)
           
 void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)
           
 void setUniversalUnifiedDAO(UniversalUnifiedDAO universalUnifiedDAO)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointManagerImpl

public EndpointManagerImpl()
Method Detail

setCommentDAO

public void setCommentDAO(CommentDAO commentDAO)

getAllEndpoints

public java.util.List<EndpointTO> getAllEndpoints(RequestOptionsTO requestOptionsTO)
                                           throws DeploymentException
Description copied from interface: EndpointManager
Return the list of all endpoints in the registry.

Specified by:
getAllEndpoints in interface EndpointManager
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

public EndpointTO getEndpoint(java.lang.String endpointId,
                              java.lang.String user)
                       throws DeploymentException
Description copied from interface: EndpointManager
Retrieve an endpoint matching the given ID

Specified by:
getEndpoint in interface EndpointManager
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

public java.util.List<EndpointTO> getEndpointsByBinding(java.lang.String bindingId,
                                                        RequestOptionsTO requestOptionsTO)
                                                 throws DeploymentException
Description copied from interface: EndpointManager
Return the list of all endpoints linked to the binding matching the given ID. Not implemented yet

Specified by:
getEndpointsByBinding in interface EndpointManager
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

public java.util.List<EndpointTO> getEndpointsByTechService(java.lang.String techServiceId,
                                                            RequestOptionsTO requestOptionsTO)
Description copied from interface: EndpointManager
Return the list of all endpoints linked to the technical service matching the given ID.

Specified by:
getEndpointsByTechService in interface EndpointManager
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

public void removeEndpoint(java.lang.String endpointId)
                    throws DeploymentException
Description copied from interface: EndpointManager
Remove the endpoint matching the given ID from the registry

Specified by:
removeEndpoint in interface EndpointManager
Parameters:
endpointId - an endpoint ID
Throws:
DeploymentException - if an error occurs during endpoint removal

setEndpointDAO

public void setEndpointDAO(EndpointDAO endpointDAO)

setTransfertObjectAssembler

public void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)

updateEndpoint

public java.lang.String updateEndpoint(EndpointTO endpointTO)
                                throws DeploymentException
Description copied from interface: EndpointManager
Update the endpoint in the registry.

Specified by:
updateEndpoint in interface EndpointManager
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

updateGlobalRating

public float updateGlobalRating(java.lang.String endpointId)
Description copied from interface: EndpointManager
Calculate the global rating of a technical service.

Specified by:
updateGlobalRating in interface EndpointManager
Parameters:
endpointId - the id of this endpoint.

updateComments

public void updateComments(java.lang.String endpointId,
                           CommentTO comment)
Description copied from interface: EndpointManager
Update the Comments of an Endpoint.

Specified by:
updateComments in interface EndpointManager
Parameters:
endpointId - The endpoint ID
comment - The comment to add to this endpoint.

getEndpointsByTag

public java.util.List<EndpointTO> getEndpointsByTag(java.lang.String tag)
Description copied from interface: EndpointManager
Get all Endpoints tagged by the String tag.

Specified by:
getEndpointsByTag in interface EndpointManager
Parameters:
tag - the tag.
Returns:
Endpoints related to tag.

removeTag

public void removeTag(java.lang.String tag,
                      java.lang.String endpointId)
Description copied from interface: EndpointManager
Remove a String tag from the endpoint.

Specified by:
removeTag in interface EndpointManager
Parameters:
tag - The tag to remove from.
endpointId - The endpoint ID

removeComment

public void removeComment(java.lang.String endpointId,
                          java.lang.String commentId)
Description copied from interface: EndpointManager
Remove a Comment from the endpoint.

Specified by:
removeComment in interface EndpointManager
commentId - The comment ID.

getCategoriesForEndpoint

public java.util.List<KeyedRefTO> getCategoriesForEndpoint(java.lang.String endpointId)
                                                    throws DeploymentException
Description copied from interface: EndpointManager
Return the list of categories related to the endpoint matching the given id

Specified by:
getCategoriesForEndpoint in interface EndpointManager
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

removeCategories

public void removeCategories(java.lang.String endpointId,
                             java.util.List<java.lang.String> categoryIds)
                      throws DeploymentException
Description copied from interface: EndpointManager
Remove the selected categories linked to a technical service

Specified by:
removeCategories in interface EndpointManager
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

addCategory

public void addCategory(java.lang.String endpointId,
                        java.lang.String categoryId,
                        java.lang.String categoryValueId)
                 throws DeploymentException
Description copied from interface: EndpointManager
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.

Specified by:
addCategory in interface EndpointManager
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

public void addCategory(java.lang.String endpointId,
                        java.lang.String categoryId,
                        java.lang.String categoryValue,
                        java.lang.String categoryDesc)
                 throws DeploymentException
Description copied from interface: EndpointManager
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.

Specified by:
addCategory in interface EndpointManager
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

setUniversalUnifiedDAO

public void setUniversalUnifiedDAO(UniversalUnifiedDAO universalUnifiedDAO)


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.