Package de.xima.fc.order
Class AktionOrderHelper
- java.lang.Object
- 
- de.xima.fc.order.AktionOrderHelper
 
- 
 public class AktionOrderHelper extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description AktionOrderHelper()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetNewIndex(Status status, IEntityContext ec)static BasicRefResultisAktionDeletable(Aktion delAktion, IEntityContext ec)Prüft ob eine Aktion gelöscht werden kann.static BasicRefResultisAktionMoveable(Aktion currentAktion, int targetIndex, IEntityContext ec)Prüft ob eine Aktion verschoben werden darf.static BasicRefResultisAktionMoveableToState(Aktion action, Status state, Mandant client, int newIdx, IEntityContext ec)Action cannot be moved to the target state if that state contain an action with the same name already.static Aktionmove(Aktion aktion, int targetIdx, IEntityContext ec)Passt die Reihenfolge der Aktionen an, wo es notwendig ist.static AktionmoveToState(Aktion action, Status state, int newIdx, IEntityContext ec)
 
- 
- 
- 
Method Detail- 
getNewIndexpublic static int getNewIndex(Status status, IEntityContext ec) 
 - 
isAktionMoveablepublic static BasicRefResult isAktionMoveable(Aktion currentAktion, int targetIndex, IEntityContext ec) Prüft ob eine Aktion verschoben werden darf. Ist diese Aktion mit einer nachfolgenden Aktion verknüpft so kann diese nicht verschoben werden.- Parameters:
- currentAktion- aktuelle Aktion
- targetIndex- neuer Index der Aktion innerhalb der Liste von Aktionen
- Returns:
- true, falls die Aktion verschoben werden darf, ansonsten- false
 
 - 
isAktionMoveableToStatepublic static BasicRefResult isAktionMoveableToState(Aktion action, Status state, Mandant client, int newIdx, IEntityContext ec) Action cannot be moved to the target state if that state contain an action with the same name already.- Parameters:
- action- Action to be moved.
- state- Target state to which the action is to be moved.
- client- Current client.
- newIdx- New index to which the action is to be moved.
- ec- Current entity context.
- Returns:
- Whether the given action can be moved to the given state.
 
 - 
isAktionDeletablepublic static BasicRefResult isAktionDeletable(Aktion delAktion, IEntityContext ec) Prüft ob eine Aktion gelöscht werden kann.- Parameters:
- delAktion- Aktion, die gelöscht werden soll
 
 - 
movepublic static Aktion move(Aktion aktion, int targetIdx, IEntityContext ec) Passt die Reihenfolge der Aktionen an, wo es notwendig ist. Aktualisiert die entsprechenden Aktionen, ausßer die Aktion welche verändert wurde. Hierbei wird nur die IdxNummer verändert.- Parameters:
- aktion- Aktion, die verschoben wurde auf Client
- ec- EntityContext
 
 - 
moveToStatepublic static Aktion moveToState(Aktion action, Status state, int newIdx, IEntityContext ec) 
 
- 
 
-