com.stratelia.silverpeas.contentManager
Class ContentManager

java.lang.Object
  extended by com.stratelia.silverpeas.contentManager.ContentManager
All Implemented Interfaces:
Serializable

@Named(value="contentManager")
public class ContentManager
extends Object
implements Serializable

This class represents the ContentManager API It is the gateway to all the silverpeas contents (documentation, ....)

See Also:
Serialized Form

Constructor Summary
ContentManager()
           
 
Method Summary
 int addSilverContent(Connection connection, String sInternalContentId, String sComponentId, String sAuthorId)
          Add a silver content Called when a content add a document and register it to get its SilverContentId in return
 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 return
 int getContentInstanceId(String sComponentId)
          Return the content instance Id corresponding to the componentId
 ContentPeas getContentPeas(String sComponentId)
          Return the ContentPeas corresponding to the given componentId
 List<URLIcone> getContentURLIcones(String sContentType, List<String> asUserContentRoles)
          Return a list of URLIcones corresponding to the rights of the given roles It is the gateway to all the silverpeas contents (documentation, ....)
 List<String> getInstanceId(List<Integer> alSilverContentId)
          retourne une liste d'instanceID a partir d'une Liste de silvercontentId
 String getInternalContentId(int nSilverContentId)
          Return the InternalContentId corresponding to the given SilverContentId Called when a content remove a document
 JoinStatement getPositionsByGenericSearch(String authorId, String afterDate, String beforeDate)
           
 List<SilverContent> getSilverContentBySilverContentIds(List<Integer> alSilverContentIds)
           
 SortedSet<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 !!
 int getSilverContentId(String sInternalContentId, String sComponentId)
          Return the SilverContentId corresponding to the given internalContentId Called when a content remove a document
 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 content
 void removeSilverContent(Connection connection, int nSilverContentId, String sComponentId)
          Remove a silver content Called when a content remove a document
 void unregisterNewContentInstance(Connection connection, String sComponentId, String sContainerType, String sContentType)
          When a generic component is uninstanciate, this function is called to unregister the association between container and content
 void updateSilverContentVisibilityAttributes(SilverContentVisibility scv, String instanceId, int silverObjectId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentManager

public ContentManager()
               throws ContentManagerException
Throws:
ContentManagerException
Method Detail

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 is uninstanciate, this function is called to unregister the association between container and content

Parameters:
connection -
sComponentId -
sContainerType -
sContentType -
Throws:
ContentManagerException

getContentPeas

public ContentPeas getContentPeas(String sComponentId)
                           throws ContentManagerException
Return the ContentPeas corresponding to the given componentId

Parameters:
sComponentId -
Returns:
Throws:
ContentManagerException

getContentURLIcones

public List<URLIcone> getContentURLIcones(String sContentType,
                                          List<String> asUserContentRoles)
Return a list of URLIcones corresponding to the rights of the given roles It is the gateway to all the silverpeas contents (documentation, ....)

Parameters:
sContentType -
asUserContentRoles -
Returns:

addSilverContent

public int addSilverContent(Connection connection,
                            String sInternalContentId,
                            String sComponentId,
                            String sAuthorId)
                     throws ContentManagerException
Add a silver content Called when a content add a document and register it to get its SilverContentId in return

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,
                                String sComponentId)
                         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)
                                          throws ContentManagerException
Throws:
ContentManagerException

getInstanceId

public List<String> getInstanceId(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

getSilverContentBySilverContentIds

public List<SilverContent> getSilverContentBySilverContentIds(List<Integer> alSilverContentIds)
                                                       throws ContentManagerException
Throws:
ContentManagerException

updateSilverContentVisibilityAttributes

public void updateSilverContentVisibilityAttributes(SilverContentVisibility scv,
                                                    String instanceId,
                                                    int silverObjectId)
                                             throws ContentManagerException
Throws:
ContentManagerException

getSilverContentVisibility

public SilverContentVisibility getSilverContentVisibility(int silverObjectId)
                                                   throws ContentManagerException
Throws:
ContentManagerException


Copyright © 2016 Silverpeas. All Rights Reserved.