Create() public static method

public static Create ( Node node ) : SavingAction
node Node
return SavingAction
コード例 #1
0
        public virtual void Reject()
        {
            var action = SavingAction.Create(this);

            action.Reject();
            action.Execute();
        }
コード例 #2
0
        public virtual void Publish()
        {
            var action = SavingAction.Create(this);

            action.Publish();
            action.Execute();
        }
コード例 #3
0
        public virtual void Approve()
        {
            var action = SavingAction.Create(this);

            action.Approve();
            action.Execute();
        }
コード例 #4
0
        public virtual void CheckIn()
        {
            var action = SavingAction.Create(this);

            action.CheckIn();
            action.Execute();
        }
コード例 #5
0
        public void UndoCheckOut(bool forceRefresh = true)
        {
            var action = SavingAction.Create(this);

            action.UndoCheckOut(forceRefresh);
            action.Execute();
        }
コード例 #6
0
        public virtual void SaveSameVersion()
        {
            var action = SavingAction.Create(this);

            action.SaveSameVersion();
            action.Execute();
        }
コード例 #7
0
        public static bool HasUndoCheckOut(GenericContent node)
        {
            if (HasForceUndoCheckOutRight(node))
            {
                return(false);
            }

            var s = SavingAction.Create(node);

            return(s.ValidateAction(StateAction.UndoCheckOut) == ActionValidationResult.Valid);
        }
コード例 #8
0
        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();
        }
コード例 #9
0
        public static bool HasReject(GenericContent node)
        {
            var s = SavingAction.Create(node);

            return(s.ValidateAction(StateAction.Reject) == ActionValidationResult.Valid);
        }
コード例 #10
0
        public static bool HasCheckIn(Node node)
        {
            var s = SavingAction.Create(node);

            return(s.ValidateAction(StateAction.CheckIn) == ActionValidationResult.Valid);
        }