com.stratelia.silverpeas.containerManager
Class ContainerManager

java.lang.Object
  extended by com.stratelia.silverpeas.containerManager.ContainerManager
All Implemented Interfaces:
Serializable

public class ContainerManager
extends Object
implements Serializable

This class represents the ContainerManager API It is the gateway to all the silverpeas containers (PDC, ....)

See Also:
Serialized Form

Constructor Summary
ContainerManager()
          Constructor declaration
 
Method Summary
 void addContainerContentInstanceLink(Connection connection, int nPositionId, String sComponentId)
          Add a link between a position (in the classify engine) and a container intance Called when a content is referenced in a container
 List<Integer> filterPositionsByComponentId(List<Integer> alPositions, String sComponentId)
          Return only the positions that belongs to the given componentId ATTENTION: this function is slow, use it only for a few positions (for one SilverContentId)
 int getContainerInstanceId(String sComponentId)
          Return the container instance Id corresponding to the componentId
 ContainerPeas getContainerPeas(String componentId)
          Return the containerPeas corresponding to the given componentId
 ContainerPeas getContainerPeasByType(String sContainerType)
          Method declaration
 JoinStatement getFilterPositionsByComponentIdStatement(List<Integer> alPositions, List<String> alComponentId)
          Return the statement to get only the positions that belongs to the given componentId
 int registerNewContainerInstance(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 removeAllPositionIdsLink(Connection connection, List<Integer> alPositionIds)
          Remove all the links for the given positionIds Ex: Called when empty positions are removed from the ClassifyEngine
 void removeContainerContentInstanceLink(Connection connection, int nPositionId, String sComponentId)
          Remove a link between a position (in the classify engine) and a container intance Called when a content is unreferenced in a container
 void silverContentIsRemoved(Connection connection, int nSilverContentId, int nContainerInstanceId)
          A SilverContent is removed, the containerManager is called to do all the necessary actions Assumption : the nSilverContentId is unique among all the SilverContent
 void unregisterNewContainerInstance(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerManager

public ContainerManager()
Constructor declaration

See Also:
Method Detail

registerNewContainerInstance

public int registerNewContainerInstance(Connection connection,
                                        String sComponentId,
                                        String sContainerType,
                                        String sContentType)
                                 throws ContainerManagerException
When a generic component is instanciate, this function is called to register the association between container and content

Throws:
ContainerManagerException

unregisterNewContainerInstance

public void unregisterNewContainerInstance(Connection connection,
                                           String sComponentId,
                                           String sContainerType,
                                           String sContentType)
                                    throws ContainerManagerException
When a generic component is uninstanciate, this function is called to unregister the association between container and content

Throws:
ContainerManagerException

getContainerPeas

public ContainerPeas getContainerPeas(String componentId)
                               throws ContainerManagerException
Return the containerPeas corresponding to the given componentId

Throws:
ContainerManagerException

getContainerPeasByType

public ContainerPeas getContainerPeasByType(String sContainerType)
                                     throws ContainerManagerException
Method declaration

Parameters:
sContainerType -
Returns:
Throws:
ContainerManagerException
See Also:

getContainerInstanceId

public int getContainerInstanceId(String sComponentId)
                           throws ContainerManagerException
Return the container instance Id corresponding to the componentId

Throws:
ContainerManagerException

silverContentIsRemoved

public void silverContentIsRemoved(Connection connection,
                                   int nSilverContentId,
                                   int nContainerInstanceId)
                            throws ContainerManagerException
A SilverContent is removed, the containerManager is called to do all the necessary actions Assumption : the nSilverContentId is unique among all the SilverContent

Throws:
ContainerManagerException

addContainerContentInstanceLink

public void addContainerContentInstanceLink(Connection connection,
                                            int nPositionId,
                                            String sComponentId)
                                     throws ContainerManagerException
Add a link between a position (in the classify engine) and a container intance Called when a content is referenced in a container

Throws:
ContainerManagerException

removeContainerContentInstanceLink

public void removeContainerContentInstanceLink(Connection connection,
                                               int nPositionId,
                                               String sComponentId)
                                        throws ContainerManagerException
Remove a link between a position (in the classify engine) and a container intance Called when a content is unreferenced in a container

Throws:
ContainerManagerException

removeAllPositionIdsLink

public void removeAllPositionIdsLink(Connection connection,
                                     List<Integer> alPositionIds)
                              throws ContainerManagerException
Remove all the links for the given positionIds Ex: Called when empty positions are removed from the ClassifyEngine

Throws:
ContainerManagerException

getFilterPositionsByComponentIdStatement

public JoinStatement getFilterPositionsByComponentIdStatement(List<Integer> alPositions,
                                                              List<String> alComponentId)
                                                       throws ContainerManagerException
Return the statement to get only the positions that belongs to the given componentId

Throws:
ContainerManagerException

filterPositionsByComponentId

public List<Integer> filterPositionsByComponentId(List<Integer> alPositions,
                                                  String sComponentId)
                                           throws ContainerManagerException
Return only the positions that belongs to the given componentId ATTENTION: this function is slow, use it only for a few positions (for one SilverContentId)

Throws:
ContainerManagerException


Copyright © 2016 Silverpeas. All Rights Reserved.