com.stratelia.silverpeas.pdcPeas.control
Class PdcFieldPositionsManager

java.lang.Object
  extended by com.stratelia.silverpeas.pdcPeas.control.PdcFieldPositionsManager

public class PdcFieldPositionsManager
extends Object

Manages the positions of a PDC field.

Author:
ahedin

Constructor Summary
PdcFieldPositionsManager()
          Constructor
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdcFieldPositionsManager

public PdcFieldPositionsManager()
Constructor

Method Detail

isEnabled

public boolean isEnabled()

getFieldName

public String getFieldName()

getPositions

public ArrayList<ClassifyPosition> getPositions()

getUsedAxisList

public ArrayList<UsedAxis> getUsedAxisList()

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.


Copyright © 2016 Silverpeas. All Rights Reserved.