Class DefaultPdcClassifyManager
- java.lang.Object
-
- org.silverpeas.core.pdc.pdc.service.DefaultPdcClassifyManager
-
- All Implemented Interfaces:
ComponentInstanceDeletion
@Service public class DefaultPdcClassifyManager extends Object implements ComponentInstanceDeletion
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultPdcClassifyManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addPosition(int silverObjectId, ClassifyPosition position, String sComponentId)
void
createValuesAndReplace(Connection con, String axisId, List<String> oldPath, List<String> newPath)
Create two lists of Value.void
delete(String componentInstanceId)
Deletes the resources belonging to the specified component instance.void
deletePosition(int nPositionId, String sComponentId)
List<Integer>
findSilverContentIdByPosition(SearchContext searchContext, List<String> alComponentId, String authorId, String afterDate, String beforeDate, boolean recursiveSearch, boolean visibilitySensitive)
Find all the SilverContentId with the given position.List<Integer>
getObjectsByInstance(String instanceId)
List<ObjectValuePair>
getObjectValuePairs(SearchContext searchContext, int axisId, List<String> instanceIds)
List<PertinentAxis>
getPertinentAxis(SearchContext searchContext, List<Integer> axisIds, List<String> instanceIds)
List<PertinentValue>
getPertinentValues(SearchContext searchContext, int axisId, List<String> instanceIds)
List<Position<Value>>
getPositions(int silverObjectId, String sComponentId)
boolean
hasAlreadyPositions(List<Integer> objectIdList, UsedAxis usedAxis)
search a defined position for one usedAxisint
isPositionAlreadyExists(int silverObjectId, ClassifyPosition position)
void
registerAxis(Connection con, int axisId)
void
unregisterAxis(Connection con, int axisId)
int
updatePosition(ClassifyPosition position)
int
updatePositions(List<Value> classifyValues, int silverObjectId)
-
-
-
Method Detail
-
isPositionAlreadyExists
public int isPositionAlreadyExists(int silverObjectId, ClassifyPosition position) throws PdcException
- Throws:
PdcException
-
addPosition
public int addPosition(int silverObjectId, ClassifyPosition position, String sComponentId) throws PdcException
- Throws:
PdcException
-
updatePosition
public int updatePosition(ClassifyPosition position) throws PdcException
- Throws:
PdcException
-
updatePositions
public int updatePositions(List<Value> classifyValues, int silverObjectId) throws PdcException
- Throws:
PdcException
-
deletePosition
public void deletePosition(int nPositionId, String sComponentId) throws PdcException
- Throws:
PdcException
-
getPositions
public List<Position<Value>> getPositions(int silverObjectId, String sComponentId) throws PdcException
- Throws:
PdcException
-
registerAxis
public void registerAxis(Connection con, int axisId) throws PdcException
- Throws:
PdcException
-
unregisterAxis
public void unregisterAxis(Connection con, int axisId) throws PdcException
- Throws:
PdcException
-
createValuesAndReplace
public void createValuesAndReplace(Connection con, String axisId, List<String> oldPath, List<String> newPath) throws PdcException
Create two lists of Value. Then, we replace the first Value list by the second- Parameters:
con
- - a connection to the databaseaxisId
- - the id of the axisoldPath
- - a list of pathnewPath
- - a list of path- Throws:
PdcException
-
getObjectsByInstance
public List<Integer> getObjectsByInstance(String instanceId) throws PdcException
- Throws:
PdcException
-
hasAlreadyPositions
public boolean hasAlreadyPositions(List<Integer> objectIdList, UsedAxis usedAxis) throws PdcException
search a defined position for one usedAxis- Parameters:
objectIdList
-usedAxis
- - the UsedAxis object- Returns:
- true if for one UsedAxis, a position exists, false otherwise
- Throws:
PdcException
-
getPertinentAxis
public List<PertinentAxis> getPertinentAxis(SearchContext searchContext, List<Integer> axisIds, List<String> instanceIds) throws PdcException
- Throws:
PdcException
-
getPertinentValues
public List<PertinentValue> getPertinentValues(SearchContext searchContext, int axisId, List<String> instanceIds) throws PdcException
- Throws:
PdcException
-
getObjectValuePairs
public List<ObjectValuePair> getObjectValuePairs(SearchContext searchContext, int axisId, List<String> instanceIds) throws PdcException
- Throws:
PdcException
-
findSilverContentIdByPosition
public List<Integer> findSilverContentIdByPosition(SearchContext searchContext, List<String> alComponentId, String authorId, String afterDate, String beforeDate, boolean recursiveSearch, boolean visibilitySensitive) throws PdcException
Find all the SilverContentId with the given position.- Parameters:
searchContext
-alComponentId
-authorId
-afterDate
-beforeDate
-recursiveSearch
-visibilitySensitive
-- Returns:
- Throws:
PdcException
-
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.
-
-