Class DefaultTagCloudService
- java.lang.Object
-
- org.silverpeas.core.tagcloud.service.DefaultTagCloudService
-
- All Implemented Interfaces:
ComponentInstanceDeletion
,TagCloudService
@Service @Singleton public class DefaultTagCloudService extends Object implements TagCloudService, ComponentInstanceDeletion
-
-
Constructor Summary
Constructors Constructor Description DefaultTagCloudService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createTagCloud(TagCloud tagCloud)
void
delete(String componentInstanceId)
Deletes the resources belonging to the specified component instance.void
deleteTagCloud(TagCloudPK pk, int type)
Collection<TagCloud>
getElementTagClouds(TagCloudPK pk)
Collection<TagCloud>
getInstanceTagClouds(String instanceId)
Collection<TagCloud>
getInstanceTagClouds(String instanceId, int maxCount)
Collection<TagCloud>
getTagCloudsByElement(String instanceId, String externalId, int type)
Collection<TagCloud>
getTagCloudsByTags(String tags, String instanceId, int type)
String
getTagsByElement(TagCloudPK pk)
-
-
-
Method Detail
-
createTagCloud
public void createTagCloud(TagCloud tagCloud)
- Specified by:
createTagCloud
in interfaceTagCloudService
- Parameters:
tagCloud
- The tagcloud to create in database.
-
deleteTagCloud
public void deleteTagCloud(TagCloudPK pk, int type)
- Specified by:
deleteTagCloud
in interfaceTagCloudService
- Parameters:
pk
- The primary key of the tagcloud to delete from database.
-
getInstanceTagClouds
public Collection<TagCloud> getInstanceTagClouds(String instanceId)
- Specified by:
getInstanceTagClouds
in interfaceTagCloudService
- Parameters:
instanceId
- The id of the instance which tagclouds are searched for.- Returns:
- The list of tagclouds corresponding to the instance.
-
getInstanceTagClouds
public Collection<TagCloud> getInstanceTagClouds(String instanceId, int maxCount)
- Specified by:
getInstanceTagClouds
in interfaceTagCloudService
- Parameters:
instanceId
- The id of the instance which tagclouds are searched for.maxCount
- The maximum number of required tagclouds (all are returned it is lower than 0).- Returns:
- The list of tagclouds corresponding to the instance.
-
getElementTagClouds
public Collection<TagCloud> getElementTagClouds(TagCloudPK pk)
- Specified by:
getElementTagClouds
in interfaceTagCloudService
- Parameters:
pk
- The id of the element which tagclouds are searched for.- Returns:
- The list of tagclouds corresponding to the element.
-
getTagCloudsByTags
public Collection<TagCloud> getTagCloudsByTags(String tags, String instanceId, int type)
- Specified by:
getTagCloudsByTags
in interfaceTagCloudService
- Parameters:
tags
- The searched tags.instanceId
- The id of the instance.type
- The type of elements referenced by the tagclouds (publications or forums).- Returns:
- The list of tagclouds which correspond to the tag and the id of the instance given as parameters.
-
getTagCloudsByElement
public Collection<TagCloud> getTagCloudsByElement(String instanceId, String externalId, int type)
- Specified by:
getTagCloudsByElement
in interfaceTagCloudService
- Parameters:
instanceId
- The id of the instance.externalId
- The id of the element.type
- The type of elements referenced by the tagclouds (publications or forums).- Returns:
- The list of tagclouds corresponding to the ids given as parameters.
-
getTagsByElement
public String getTagsByElement(TagCloudPK pk)
- Specified by:
getTagsByElement
in interfaceTagCloudService
-
delete
public void delete(String componentInstanceId)
Deletes the resources belonging to the specified component instance. This method is invoked by Silverpeas when a component instance is being deleted.- Specified by:
delete
in interfaceComponentInstanceDeletion
- Parameters:
componentInstanceId
- the unique identifier of a component instance.
-
-