Interface PdcManager
-
- All Known Implementing Classes:
GlobalPdcManager
public interface PdcManager
Manager of the PdC (Plan de Classement in French or Classification Plan in English). The PdC is a multi-dimensional tree of coordinates. The tree defines an ontology in which each axis and sub-axis are about a semantic topic (for example "Geography") that is refined down to the the sub-axis and in which each coordinate along each axis is a semantic label (made of one or more words, for example "Sri Lanka" in the sub-axis "Asia" of the axis "Geography") with or without a mapped thesaurus. The PdC gives a way to the users to explicitly or automatically color their contributions with some meanings and from those meanings to find the contributions related by them. The PdC manager is the low-level object that is responsible to construct such a PdC in Silverpeas, to filter the PdC's axis per application instance, and to position semantically the contributions into the PdC.
-
-
Field Summary
Fields Modifier and Type Field Description static String
PRIMARY_AXIS
The primary axis that made a PdC.static String
SECONDARY_AXIS
The secondary axis, often hidden or not used, that made a PdC and that provide more accurate classification information.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addPosition(int silverObjectId, ClassifyPosition position, String sComponentId)
int
addPosition(int silverObjectId, ClassifyPosition position, String sComponentId, boolean alertSubscribers)
void
addPositions(List<ClassifyPosition> positions, int objectId, String instanceId)
int
addUsedAxis(UsedAxis usedAxis)
Method declarationvoid
copyPositions(int fromObjectId, String fromInstanceId, int toObjectId, String toInstanceId)
int
createAxis(AxisHeader axisHeader)
Method declarationint
createDaughterValue(Value valueToInsert, String refValue, String treeId)
Method declarationString
createDaughterValueWithId(Value valueToInsert, String refValue, String treeId)
Method declarationvoid
deleteAxis(Connection con, String axisId)
Method declarationvoid
deleteGroupManager(String groupId)
void
deleteManager(String userId)
void
deletePosition(int positionId, String sComponentId)
void
deleteUsedAxis(String usedAxisId)
Method declarationvoid
deleteUsedAxis(Collection<String> usedAxisIds)
Method declarationString
deleteValue(Connection con, String valueId, String axisId, String treeId)
Method declarationvoid
deleteValueAndSubtree(Connection con, String valueId, String axisId, String treeId)
Method declarationList<GlobalSilverContent>
findGlobalSilverContents(SearchContext containerPosition, List<String> componentIds, boolean recursiveSearch, boolean visibilitySensitive)
List<Integer>
findSilverContentIdByPosition(SearchContext containerPosition, List<String> alComponentId)
Find all the SilverContentId with the given positionList<Integer>
findSilverContentIdByPosition(SearchContext containerPosition, List<String> alComponentId, String authorId, LocalDate afterDate, LocalDate beforeDate)
static PdcManager
get()
List<AxisHeader>
getAxis()
Method declarationList<AxisHeader>
getAxisByType(String type)
Axis
getAxisDetail(String axisId)
Method declarationAxisHeader
getAxisHeader(String axisId)
Method declarationValue
getAxisValue(String valueId, String treeId)
Method declarationList<Value>
getAxisValues(int treeId)
List<Value>
getAxisValuesByName(String valueName)
Return a list of axis values having the value name in parameterList<Value>
getDaughters(String refValue, String treeId)
List<String>
getDaughterValues(String axisId, String valueId)
Return a list of String corresponding to the valueId of the value in parameterList<Value>
getFirstLevelAxisValuesByInstanceId(SearchContext searchContext, String axisId, String instanceId)
List<Value>
getFirstLevelAxisValuesByInstanceIds(SearchContext searchContext, String axisId, List<String> instanceIds)
List<Value>
getFullPath(String valueId, String treeId)
Method declarationList<List<String>>
getInheritedManagers(Value value)
retourne les droits hérités sur la valeurList<List<String>>
getManagers(String axisId, String valueId)
retourne les droits sur la valeurint
getNbAxis()
Method declarationint
getNbMaxAxis()
List<SearchAxis>
getPertinentAxisByInstanceId(SearchContext searchContext, String axisType, String instanceId)
List<SearchAxis>
getPertinentAxisByInstanceIds(SearchContext searchContext, String axisType, List<String> instanceIds)
List<Value>
getPertinentDaughterValuesByInstanceId(SearchContext searchContext, String axisId, String valueId, String instanceId)
List<Value>
getPertinentDaughterValuesByInstanceIds(SearchContext searchContext, String axisId, String valueId, List<String> instanceIds)
List<ClassifyPosition>
getPositions(int silverObjectId, String sComponentId)
Value
getRoot(String axisId)
Return the Value corresponding to the axis doneSearchContext
getSilverContentIdSearchContext(int nSilverContentId, String sComponentId)
List<GlobalSilverContent>
getSilverContentsByIds(List<Integer> silverContentIds, String userId)
String
getTreeId(String axisId)
UsedAxis
getUsedAxis(String usedAxisId)
****************************************************************List<UsedAxis>
getUsedAxisByInstanceId(String instanceId)
Method declarationList<UsedAxis>
getUsedAxisToClassify(String instanceId, int silverObjectId)
Gets the axis used by the specified component instance to classify the specified Silverpeas object.Value
getValue(String axisId, String valueId)
void
indexAllAxis()
int
insertMotherValue(Value valueToInsert, String refValue, String axisId)
Method declarationboolean
isClassifyingMandatory(String componentId)
boolean
isUserManager(String userId)
int
moveValueToNewFatherId(Axis axis, Value valueToMove, String newFatherId, int orderNumber)
Déplace une valeur et ses sous-valeurs sous un nouveau pèrevoid
razManagers(String axisId, String valueId)
supprime tous les droits sur la valeurvoid
setManagers(List<String> userIds, List<String> groupIds, String axisId, String valueId)
met à jour les droits sur la valeurint
updateAxis(AxisHeader axisHeader)
Method declarationint
updatePosition(ClassifyPosition position, String instanceId, int silverObjectId)
int
updatePosition(ClassifyPosition position, String instanceId, int silverObjectId, boolean alertSubscribers)
int
updateUsedAxis(UsedAxis usedAxis)
Method declarationint
updateValue(Value value, String treeId)
Method declaration
-
-
-
Field Detail
-
PRIMARY_AXIS
static final String PRIMARY_AXIS
The primary axis that made a PdC.- See Also:
- Constant Field Values
-
SECONDARY_AXIS
static final String SECONDARY_AXIS
The secondary axis, often hidden or not used, that made a PdC and that provide more accurate classification information.- See Also:
- Constant Field Values
-
-
Method Detail
-
get
static PdcManager get()
-
findGlobalSilverContents
List<GlobalSilverContent> findGlobalSilverContents(SearchContext containerPosition, List<String> componentIds, boolean recursiveSearch, boolean visibilitySensitive)
-
getAxisByType
List<AxisHeader> getAxisByType(String type) throws PdcException
- Throws:
PdcException
-
getAxis
List<AxisHeader> getAxis() throws PdcException
Method declaration- Returns:
- Throws:
PdcException
-
getNbAxis
int getNbAxis() throws PdcException
Method declaration- Returns:
- Throws:
PdcException
-
getNbMaxAxis
int getNbMaxAxis() throws PdcException
- Throws:
PdcException
-
createAxis
int createAxis(AxisHeader axisHeader) throws PdcException
Method declaration- Parameters:
axisHeader
-- Returns:
- Throws:
PdcException
-
updateAxis
int updateAxis(AxisHeader axisHeader) throws PdcException
Method declaration- Parameters:
axisHeader
-- Returns:
- Throws:
PdcException
-
deleteAxis
void deleteAxis(Connection con, String axisId) throws PdcException
Method declaration- Parameters:
axisId
-- Throws:
PdcException
-
getAxisDetail
Axis getAxisDetail(String axisId) throws PdcException
Method declaration- Parameters:
axisId
-- Returns:
- Throws:
PdcException
-
getAxisHeader
AxisHeader getAxisHeader(String axisId) throws PdcException
Method declaration- Parameters:
axisId
-- Returns:
- Throws:
PdcException
-
getValue
Value getValue(String axisId, String valueId) throws PdcException
- Throws:
PdcException
-
getAxisValue
Value getAxisValue(String valueId, String treeId) throws PdcException
Method declaration- Parameters:
valueId
-- Returns:
- Throws:
PdcException
-
getAxisValuesByName
List<Value> getAxisValuesByName(String valueName) throws PdcException
Return a list of axis values having the value name in parameter- Parameters:
valueName
-- Returns:
- List
- Throws:
PdcException
-
getDaughterValues
List<String> getDaughterValues(String axisId, String valueId) throws PdcException
Return a list of String corresponding to the valueId of the value in parameter- Parameters:
axisId
-valueId
-- Returns:
- List
- Throws:
PdcException
-
getRoot
Value getRoot(String axisId) throws PdcException
Return the Value corresponding to the axis done- Parameters:
axisId
-- Returns:
- Value
- Throws:
PdcException
-
getAxisValues
List<Value> getAxisValues(int treeId) throws PdcException
- Parameters:
treeId
- The id of the selected axis.- Returns:
- The list of values of the axis.
- Throws:
PdcException
-
insertMotherValue
int insertMotherValue(Value valueToInsert, String refValue, String axisId) throws PdcException
Method declaration- Parameters:
valueToInsert
-refValue
-axisId
-- Returns:
- Throws:
PdcException
-
moveValueToNewFatherId
int moveValueToNewFatherId(Axis axis, Value valueToMove, String newFatherId, int orderNumber) throws PdcException
Déplace une valeur et ses sous-valeurs sous un nouveau père- Parameters:
axis
-valueToMove
-newFatherId
-- Returns:
- 1 si valeur soeur de même nom
- Throws:
PdcException
-
getManagers
List<List<String>> getManagers(String axisId, String valueId) throws PdcException
retourne les droits sur la valeur- Returns:
- ArrayList( ArrayList UsersId, ArrayList GroupsId)
- Throws:
PdcException
-
isUserManager
boolean isUserManager(String userId) throws PdcException
- Throws:
PdcException
-
getInheritedManagers
List<List<String>> getInheritedManagers(Value value) throws PdcException
retourne les droits hérités sur la valeur- Returns:
- ArrayList( ArrayList UsersId, ArrayList GroupsId)
- Throws:
PdcException
-
setManagers
void setManagers(List<String> userIds, List<String> groupIds, String axisId, String valueId) throws PdcException
met à jour les droits sur la valeur- Throws:
PdcException
-
razManagers
void razManagers(String axisId, String valueId) throws PdcException
supprime tous les droits sur la valeur- Throws:
PdcException
-
deleteManager
void deleteManager(String userId) throws PdcException
- Throws:
PdcException
-
deleteGroupManager
void deleteGroupManager(String groupId) throws PdcException
- Throws:
PdcException
-
createDaughterValue
int createDaughterValue(Value valueToInsert, String refValue, String treeId) throws PdcException
Method declaration- Parameters:
valueToInsert
-refValue
-- Returns:
- status
- Throws:
PdcException
-
createDaughterValueWithId
String createDaughterValueWithId(Value valueToInsert, String refValue, String treeId) throws PdcException
Method declaration- Parameters:
valueToInsert
-refValue
-- Returns:
- daughterid
- Throws:
PdcException
-
updateValue
int updateValue(Value value, String treeId) throws PdcException
Method declaration- Parameters:
value
-- Returns:
- Throws:
PdcException
-
deleteValueAndSubtree
void deleteValueAndSubtree(Connection con, String valueId, String axisId, String treeId) throws PdcException
Method declaration- Parameters:
valueId
-- Throws:
PdcException
-
deleteValue
String deleteValue(Connection con, String valueId, String axisId, String treeId) throws PdcException
Method declaration- Parameters:
valueId
-- Throws:
PdcException
-
getFullPath
List<Value> getFullPath(String valueId, String treeId) throws PdcException
Method declaration- Parameters:
valueId
-- Returns:
- Throws:
PdcException
-
getTreeId
String getTreeId(String axisId) throws PdcException
- Throws:
PdcException
-
getUsedAxis
UsedAxis getUsedAxis(String usedAxisId) throws PdcException
****************************************************************- Throws:
PdcException
-
getUsedAxisByInstanceId
List<UsedAxis> getUsedAxisByInstanceId(String instanceId) throws PdcException
Method declaration- Parameters:
instanceId
-- Returns:
- Throws:
PdcException
-
addUsedAxis
int addUsedAxis(UsedAxis usedAxis) throws PdcException
Method declaration- Parameters:
usedAxis
-- Returns:
- Throws:
PdcException
-
updateUsedAxis
int updateUsedAxis(UsedAxis usedAxis) throws PdcException
Method declaration- Parameters:
usedAxis
-- Returns:
- Throws:
PdcException
-
deleteUsedAxis
void deleteUsedAxis(String usedAxisId) throws PdcException
Method declaration- Parameters:
usedAxisId
-- Throws:
PdcException
-
deleteUsedAxis
void deleteUsedAxis(Collection<String> usedAxisIds) throws PdcException
Method declaration- Parameters:
usedAxisIds
-- Throws:
PdcException
-
getUsedAxisToClassify
List<UsedAxis> getUsedAxisToClassify(String instanceId, int silverObjectId) throws PdcException
Gets the axis used by the specified component instance to classify the specified Silverpeas object. If there is no axis configured to be used in the component instance, then all PdC axis are returned as axis that can be used for classifying a content. If the content is already classified, then the values on invariant axis are used as invariant values.- Parameters:
instanceId
- the unique identifier of the component instance.silverObjectId
- the Silverpeas object identifier representing the content to classify.- Returns:
- a list of axis to use in the classification of a content.
- Throws:
PdcException
- if an error occurs while getting the PdC axis for the specified component instance.
-
addPosition
int addPosition(int silverObjectId, ClassifyPosition position, String sComponentId) throws PdcException
- Throws:
PdcException
-
addPosition
int addPosition(int silverObjectId, ClassifyPosition position, String sComponentId, boolean alertSubscribers) throws PdcException
- Throws:
PdcException
-
updatePosition
int updatePosition(ClassifyPosition position, String instanceId, int silverObjectId) throws PdcException
- Throws:
PdcException
-
updatePosition
int updatePosition(ClassifyPosition position, String instanceId, int silverObjectId, boolean alertSubscribers) throws PdcException
- Throws:
PdcException
-
deletePosition
void deletePosition(int positionId, String sComponentId) throws PdcException
- Throws:
PdcException
-
addPositions
void addPositions(List<ClassifyPosition> positions, int objectId, String instanceId) throws PdcException
- Throws:
PdcException
-
copyPositions
void copyPositions(int fromObjectId, String fromInstanceId, int toObjectId, String toInstanceId) throws PdcException
- Throws:
PdcException
-
getPositions
List<ClassifyPosition> getPositions(int silverObjectId, String sComponentId) throws PdcException
- Throws:
PdcException
-
isClassifyingMandatory
boolean isClassifyingMandatory(String componentId) throws PdcException
- Throws:
PdcException
-
getPertinentAxisByInstanceId
List<SearchAxis> getPertinentAxisByInstanceId(SearchContext searchContext, String axisType, String instanceId) throws PdcException
- Throws:
PdcException
-
getPertinentAxisByInstanceIds
List<SearchAxis> getPertinentAxisByInstanceIds(SearchContext searchContext, String axisType, List<String> instanceIds) throws PdcException
- Throws:
PdcException
-
getFirstLevelAxisValuesByInstanceId
List<Value> getFirstLevelAxisValuesByInstanceId(SearchContext searchContext, String axisId, String instanceId) throws PdcException
- Throws:
PdcException
-
getFirstLevelAxisValuesByInstanceIds
List<Value> getFirstLevelAxisValuesByInstanceIds(SearchContext searchContext, String axisId, List<String> instanceIds) throws PdcException
- Throws:
PdcException
-
getPertinentDaughterValuesByInstanceId
List<Value> getPertinentDaughterValuesByInstanceId(SearchContext searchContext, String axisId, String valueId, String instanceId) throws PdcException
- Throws:
PdcException
-
getPertinentDaughterValuesByInstanceIds
List<Value> getPertinentDaughterValuesByInstanceIds(SearchContext searchContext, String axisId, String valueId, List<String> instanceIds) throws PdcException
- Throws:
PdcException
-
findSilverContentIdByPosition
List<Integer> findSilverContentIdByPosition(SearchContext containerPosition, List<String> alComponentId, String authorId, LocalDate afterDate, LocalDate beforeDate) throws PdcException
- Throws:
PdcException
-
findSilverContentIdByPosition
List<Integer> findSilverContentIdByPosition(SearchContext containerPosition, List<String> alComponentId) throws PdcException
Find all the SilverContentId with the given position- Throws:
PdcException
-
indexAllAxis
void indexAllAxis() throws PdcException
- Throws:
PdcException
-
getSilverContentIdSearchContext
SearchContext getSilverContentIdSearchContext(int nSilverContentId, String sComponentId) throws PdcException
- Throws:
PdcException
-
getSilverContentsByIds
List<GlobalSilverContent> getSilverContentsByIds(List<Integer> silverContentIds, String userId)
-
-