Package org.silverpeas.web.pdc.control
Class PdcFieldPositionsManager
- java.lang.Object
-
- org.silverpeas.web.pdc.control.PdcFieldPositionsManager
-
public class PdcFieldPositionsManager extends Object
Manages the positions of a PDC field.- Author:
- ahedin
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PdcFieldPositionsManager()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPosition(ClassifyPosition position)
Add the position to the positions list.void
deletePosition(int positionId)
Deletes the position which id corresponds to the one given as parameter.String
getFieldName()
ArrayList<ClassifyPosition>
getPositions()
String
getPositionsToString()
ArrayList<UsedAxis>
getUsedAxisList()
void
init(String fieldName, String pattern, String axis)
Initializes and enables the manager.boolean
isEnabled()
void
reset()
Resets and disables the manager.int
updatePosition(ClassifyPosition position)
Update the position.
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
-
getFieldName
public String getFieldName()
-
getPositions
public ArrayList<ClassifyPosition> getPositions()
-
init
public void init(String fieldName, String pattern, String axis)
Initializes and enables the manager.- Parameters:
fieldName
- The field name.pattern
- The description of positions, following the pattern : axisId1_1,valueId1_1;axisId1_2,valueId1_2.axisId2_1,valueId2_1... where axisIdi_j and valueIdi_j correspond to the value #j of the position #i.axis
-
-
reset
public void reset()
Resets and disables the manager.
-
addPosition
public void addPosition(ClassifyPosition position)
Add the position to the positions list.- Parameters:
position
- The new position to add.
-
updatePosition
public int updatePosition(ClassifyPosition position)
Update the position.- Parameters:
position
- The position to update.- Returns:
- the status of the update.
-
deletePosition
public void deletePosition(int positionId)
Deletes the position which id corresponds to the one given as parameter.- Parameters:
positionId
- The id of the position to delete.
-
getPositionsToString
public String getPositionsToString()
- Returns:
- A pattern describing the positions : axisId1_1,valueId1_1;axisId1_2,valueId1_2.axisId2_1,valueId2_1... where axisIdi_j and valueIdi_j correspond to the value #j of the position #i.
-
-