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

All Known Implementing Classes:
TechServiceManagerImpl

@Transactional
public interface TechServiceManager

A manager of tech services. Provides methods to create, retrieve, delete or update tech services

Author:
ambarthe, ofabre - eBM Websourcing

Method Summary
 void addCategory(java.lang.String techServiceId, java.lang.String categoryId, java.lang.String categoryValueId)
          Add a category to the given tech service.
 void addCategory(java.lang.String techServiceId, java.lang.String categoryId, java.lang.String categoryValue, java.lang.String categoryDesc)
          Add a category to the given tech service.
 java.lang.String createTechService(TechnicalServiceTO techServiceTO)
          Add a new tech service in registry.
 java.util.List<TechnicalServiceTO> getAllTechServices(RequestOptionsTO requestOptionsTO)
          Return the list of all tech services in the registry
 java.util.List<KeyedRefTO> getCategoriesForTechServ(java.lang.String techServiceId)
          Return a List of KeyedRefTO that maps service related categories
 EndpointTO getEndpoint(java.lang.String techServiceName, java.lang.String endpointName)
          Retrieve the endpoint with the given name, which is part of the tech service with the given name.
 java.io.InputStream getRelatedDocContent(java.lang.String relatedDocId)
          Return the content of the specified related document as an InputStream
 java.lang.String getRelatedDocContentAsString(java.lang.String relatedDocId)
          Return the content of the specified related document as a String
 java.util.List<SimpleFileTO> getRelatedDocsForTechServ(java.lang.String techServiceId)
          Return a List of SimpleFileTO that maps service related docs
 TechnicalServiceTO getTechService(java.lang.String techServiceId, java.lang.String user)
          Retrieve an technical service matching the given ID
 java.util.List<TechnicalServiceTO> getTechServicesByTag(java.lang.String tag)
          Get all Technical Services tagged by the String tag.
 java.util.List<TechnicalServiceTO> loadServicesFromWSDL(java.lang.String[] servicesId, RequestOptionsTO requestOptionsTO)
          Retrieve a list of tech services matching the given IDs
 java.lang.String registerRelatedDoc(java.lang.String serviceId, java.lang.String mimetype, byte[] docContent)
          Registers a new document in the registry (supported types are: DOC, PDF, XML, HTML).
 void removeCategories(java.lang.String techServiceId, 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 removeRelatedDoc(java.lang.String serviceId, java.lang.String documentId)
          Remove a related document from the registry.
 void removeTag(java.lang.String tag, java.lang.String serviceId)
          Remove a String tag from the Technical Service.
 void removeTechService(java.lang.String techServiceId)
          Remove the tech services matching the given ID from the registry
 java.util.List<TechnicalServiceTO> searchTechService(java.lang.String searchCriteria, java.util.List<ServiceSearchProperties> searchedProperties, RequestOptionsTO iOptions)
          Retrieve a list of tech services matching the given criteria for the given properties
 void updateComments(java.lang.String serviceId, CommentTO comment)
          Update the Comments of a techService.
 float updateGlobalRating(java.lang.String serviceId)
          Calculate the global rating of a technical service.
 java.lang.String updateTechService(TechnicalServiceTO techServiceTO)
          Update the tech service in the registry.
 

Method Detail

createTechService

java.lang.String createTechService(TechnicalServiceTO techServiceTO)
                                   throws DeploymentException
Add a new tech service in registry. Not implemented yet

Parameters:
techServiceTO - the tech service to add
Returns:
the ID of the added tech service
Throws:
DeploymentException - if an error occurs during tech service creation

getAllTechServices

@Transactional(readOnly=true)
java.util.List<TechnicalServiceTO> getAllTechServices(RequestOptionsTO requestOptionsTO)
                                                      throws DeploymentException
Return the list of all tech services in the registry

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

getEndpoint

@Transactional(readOnly=true)
EndpointTO getEndpoint(java.lang.String techServiceName,
                                     java.lang.String endpointName)
                       throws DeploymentException
Retrieve the endpoint with the given name, which is part of the tech service with the given name.

Parameters:
techServiceName - A tech service name
endpointName - An endpoint name
Returns:
the EndpointTO with the given name, which is part of the tech service with the given name. Can be null
Throws:
DeploymentException - if an error occurs during endpoint retrieval

getTechService

@Transactional(readOnly=true)
TechnicalServiceTO getTechService(java.lang.String techServiceId,
                                                java.lang.String user)
                                  throws DeploymentException
Retrieve an technical service matching the given ID

Parameters:
techServiceId - a tech service ID
Returns:
an TechnicalServiceTO matching the given ID, can be null
Throws:
DeploymentException - if an error occurs during tech service retrieval

loadServicesFromWSDL

@Transactional(readOnly=true)
java.util.List<TechnicalServiceTO> loadServicesFromWSDL(java.lang.String[] servicesId,
                                                                      RequestOptionsTO requestOptionsTO)
                                                        throws DeploymentException
Retrieve a list of tech services matching the given IDs

Parameters:
servicesId - a List of String service IDs
requestOptionsTO - sort, pagination and case sensitive parameters
Returns:
a List of TechnicalServiceTO matching the given IDs
Throws:
DeploymentException - if an error occurs during tech services retrieval

removeTechService

void removeTechService(java.lang.String techServiceId)
                       throws DeploymentException
Remove the tech services matching the given ID from the registry

Parameters:
techServiceId - a tech service ID
Throws:
DeploymentException - if an error occurs during tech service removal

searchTechService

@Transactional(readOnly=true)
java.util.List<TechnicalServiceTO> searchTechService(java.lang.String searchCriteria,
                                                                   java.util.List<ServiceSearchProperties> searchedProperties,
                                                                   RequestOptionsTO iOptions)
                                                     throws DeploymentException
Retrieve a list of tech services matching the given criteria for the given properties

Parameters:
searchCriteria - the search criteria (a String containing criteria separated with whitespaces)
searchedProperties - the searched properties
iOptions - sort, pagination and case sensitive parameters
Returns:
a List of TechnicalServiceTO matching the given criteria for the given properties
Throws:
DeploymentException - if an error occurs during tech services retrieval

updateTechService

java.lang.String updateTechService(TechnicalServiceTO techServiceTO)
                                   throws DeploymentException
Update the tech service in the registry. Not implemented yet

Parameters:
techServiceTO - the tech service to update
Returns:
the ID of the updated tech service
Throws:
DeploymentException - if an error occurs during tech service update

getRelatedDocsForTechServ

java.util.List<SimpleFileTO> getRelatedDocsForTechServ(java.lang.String techServiceId)
                                                       throws DeploymentException
Return a List of SimpleFileTO that maps service related docs

Parameters:
techServiceId - a service id
Returns:
List of SimpleFileTO that maps service related docs
Throws:
DeploymentException - if an error occurs during related docs retrieval

getCategoriesForTechServ

java.util.List<KeyedRefTO> getCategoriesForTechServ(java.lang.String techServiceId)
                                                    throws DeploymentException
Return a List of KeyedRefTO that maps service related categories

Parameters:
techServiceId - a service id
Returns:
List of KeyedRefTO that maps service related categories
Throws:
DeploymentException - if the given service doesn't exist

getRelatedDocContentAsString

java.lang.String getRelatedDocContentAsString(java.lang.String relatedDocId)
                                              throws DeploymentException
Return the content of the specified related document as a String

Parameters:
relatedDocId - a document id
Returns:
the content of the specified related document as a String
Throws:
DeploymentException - if an error occurs during related doc content retrieval

getRelatedDocContent

java.io.InputStream getRelatedDocContent(java.lang.String relatedDocId)
                                         throws DeploymentException
Return the content of the specified related document as an InputStream

Parameters:
relatedDocId - a document id
Returns:
the content of the specified related document as an InputStream
Throws:
DeploymentException - if an error occurs during related doc content retrieval

registerRelatedDoc

java.lang.String registerRelatedDoc(java.lang.String serviceId,
                                    java.lang.String mimetype,
                                    byte[] docContent)
                                    throws DeploymentException
Registers a new document in the registry (supported types are: DOC, PDF, XML, HTML). Indexes its content. Links it to the given service (denoted by the given serviceId).

Parameters:
serviceId - a service identifier.
mimetype - a mimetype (supported Mimetypes are : application/msword, application/pdf, text/html, text/xml)
docContent - the content of the document as a byte array.
Returns:
the created file identifier
Throws:
DeploymentException

removeRelatedDoc

void removeRelatedDoc(java.lang.String serviceId,
                      java.lang.String documentId)
Remove a related document from the registry. The document is denoted by the given identifier

Parameters:
documentId - a document identifier

removeCategories

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

Parameters:
categoryIds - ids of categories to remove

addCategory

void addCategory(java.lang.String techServiceId,
                 java.lang.String categoryId,
                 java.lang.String categoryValueId)
                 throws DeploymentException
Add a category to the given tech service. 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:
techServiceId - a TechnicalService 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 techServiceId,
                 java.lang.String categoryId,
                 java.lang.String categoryValue,
                 java.lang.String categoryDesc)
                 throws DeploymentException
Add a category to the given tech service. 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:
techServiceId - a TechnicalService id
categoryId - a Category id
categoryValue - a category value (UDDI: categoryValue)
categoryDesc - a category description (UDDI: categoryName)
Throws:
DeploymentException - if at least one of the given id doesn't exist in database

updateGlobalRating

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

Parameters:
serviceId - the id of this service.

updateComments

void updateComments(java.lang.String serviceId,
                    CommentTO comment)
Update the Comments of a techService.

Parameters:
serviceId - The technical Service ID.
comment - The comment to add to this technical Service.

getTechServicesByTag

java.util.List<TechnicalServiceTO> getTechServicesByTag(java.lang.String tag)
Get all Technical Services tagged by the String tag.

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

removeTag

void removeTag(java.lang.String tag,
               java.lang.String serviceId)
Remove a String tag from the Technical Service.

Parameters:
serviceId - The technical Service 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:
serviceId - The technical Service ID.
commentID - The EndPoint ID.


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.