Class ClassifyEngine
- java.lang.Object
-
- org.silverpeas.core.pdc.classification.ClassifyEngine
-
- All Implemented Interfaces:
SilverContentPostUpdate
@Service @Singleton public class ClassifyEngine extends Object implements SilverContentPostUpdate
This class represents the ClassifyEngine API It gives access to functions for classifying, unclassifying and searching SilverObjetIds Assumption : The SilverObjetIds processed are int values from 0 to n The axis processed are int values from 0 to n
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClassifyEngine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Value>
intclassifySilverObject(Connection connection, int silverObjectId, Position<T> position)
List<Position<Value>>
findPositionsBySilverOjectId(int nSilverObjectId)
List<Integer>
findSilverOjectByCriterias(List<? extends Criteria> alGivenCriterias, List<String> instanceIds, JoinStatement joinStatementContent, String afterDate, String beforeDate, boolean recursiveSearch, boolean visibilitySensitive)
static int
getMaxAxis()
List<ObjectValuePair>
getObjectValuePairsByJoin(List<? extends Criteria> alGivenCriterias, int nLogicalAxisId, List<String> instanceIds)
List<Integer>
getPertinentAxisByInstanceIds(List<String> instanceIds)
Get axis on which some informations are classified according to given listList<PertinentAxis>
getPertinentAxisByJoin(List<? extends Criteria> alGivenCriterias, List<Integer> alAxisIds, List<String> instanceIds)
List<PertinentValue>
getPertinentValuesByJoin(List<? extends Criteria> alGivenCriterias, int nLogicalAxisId, List<String> instanceIds)
protected void
init()
<T extends Value>
intisPositionAlreadyExists(int nSilverObjectId, Position<T> position)
void
postSilverpeasContentUpdate(int silverContentId)
Performs post silverpeas content tasks.void
registerAxis(Connection connection, int nLogicalAxisId)
void
replaceValuesOnAxis(Connection connection, List<Value> oldValue, List<Value> newValue)
void
unclassifySilverObject(Connection connection, int nSilverObjectId)
void
unclassifySilverObjectByPositionId(Connection connection, int nPositionId)
List<Integer>
unregisterAxis(Connection connection, int nLogicalAxisId)
<T extends Value>
voidupdateSilverObjectPosition(Position<T> newPosition)
void
updateSilverObjectPositions(List<Value> classifyValues, int nSilverObjectId)
-
-
-
Method Detail
-
init
@PostConstruct protected void init()
-
getMaxAxis
public static int getMaxAxis()
-
postSilverpeasContentUpdate
public void postSilverpeasContentUpdate(int silverContentId)
Description copied from interface:SilverContentPostUpdate
Performs post silverpeas content tasks.- Specified by:
postSilverpeasContentUpdate
in interfaceSilverContentPostUpdate
- Parameters:
silverContentId
- the unique identifier of a silverpeas content.
-
registerAxis
public void registerAxis(Connection connection, int nLogicalAxisId) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
unregisterAxis
public List<Integer> unregisterAxis(Connection connection, int nLogicalAxisId) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
isPositionAlreadyExists
public <T extends Value> int isPositionAlreadyExists(int nSilverObjectId, Position<T> position) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
classifySilverObject
public <T extends Value> int classifySilverObject(Connection connection, int silverObjectId, Position<T> position) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
unclassifySilverObject
public void unclassifySilverObject(Connection connection, int nSilverObjectId) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
unclassifySilverObjectByPositionId
public void unclassifySilverObjectByPositionId(Connection connection, int nPositionId) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
updateSilverObjectPosition
public <T extends Value> void updateSilverObjectPosition(Position<T> newPosition) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
updateSilverObjectPositions
public void updateSilverObjectPositions(List<Value> classifyValues, int nSilverObjectId) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
findSilverOjectByCriterias
public List<Integer> findSilverOjectByCriterias(List<? extends Criteria> alGivenCriterias, List<String> instanceIds, JoinStatement joinStatementContent, String afterDate, String beforeDate, boolean recursiveSearch, boolean visibilitySensitive) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
findPositionsBySilverOjectId
public List<Position<Value>> findPositionsBySilverOjectId(int nSilverObjectId) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
replaceValuesOnAxis
public void replaceValuesOnAxis(Connection connection, List<Value> oldValue, List<Value> newValue) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
getPertinentAxisByJoin
public List<PertinentAxis> getPertinentAxisByJoin(List<? extends Criteria> alGivenCriterias, List<Integer> alAxisIds, List<String> instanceIds) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
getPertinentValuesByJoin
public List<PertinentValue> getPertinentValuesByJoin(List<? extends Criteria> alGivenCriterias, int nLogicalAxisId, List<String> instanceIds) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
getObjectValuePairsByJoin
public List<ObjectValuePair> getObjectValuePairsByJoin(List<? extends Criteria> alGivenCriterias, int nLogicalAxisId, List<String> instanceIds) throws ClassifyEngineException
- Throws:
ClassifyEngineException
-
getPertinentAxisByInstanceIds
public List<Integer> getPertinentAxisByInstanceIds(List<String> instanceIds) throws ClassifyEngineException
Get axis on which some informations are classified according to given list- Parameters:
instanceIds
- a List of component ids- Returns:
- a List of axis id on which at least one information is classified
- Throws:
ClassifyEngineException
-
-