Exemplo n.º 1
0
        public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer)
        {
            //this.persister = persister;
            //makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker));
            //showEdit = new RedirectToEditCommand(editUrlManager);
            //clone = new CloneCommand();
            //unpublishedDate = new EnsureNotPublishedCommand(); // moved to StateChanger
            //ensurePublishedDate = new EnsurePublishedCommand();  // moved to StateChanger

            this.security = security;

            save   = new SaveCommand(persister);
            delete = new DeleteCommand(persister.Repository);

            replaceMaster     = new ReplaceMasterCommand(versionMaker);
            makeVersion       = new MakeVersionCommand(versionMaker);
            useDraftCmd       = new UseDraftCommand(versionMaker);
            saveOnPageVersion = new SaveOnPageVersionCommand(versionMaker);

            draftState     = new UpdateContentStateCommand(changer, ContentState.Draft);
            publishedState = new UpdateContentStateCommand(changer, ContentState.Published);

            updateObject      = new UpdateObjectCommand();
            useMaster         = new UseMasterCommand();
            validate          = new ValidateCommand();
            saveActiveContent = new ActiveContentSaveCommand();
            moveToPosition    = new MoveToPositionCommand();
            updateReferences  = new UpdateReferencesCommand();
        }
Exemplo n.º 2
0
 public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer)
 {
     this.persister      = persister;
     makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker));
     replaceMaster       = new ReplaceMasterCommand(versionMaker);
     makeVersion         = new MakeVersionCommand(versionMaker);
     useNewVersion       = new UseNewVersionCommand(versionMaker);
     updateObject        = new UpdateObjectCommand();
     delete                = new DeleteCommand(persister.Repository);
     showPreview           = new RedirectToPreviewCommand(adapters);
     showEdit              = new RedirectToEditCommand(editUrlManager);
     useMaster             = new UseMasterCommand();
     clone                 = new CloneCommand();
     validate              = new ValidateCommand();
     this.security         = security;
     save                  = new SaveCommand(persister);
     incrementVersionIndex = new IncrementVersionIndexCommand(versionMaker);
     draftState            = new UpdateContentStateCommand(changer, ContentState.Draft);
     publishedState        = new UpdateContentStateCommand(changer, ContentState.Published);
     saveActiveContent     = new ActiveContentSaveCommand();
     moveToPosition        = new MoveToPositionCommand();
     unpublishedDate       = new EnsureNotPublishedCommand();
     publishedDate         = new EnsurePublishedCommand();
     updateReferences      = new UpdateReferencesCommand();
 }
Exemplo n.º 3
0
        public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer)
        {
            this.persister = persister;
            makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker));
            replaceMaster = new ReplaceMasterCommand(versionMaker);
            makeVersion = new MakeVersionCommand(versionMaker);
            useNewVersion = new UseNewVersionCommand(versionMaker);
            updateObject = new UpdateObjectCommand();
            delete = new DeleteCommand(persister.Repository);
            showPreview = new RedirectToPreviewCommand(adapters);
            showEdit = new RedirectToEditCommand(editUrlManager);
            useMaster = new UseMasterCommand();
            clone = new CloneCommand();
            validate = new ValidateCommand();
            this.security = security;
            save = new SaveCommand(persister);
            incrementVersionIndex = new IncrementVersionIndexCommand(versionMaker);
            draftState = new UpdateContentStateCommand(changer, ContentState.Draft);
            publishedState = new UpdateContentStateCommand(changer, ContentState.Published);
            saveActiveContent = new ActiveContentSaveCommand();
			moveToPosition = new MoveToPositionCommand();
			unpublishedDate = new EnsureNotPublishedCommand();
			publishedDate = new EnsurePublishedCommand();
			updateReferences = new UpdateReferencesCommand();
        }
Exemplo n.º 4
0
        public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer)
        {
            //this.persister = persister;
            //makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker));
            //showEdit = new RedirectToEditCommand(editUrlManager);
            //clone = new CloneCommand();
            //unpublishedDate = new EnsureNotPublishedCommand(); // moved to StateChanger
            //ensurePublishedDate = new EnsurePublishedCommand();  // moved to StateChanger

            this.security = security;
            
            save = new SaveCommand(persister);
            delete = new DeleteCommand(persister.Repository);

            replaceMaster = new ReplaceMasterCommand(versionMaker);
            makeVersion = new MakeVersionCommand(versionMaker);
            useDraftCmd = new UseDraftCommand(versionMaker);
            saveOnPageVersion = new SaveOnPageVersionCommand(versionMaker);

            draftState = new UpdateContentStateCommand(changer, ContentState.Draft);
            publishedState = new UpdateContentStateCommand(changer, ContentState.Published);

            updateObject = new UpdateObjectCommand();
            useMaster = new UseMasterCommand();
            validate = new ValidateCommand();
            saveActiveContent = new ActiveContentSaveCommand();
			moveToPosition = new MoveToPositionCommand();
			updateReferences = new UpdateReferencesCommand();
        }