Class ContentManagementEngine
- java.lang.Object
-
- org.silverpeas.core.contribution.contentcontainer.content.ContentManagementEngine
-
- All Implemented Interfaces:
Serializable
@Service @Singleton public class ContentManagementEngine extends Object implements Serializable
This class represents the old Content Management API. It is a gateway for all of the silverpeas content management (documentation, ....)- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addSilverContent(Connection connection, String sInternalContentId, String sComponentId, String sAuthorId, SilverContentVisibility scv)
Add a silver content Called when a content add a document and register it to get its SilverContentId in returnint
getContentInstanceId(String sComponentId)
Return the content instance Id corresponding to the componentIdContentPeas
getContentPeas(String sComponentId)
Return the ContentPeas corresponding to the given componentIdContentPeas
getContentPeasByComponentName(String componentName)
Return the ContentPeas corresponding to the given componentString
getInternalContentId(int nSilverContentId)
Return the InternalContentId corresponding to the given SilverContentId Called when a content remove a documentJoinStatement
getPositionsByGenericSearch(String authorId, String afterDate, String beforeDate)
List<ResourceReference>
getResourceReferencesByContentIds(List<Integer> alSilverContentId)
retourne une liste d'instanceID a partir d'une Liste de silvercontentIdList<String>
getResourcesMatchingContents(List<Integer> contentIds)
return a list of identifiers of the resources matching the specified identifiers ofSilverContent
objects.int
getSilverContentId(String sInternalContentId, String sComponentId)
Return the SilverContentId corresponding to the given internalContentId Called when a content remove a documentSortedSet<Integer>
getSilverContentId(List<String> documentFeature)
Return the sorted list containing SilverContentIds corresponding to the list containing id et instanceId The list is not null and not empty !!List<Integer>
getSilverContentIdByInstanceId(String instanceId)
Cette méthode retourne une liste de SilverContentId qui se trouve sous une instance de jobPeas.SilverContentVisibility
getSilverContentVisibility(int silverObjectId)
int
registerNewContentInstance(Connection connection, String sComponentId, String sContainerType, String sContentType)
When a generic component is instanciate, this function is called to register the association between container and contentvoid
removeSilverContent(Connection connection, int nSilverContentId)
Remove a silver content Called when a content remove a documentvoid
unregisterNewContentInstance(Connection connection, String sComponentId, String sContainerType, String sContentType)
When a generic component instance is finalized, this function is called to unregister the association between the container and its contents.void
updateSilverContentVisibilityAttributes(SilverContentVisibility scv, int silverObjectId)
-
-
-
Method Detail
-
getResourcesMatchingContents
public List<String> getResourcesMatchingContents(List<Integer> contentIds)
return a list of identifiers of the resources matching the specified identifiers ofSilverContent
objects.- Parameters:
contentIds
- a list of identifiers ofSilverContent
objects.- Returns:
- a list of resource identifiers.
-
registerNewContentInstance
public int registerNewContentInstance(Connection connection, String sComponentId, String sContainerType, String sContentType) throws ContentManagerException
When a generic component is instanciate, this function is called to register the association between container and content- Parameters:
connection
-sComponentId
-sContainerType
-sContentType
-- Returns:
- Throws:
ContentManagerException
-
unregisterNewContentInstance
public void unregisterNewContentInstance(Connection connection, String sComponentId, String sContainerType, String sContentType) throws ContentManagerException
When a generic component instance is finalized, this function is called to unregister the association between the container and its contents.- Parameters:
connection
- a connection to the database in which is stored the mapping.sComponentId
- the unique identifier of the component instance.sContainerType
- the type of the content container.sContentType
- the type of the contents in the content container.- Throws:
ContentManagerException
- if an error occurs while unregister the content instance.
-
getContentPeas
public ContentPeas getContentPeas(String sComponentId)
Return the ContentPeas corresponding to the given componentId- Parameters:
sComponentId
-- Returns:
- Throws:
ContentManagerException
-
getContentPeasByComponentName
public ContentPeas getContentPeasByComponentName(String componentName)
Return the ContentPeas corresponding to the given component- Parameters:
componentName
-- Returns:
- Throws:
ContentManagerException
-
addSilverContent
public int addSilverContent(Connection connection, String sInternalContentId, String sComponentId, String sAuthorId, SilverContentVisibility scv) throws ContentManagerException
Add a silver content Called when a content add a document and register it to get its SilverContentId in return- Throws:
ContentManagerException
-
removeSilverContent
public void removeSilverContent(Connection connection, int nSilverContentId) throws ContentManagerException
Remove a silver content Called when a content remove a document- Throws:
ContentManagerException
-
getSilverContentId
public int getSilverContentId(String sInternalContentId, String sComponentId) throws ContentManagerException
Return the SilverContentId corresponding to the given internalContentId Called when a content remove a document- Throws:
ContentManagerException
-
getSilverContentId
public SortedSet<Integer> getSilverContentId(List<String> documentFeature) throws ContentManagerException
Return the sorted list containing SilverContentIds corresponding to the list containing id et instanceId The list is not null and not empty !! Called when a content remove a document- Throws:
ContentManagerException
-
getInternalContentId
public String getInternalContentId(int nSilverContentId) throws ContentManagerException
Return the InternalContentId corresponding to the given SilverContentId Called when a content remove a document- Throws:
ContentManagerException
-
getContentInstanceId
public int getContentInstanceId(String sComponentId) throws ContentManagerException
Return the content instance Id corresponding to the componentId- Throws:
ContentManagerException
-
getPositionsByGenericSearch
public JoinStatement getPositionsByGenericSearch(String authorId, String afterDate, String beforeDate)
-
getResourceReferencesByContentIds
public List<ResourceReference> getResourceReferencesByContentIds(List<Integer> alSilverContentId) throws ContentManagerException
retourne une liste d'instanceID a partir d'une Liste de silvercontentId- Parameters:
alSilverContentId
- - la liste de silvercontentId silvercontentId- Returns:
- la liste contenant les instances
- Throws:
ContentManagerException
-
getSilverContentIdByInstanceId
public List<Integer> getSilverContentIdByInstanceId(String instanceId) throws ContentManagerException
Cette méthode retourne une liste de SilverContentId qui se trouve sous une instance de jobPeas.- Parameters:
instanceId
- - l'id de l'instance (trucsAstuces978)- Returns:
- une liste de silvercontentId
- Throws:
ContentManagerException
-
updateSilverContentVisibilityAttributes
public void updateSilverContentVisibilityAttributes(SilverContentVisibility scv, int silverObjectId) throws ContentManagerException
- Throws:
ContentManagerException
-
getSilverContentVisibility
public SilverContentVisibility getSilverContentVisibility(int silverObjectId) throws ContentManagerException
- Throws:
ContentManagerException
-
-