public static Create ( Node node ) : |
||
node | Node | |
Résultat |
public virtual void Reject() { var action = SavingAction.Create(this); action.Reject(); action.Execute(); }
public virtual void Publish() { var action = SavingAction.Create(this); action.Publish(); action.Execute(); }
public virtual void Approve() { var action = SavingAction.Create(this); action.Approve(); action.Execute(); }
public virtual void CheckIn() { var action = SavingAction.Create(this); action.CheckIn(); action.Execute(); }
public void UndoCheckOut(bool forceRefresh = true) { var action = SavingAction.Create(this); action.UndoCheckOut(forceRefresh); action.Execute(); }
public virtual void SaveSameVersion() { var action = SavingAction.Create(this); action.SaveSameVersion(); action.Execute(); }
public static bool HasUndoCheckOut(GenericContent node) { if (HasForceUndoCheckOutRight(node)) { return(false); } var s = SavingAction.Create(node); return(s.ValidateAction(StateAction.UndoCheckOut) == ActionValidationResult.Valid); }
public virtual void Save(SavingMode mode) { var action = SavingAction.Create(this); switch (mode) { case SavingMode.RaiseVersion: action.CheckOutAndSaveAndCheckIn(); break; case SavingMode.RaiseVersionAndLock: action.CheckOutAndSave(); break; case SavingMode.KeepVersion: action.SaveSameVersion(); break; default: throw new NotImplementedException("Unknown SavingMode: " + mode); } action.Execute(); }
public static bool HasReject(GenericContent node) { var s = SavingAction.Create(node); return(s.ValidateAction(StateAction.Reject) == ActionValidationResult.Valid); }
public static bool HasCheckIn(Node node) { var s = SavingAction.Create(node); return(s.ValidateAction(StateAction.CheckIn) == ActionValidationResult.Valid); }