public ContentOwnershipController(
     IMasterDetailPermissionManager masterDetailPermissionManager,
     IBasicDataService basicDataService,
     IActivityStreamService activityStreamService,
     IWorkContextAccessor workContextAccessor,
     IIndexProvider indexProvider,
     IOrchardServices orchardServices,
     IWidgetService widgetService,
     ICRMContentOwnershipService contentOwnershipService,
     IContentOwnershipHelper contentOwnershipHelper,
     IRepository <UserRolesPartRecord> userRolesRepository,
     IRepository <ContentItemPermissionDetailRecord> permissionDetailRecordRepository)
 {
     this.masterDetailPermissionManager = masterDetailPermissionManager;
     this.basicDataService      = basicDataService;
     this.activityStreamService = activityStreamService;
     this.workContextAccessor   = workContextAccessor;
     this.indexProvider         = indexProvider;
     this.T = NullLocalizer.Instance;
     this.contentOwnershipHelper           = contentOwnershipHelper;
     this.userRolesRepository              = userRolesRepository;
     this.contentOwnershipService          = contentOwnershipService;
     this.orchardServices                  = orchardServices;
     this.widgetService                    = widgetService;
     this.permissionDetailRecordRepository = permissionDetailRecordRepository;
 }
 public WikiItemController(
     IIndexProvider indexProvider,
     IContentOwnershipHelper contentOwnershipHelper,
     ICRMContentOwnershipService crmContentOwnershipService,
     IExtendedContentManager extendedContentManager,
     ITransactionManager transactionManager,
     IWidgetService widgetService,
     IThemeAwareViewEngine themeAwareViewEngine,
     IShapeFactory shapeFactory,
     IContentManager contentManager,
     IOrchardServices services,
     IDisplayHelperFactory displayHelperFactory,
     IBusinessUnitService businessUnitService,
     ISiteService siteService,
     IBasicDataService basicDataService,
     IContentDefinitionManager contentDefinitionManager,
     IIndexManager indexManager,
     IWorkContextAccessor workContextAccessor,
     IActivityStreamService activityStreamService,
     IContentItemDescriptorManager contentItemDescriptorManager)
     : base(ContentTypes.WikiItemType, "WikiItem_Edit", indexProvider, services, crmContentOwnershipService, transactionManager, extendedContentManager, contentManager, widgetService, themeAwareViewEngine, shapeFactory, displayHelperFactory, basicDataService, contentOwnershipHelper, activityStreamService, contentItemDescriptorManager)
 {
     this.T      = NullLocalizer.Instance;
     this.Logger = NullLogger.Instance;
 }
Пример #3
0
 public CreateTicketActivity(
     IRepository <UserPartRecord> userRepository,
     IActivityStreamService activityStreamService,
     IFileService fileService,
     ITokenizer tokenizer,
     IContentOwnershipHelper contentOwnershipHelper,
     ICRMContentOwnershipService contentOwnershipService,
     IContentDefinitionManager contentDefinitionManager,
     IContentManager contentManager,
     IBasicDataService basicDataService,
     IRepository <TicketIdentityRecord> ticketIdentityRecordRepository,
     IRepository <ContentItemPermissionDetailRecord> contentItemPermissionDetailRepository)
 {
     this.userRepository           = userRepository;
     this.fileService              = fileService;
     this.contentDefinitionManager = contentDefinitionManager;
     this.contentOwnershipHelper   = contentOwnershipHelper;
     this.tokenizer = tokenizer;
     this.ticketIdentityRecordRepository = ticketIdentityRecordRepository;
     this.contentOwnershipService        = contentOwnershipService;
     this.basicDataService = basicDataService;
     this.contentItemPermissionDetailRepository = contentItemPermissionDetailRepository;
     this.contentManager        = contentManager;
     this.activityStreamService = activityStreamService;
     T      = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
 }
Пример #4
0
        public UserController(
            IMasterDetailPermissionManager masterDetailPermissionManager,
            IIndexProvider indexProvider,
            IContentOwnershipHelper contentOwnershipHelper,
            IExtendedProjectService projectService,
            IHelperService helperService,
            IOrchardServices services,
            IActivityStreamService activityStreamService,
            ICRMContentOwnershipService contentOwnershipService,
            IBasicDataService basicDataService,
            IMembershipService membershipService,
            IUserService userService,
            IShapeFactory shapeFactory,
            IEnumerable <IUserEventHandler> userEventHandlers,
            ISiteService siteService)
        {
            this.masterDetailPermissionManager = masterDetailPermissionManager;
            this.indexProvider           = indexProvider;
            this.contentOwnershipHelper  = contentOwnershipHelper;
            this.projectService          = projectService;
            this.activityStreamService   = activityStreamService;
            this.contentOwnershipService = contentOwnershipService;
            this.basicDataService        = basicDataService;
            this.services      = services;
            this.helperService = helperService;
            _membershipService = membershipService;
            _userService       = userService;
            _userEventHandlers = userEventHandlers;
            _siteService       = siteService;

            T     = NullLocalizer.Instance;
            Shape = shapeFactory;
        }
 public DashboardActivityStreamDriver(
     IOrchardServices services,
     IActivityStreamService activityStreamService)
     : base(services)
 {
     this.activityStreamService = activityStreamService;
 }
Пример #6
0
 public ActivityStreamTokenProvider(IContentManager contentManager, IActivityStreamService activityStreamService, UrlHelper urlHelper, IContentItemDescriptorManager contentItemDescriptorManager)
 {
     this.contentItemDescriptorManager = contentItemDescriptorManager;
     this.urlHelper             = urlHelper;
     this.activityStreamService = activityStreamService;
     this.contentManager        = contentManager;
     this.T = NullLocalizer.Instance;
 }
 public ActivityNotificationService(
     ITransactionManager transactionManager,
     IOrchardServices services,
     IActivityStreamService activityStreamService,
     IRepository <UserContentVisitRecord> userContentVisitRepository,
     IProjectionManagerWithDynamicSort projectionManagerWithDynamicSort)
 {
     this.transactionManager = transactionManager;
     this.projectionManagerWithDynamicSort = projectionManagerWithDynamicSort;
     this.activityStreamService            = activityStreamService;
     this.services = services;
     this.userContentVisitRepository = userContentVisitRepository;
     T = NullLocalizer.Instance;
 }
Пример #8
0
 public ActivityStreamPartDriver(
     IProjectionManagerWithDynamicSort projectionManagerWithDynamicSort,
     IOrchardServices services,
     Lazy <ISessionLocator> sessionLocator,
     IBasicDataService basicDataService,
     IActivityStreamService activityStreamService)
     : base(services)
 {
     this.projectionManagerWithDynamicSort = projectionManagerWithDynamicSort;
     this.basicDataService      = basicDataService;
     this.activityStreamService = activityStreamService;
     this.sessionLocator        = sessionLocator;
     this.T = NullLocalizer.Instance;
 }
Пример #9
0
 public ProjectDriver(
     IMenuService menuService,
     IExtendedProjectService projectService,
     IProjectionManagerWithDynamicSort projectionWithDynamicSort,
     IActivityStreamService activityStreamService,
     ICRMContentOwnershipService contentOwnershipService,
     IOrchardServices services)
 {
     this.menuService               = menuService;
     this.contentOwnershipService   = contentOwnershipService;
     this.projectionWithDynamicSort = projectionWithDynamicSort;
     this.services = services;
     this.activityStreamService = activityStreamService;
     this.projectService        = projectService;
 }
 public ProjectItemsOwnershipController(
     IMasterDetailPermissionManager masterDetailPermissionManager,
     IBasicDataService basicDataService,
     IActivityStreamService activityStreamService,
     IWorkContextAccessor workContextAccessor,
     IIndexProvider indexProvider,
     IOrchardServices orchardServices,
     IWidgetService widgetService,
     ICRMContentOwnershipService contentOwnershipService,
     IContentOwnershipHelper contentOwnershipHelper,
     IRepository <UserRolesPartRecord> userRolesRepository,
     IRepository <ContentItemPermissionDetailRecord> permissionDetailRecordRepository) :
     base(masterDetailPermissionManager, basicDataService, activityStreamService, workContextAccessor, indexProvider, orchardServices, widgetService, contentOwnershipService, contentOwnershipHelper, userRolesRepository, permissionDetailRecordRepository)
 {
     this.DefaultDisplayType = "TitleAndMenu";
     this.ShowCustomers      = true;
 }
 public SuiteCRMSyncService(
     IActivityStreamService streamService,
     IRepository <PriorityRecord> priorityRepository,
     IRepository <StatusRecord> statusRepository,
     ISuiteCRMDataService suiteCRMProjectService,
     IOrchardServices services,
     ISearchTicketService searchTicketService,
     IExtendedProjectService projectService)
 {
     this.streamService          = streamService;
     this.priorityRepository     = priorityRepository;
     this.statusRepository       = statusRepository;
     this.projectService         = projectService;
     this.searchTicketService    = searchTicketService;
     this.suiteCRMProjectService = suiteCRMProjectService;
     this.services = services;
     Logger        = NullLogger.Instance;
 }
 public FileUploadController(IMediaLibraryService mediaService,
                             IActivityStreamService activityStreamService,
                             ICRMContentOwnershipService contentOwnershipService,
                             IOrchardServices services,
                             IFileService fileService,
                             IRepository <FileUploadPartRecord> fileRepository,
                             IStorageProvider storageProvider,
                             IContentDefinitionManager contentDefinitionManager)
 {
     this.fileService             = fileService;
     this.fileRepository          = fileRepository;
     this.contentOwnershipService = contentOwnershipService;
     this.storageProvider         = storageProvider;
     _mediaService = mediaService;
     this.activityStreamService = activityStreamService;
     _services = services;
     _contentDefinitionManager = contentDefinitionManager;
     T = NullLocalizer.Instance;
 }
Пример #13
0
 public UpdateTicketActivity(
     ITokenizer tokenizer,
     ICRMContentOwnershipService contentOwnershipService,
     IContentManager contentManager,
     IBasicDataService basicDataService,
     IRepository <TicketIdentityRecord> ticketIdentityRecordRepository,
     IActivityStreamService activityStreamService,
     IRepository <ContentItemPermissionDetailRecord> contentItemPermissionDetailRepository)
 {
     this.activityStreamService                 = activityStreamService;
     this.tokenizer                             = tokenizer;
     this.ticketIdentityRecordRepository        = ticketIdentityRecordRepository;
     this.contentOwnershipService               = contentOwnershipService;
     this.basicDataService                      = basicDataService;
     this.contentItemPermissionDetailRepository = contentItemPermissionDetailRepository;
     this.contentManager                        = contentManager;
     T      = NullLocalizer.Instance;
     Logger = NullLogger.Instance;
 }
Пример #14
0
 public TicketController(
     Lazy <IEnumerable <IContentHandler> > handlers,
     IProjectService projectService,
     IIndexProvider indexProvider,
     ISearchTicketService searchTicketService,
     IContentOwnershipHelper contentOwnershipHelper,
     IRepository <UserRolesPartRecord> userRolesRepository,
     ICRMContentOwnershipService crmContentOwnershipService,
     IExtendedContentManager extendedContentManager,
     ITransactionManager transactionManager,
     IWidgetService widgetService,
     IThemeAwareViewEngine themeAwareViewEngine,
     IShapeFactory shapeFactory,
     IContentManager contentManager,
     IOrchardServices services,
     IDisplayHelperFactory displayHelperFactory,
     IBusinessUnitService businessUnitService,
     ISiteService siteService,
     IBasicDataService basicDataService,
     IContentDefinitionManager contentDefinitionManager,
     IRepository <BusinessUnitMemberPartRecord> businessUnitMembersRepository,
     IIndexManager indexManager,
     IWorkContextAccessor workContextAccessor,
     IActivityStreamService streamService,
     IContentItemDescriptorManager contentItemDescriptorManager)
     : base("Ticket", "Ticket_Edit", indexProvider, services, crmContentOwnershipService, transactionManager, extendedContentManager, contentManager, widgetService, themeAwareViewEngine, shapeFactory, displayHelperFactory, basicDataService, contentOwnershipHelper, streamService, contentItemDescriptorManager)
 {
     this.handlers                      = handlers;
     this.projectService                = projectService;
     this.workContextAccessor           = workContextAccessor;
     this.searchTicketService           = searchTicketService;
     this.userRolesRepository           = userRolesRepository;
     this.businessUnitService           = businessUnitService;
     this.siteService                   = siteService;
     this.contentDefinitionManager      = contentDefinitionManager;
     this.indexManager                  = indexManager;
     this.businessUnitMembersRepository = businessUnitMembersRepository;
     this.T                = NullLocalizer.Instance;
     this.Logger           = NullLogger.Instance;
     this.defaultQueryHint = this.defaultQueryHint.ExpandRecords <TicketPartRecord>();
     this.defaultQueryHint = this.defaultQueryHint.ExpandRecords <ContentItemPermissionPartRecord>();
     this.defaultQueryHint = this.defaultQueryHint.ExpandRecords <CRMCommentsPartRecord>();
 }
Пример #15
0
 public ItemController(
     IIndexProvider indexProvider,
     ICRMContentOwnershipService crmContentOwnershipService,
     IContentOwnershipHelper contentOwnershipHelper,
     IOrchardServices services,
     IExtendedContentManager extendedContentManager,
     ITransactionManager transactionManager,
     IWidgetService widgetService,
     IThemeAwareViewEngine themeAwareViewEngine,
     IShapeFactory shapeFactory,
     IContentManager contentManager,
     IBasicDataService basicDataService,
     IDisplayHelperFactory displayHelperFactory,
     IActivityStreamService streamService,
     IContentItemDescriptorManager contentItemDescriptorManager)
     : base(string.Empty, string.Empty, indexProvider, services, crmContentOwnershipService, transactionManager, extendedContentManager, contentManager, widgetService, themeAwareViewEngine, shapeFactory, displayHelperFactory, basicDataService, contentOwnershipHelper, streamService, contentItemDescriptorManager)
 {
     this.T = NullLocalizer.Instance;
 }
Пример #16
0
        public AdminUserController(
            IActivityStreamService activityStreamService,
            ICRMContentOwnershipService crmContentOwnershipService,
            IOrchardServices services,
            IMembershipService membershipService,
            IUserService userService,
            IShapeFactory shapeFactory,
            IUserEventHandler userEventHandlers,
            ISiteService siteService)
        {
            this.activityStreamService      = activityStreamService;
            this.crmContentOwnershipService = crmContentOwnershipService;
            Services           = services;
            _membershipService = membershipService;
            _userService       = userService;
            _userEventHandlers = userEventHandlers;
            _siteService       = siteService;

            T     = NullLocalizer.Instance;
            Shape = shapeFactory;
        }
 public CRMCommentController(
     IContentItemDescriptorManager contentItemDescriptorManager,
     IActivityStreamService activityStreamService,
     ICRMContentOwnershipService contentOwnershipService,
     IContentManager contentManager,
     IOrchardServices services,
     IThemeAwareViewEngine themeAwareViewEngine,
     IShapeFactory shapeFactory,
     IDisplayHelperFactory displayHelperFactory,
     IIndexProvider indexProvider)
 {
     this.contentItemDescriptorManager = contentItemDescriptorManager;
     this.activityStreamService        = activityStreamService;
     this.indexProvider           = indexProvider;
     this.contentOwnershipService = contentOwnershipService;
     this.themeAwareViewEngine    = themeAwareViewEngine;
     this.contentManager          = contentManager;
     this.services             = services;
     this.displayHelperFactory = displayHelperFactory;
     this.Shape = shapeFactory;
     this.T     = NullLocalizer.Instance;
 }
Пример #18
0
 public ContentOwnershipHelper(
     IRepository <RolesPermissionsRecord> rolesPermissionsRepository,
     IWorkflowManager workflowManager,
     IOrchardServices orchardServices,
     IBasicDataService basicDataService,
     IRepository <UserPartRecord> userRepository,
     ICRMContentOwnershipService crmContentOwnershipService,
     IRepository <UserRolesPartRecord> userRolesRepository,
     IRepository <ContentItemPermissionDetailRecord> permissionDetailRecordRepository,
     IActivityStreamService activityStreamService
     )
 {
     this.T = NullLocalizer.Instance;
     this.rolesPermissionsRepository       = rolesPermissionsRepository;
     this.workflowManager                  = workflowManager;
     this.permissionDetailRecordRepository = permissionDetailRecordRepository;
     this.userRolesRepository              = userRolesRepository;
     this.basicDataService                 = basicDataService;
     this.orchardServices                  = orchardServices;
     this.crmContentOwnershipService       = crmContentOwnershipService;
     this.userRepository        = userRepository;
     this.activityStreamService = activityStreamService;
 }
Пример #19
0
 public BaseController(
     string controllerContentType,
     string editMetadataType,
     IIndexProvider indexProvider,
     IOrchardServices services,
     ICRMContentOwnershipService crmContentOwnershipService,
     ITransactionManager transactionManager,
     IExtendedContentManager extendedContentManager,
     IContentManager contentManager,
     IWidgetService widgetService,
     IThemeAwareViewEngine themeAwareViewEngine,
     IShapeFactory shapeFactory,
     IDisplayHelperFactory displayHelperFactory,
     IBasicDataService basicDataService,
     IContentOwnershipHelper contentOwnershipHelper,
     IActivityStreamService streamService,
     IContentItemDescriptorManager contentItemDescriptorManager)
 {
     this.contentItemDescriptorManager = contentItemDescriptorManager;
     this.streamService          = streamService;
     this.indexProvider          = indexProvider;
     this.services               = services;
     this.basicDataService       = basicDataService;
     this.transactionManager     = transactionManager;
     this.ControllerContentType  = controllerContentType;
     this.EditMetadataType       = editMetadataType;
     this.extendedContentManager = extendedContentManager;
     this.contentManager         = contentManager;
     this.widgetService          = widgetService;
     this.themeAwareViewEngine   = themeAwareViewEngine;
     this.displayHelperFactory   = displayHelperFactory;
     this.Shape = shapeFactory;
     this.crmContentOwnershipService = crmContentOwnershipService;
     this.T = NullLocalizer.Instance;
     this.contentOwnershipHelper = contentOwnershipHelper;
 }
Пример #20
0
        public TicketHandler(
            ITransactionManager transactionManager,
            ISessionLocator sessionLocator,
            IActivityStreamService activityStreamService,
            IRepository <TicketPartRecord> repository,
            IRepository <CRMCommentPartRecord> commentRepository,
            IOrchardServices services,
            IBasicDataService basicDataService)
        {
            this.transactionManager = transactionManager;
            this.sessionLocator     = sessionLocator;
            this.services           = services;
            this.T = NullLocalizer.Instance;
            this.basicDataService      = basicDataService;
            this.commentRepository     = commentRepository;
            this.activityStreamService = activityStreamService;

            Filters.Add(StorageFilter.For(repository));

            this.OnPublishing <TicketPart>((context, part) =>
            {
                var statusTimes = part.StatusTimes;

                if (part.Record.StatusRecord == null)
                {
                    statusTimes.Add(new KeyValuePair <int, DateTime>(0, DateTime.UtcNow));
                    part.Record.ClosedDateTime = null;
                }
                else
                {
                    var statusRecords = basicDataService.GetStatusRecords();
                    var statusRecord  = statusRecords.FirstOrDefault(c => c.Id == part.Record.StatusRecord.Id);

                    if (statusRecord != null && statusRecord.StatusTypeId == StatusRecord.ClosedStatus && part.Record.ClosedDateTime == null)
                    {
                        part.Record.ClosedDateTime = DateTime.UtcNow;
                    }
                    else if (statusRecord.StatusTypeId != StatusRecord.ClosedStatus)
                    {
                        part.Record.ClosedDateTime = null;
                    }

                    // if the status doesn't change from the last update, then do noting
                    if (statusTimes.Count > 0 && statusTimes[statusTimes.Count - 1].Key == part.Record.StatusRecord.Id)
                    {
                        return;
                    }

                    statusTimes.Add(new KeyValuePair <int, DateTime>(part.Record.StatusRecord.Id, DateTime.UtcNow));
                }

                part.StatusTimes = statusTimes;
            });

            this.OnRemoved <TicketPart>((contextPart, part) =>
            {
                repository.Delete(part.Record);
            });

            this.OnUpdated <TicketPart>((contextPart, part) =>
            {
                // Due to a bug in middle of nowhere in NHibernate, sometimes the due date doesn't persisted properly, so we
                // will update all of the cached copies in the session.
                var session        = this.transactionManager.GetSession();
                var sessionContext = session.GetSessionImplementation().PersistenceContext;
                foreach (TicketPartRecord entity in sessionContext.EntitiesByKey.Values.Where(c => c is TicketPartRecord))
                {
                    if (entity.Id == part.Record.Id)
                    {
                        entity.DueDate = part.Record.DueDate;
                    }
                }
            });

            this.OnIndexing <TicketPart>((context, part) =>
            {
                this.UpdateIndex(context, part);
            });
        }