Exemplo n.º 1
0
 public Object(IPortalApplication portalApplication, IMcmRepository mcmRepository, IPermissionManager permissionManager, IObjectCreate objectCreate, IObjectDelete objectDelete, IObjectSetPublishSettings objectSetPublishSettings) : base(portalApplication, mcmRepository, permissionManager)
 {
     ObjectCreate = objectCreate;
     ObjectDelete = objectDelete;
     ObjectSetPublishSettings = objectSetPublishSettings;
     ObjectQueryHelper = new ObjectQueryHelper(portalApplication);
 }
 protected AMcmExtension(IPortalApplication portalApplication, IMcmRepository mcmRepository,
                         IPermissionManager permissionManager)
   : base(portalApplication)
 {
   McmRepository = mcmRepository;
   PermissionManager = permissionManager;
 }
Exemplo n.º 3
0
        public Download(IPortalApplication portalApplication, IMcmRepository mcmRepository, McmModuleConfiguration mcmModuleConfiguration) : base(portalApplication, "MCM")
        {
            McmRepository = mcmRepository;
            McmModuleConfiguration = mcmModuleConfiguration;

            _downloadStrategies.Add("S3", new S3DownloadStrategy(mcmModuleConfiguration));
        }
        public IPermissionManager WithSynchronization(IMcmRepository repository, ISynchronizationSpecification synchronizationSpecification)
        {
            McmRepository = repository;
            synchronizationSpecification.OnSynchronizationTrigger += Synchronize;

            return this;
        }
Exemplo n.º 5
0
 public Object(IPortalApplication portalApplication, IMcmRepository mcmRepository, IPermissionManager permissionManager) : base(portalApplication, mcmRepository, permissionManager)
 {
     ObjectCreate = new ObjectCreate(mcmRepository, permissionManager, portalApplication.ViewManager);
     ObjectDelete = new ObjectDelete(mcmRepository, permissionManager, portalApplication.ViewManager);
     ObjectSetPublishSettings = new ObjectSetPublishSettings(mcmRepository, permissionManager, portalApplication.ViewManager);
     ObjectQueryHelper = new ObjectQueryHelper(portalApplication);
 }
 public Upload(IPortalApplication portalApplication, IMcmRepository repository, IStorage storage, ITranscoder transcoder, LarmSettings settings) : base(portalApplication)
 {
     Repository = repository;
     Storage = storage;
     Transcoder = transcoder;
     Settings = settings;
 }
		public static void SendFromEmailSchema(this IEmailService emailService, IEnumerable<string> to, IEnumerable<string> bcc, IMcmRepository repository, MetadataIdentifier template, IList<MetadataIdentifier> datas)
		{
			var templateMetadata = GetEmailTemplate(repository, template);

			var dataMetadatas = GetDatas(repository, datas);

			emailService.SendTemplate(templateMetadata.From, to, bcc, templateMetadata.Subject, templateMetadata.Body, dataMetadatas);
		}
		public static void SendTemplate(this IEmailService emailService, string from, IEnumerable<string> to, IEnumerable<string> bcc, string subject, IMcmRepository repository, MetadataIdentifier template, IList<MetadataIdentifier> datas)
		{
			var templateMetadata = GetMetadata(repository, template, "Failed to get template");

			var dataMetadatas = GetDatas(repository, datas);

			emailService.SendTemplate(from, to, bcc, subject, templateMetadata, dataMetadatas);
		}
Exemplo n.º 9
0
 public Object(IPortalApplication portalApplication, IMcmRepository mcmRepository, IPermissionManager permissionManager)
     : this(portalApplication, 
            mcmRepository, 
            permissionManager,
            new ObjectCreate(mcmRepository, permissionManager, portalApplication.ViewManager),
            new ObjectDelete(mcmRepository, permissionManager, portalApplication.ViewManager),
            new ObjectSetPublishSettings(mcmRepository, permissionManager, portalApplication.ViewManager))
 {
 }
 public UserProfileController(IMcmRepository mcmRepository)
 {
     McmRepository = mcmRepository;
 }
 public InMemoryPermissionManager(IMcmRepository mcmRepository)
 {
     McmRepository = mcmRepository;
 }
Exemplo n.º 12
0
 private Download(IPortalApplication portalApplication, IMcmRepository mcmRepository, McmModuleConfiguration mcmModuleConfiguration, IDictionary<string, IDownloadStrategy> downloadStrategies) : this(portalApplication, mcmRepository, mcmModuleConfiguration)
 {
     _downloadStrategies = downloadStrategies;
 }
Exemplo n.º 13
0
 public static Download CreateWithDownloadStrategy(IPortalApplication portalApplication, IMcmRepository mcmRepository, McmModuleConfiguration mcmModuleConfiguration, IDictionary<string, IDownloadStrategy> downloadStrategies)
 {
     return new Download(portalApplication, mcmRepository, mcmModuleConfiguration, downloadStrategies);
 }
		public static void SendFromEmailSchema(this IEmailService emailService, IList<string> to, IEnumerable<string> bcc, IMcmRepository repository, MetadataIdentifier template, XElement data)
		{
			emailService.SendFromEmailSchema(to, bcc, repository, template, new List<XElement> { data });
		}
 public RadioProgram(IPortalApplication portalApplication, IMcmRepository mcmRepository) : base(portalApplication)
 {
   McmRepository = mcmRepository;
 }
 public UserManagementController(IMcmRepository mcmRepository, UserManagementConfiguration configuration)
 {
     McmRepository = mcmRepository;
     Configuration = configuration;
 }
 public Annotation(IPortalApplication portalApplication, IMcmRepository mcmRepository) : base(portalApplication)
 {
   McmRepository = mcmRepository;
 }
		public UserManagement(IPortalApplication portalApplication, IMcmRepository mcmRepository, IPermissionManager permissionManager, UserManagementConfiguration configuration) : base(portalApplication, mcmRepository, permissionManager)
		{
			_configuration = configuration;
            UserManagementController = new UserManagementController(mcmRepository, configuration);
		}
 public SearchView(IMcmRepository repository) : base("Search")
 {
   Repository = repository;
 }
        public WayfProfile(IPortalApplication portalApplication, IMcmRepository repository, LarmSettings settings) : base(portalApplication)
		{
			McmRepository = repository;
            Settings = settings;
		}
Exemplo n.º 21
0
 public McmExperimentGateway(IMcmRepository repo)
 {
     _repo = repo;
 }
 public MetadataSchema(IPortalApplication portalApplication, IMcmRepository mcmRepository, IPermissionManager permissionManager) : base(portalApplication, mcmRepository, permissionManager)
 {
 }
		public static void SendFromEmailSchema(this IEmailService emailService, string to, IMcmRepository repository, MetadataIdentifier template, IList<XElement> datas)
		{
			emailService.SendFromEmailSchema(new List<string> { to }, null, repository, template, datas);
		}
 public ObjectSetPublishSettings(IMcmRepository mcmRepository, IPermissionManager permissionManager, IViewManager viewManager)
     : base(mcmRepository, permissionManager, viewManager)
 {
 }
 public ObjectRelation(IPortalApplication portalApplication, IMcmRepository mcmRepository, IPermissionManager permissionManager) : base(portalApplication, mcmRepository, permissionManager)
 {
 }
 public ObjectCreate(IMcmRepository mcmRepository, IPermissionManager permissionManager, IViewManager viewManager) : base(mcmRepository, permissionManager, viewManager)
 {
 }
 public McmSelectionGateway(IMcmRepository mcmRepository)
 {
     McmRepository = mcmRepository;
 }
		private static XElement GetMetadata(IMcmRepository repository, MetadataIdentifier metadata, string errorMessage = "Failed to get metadata")
		{
			var templateObject = repository.ObjectGet(metadata.ObjectGuid, true);

			if(templateObject == null)
				throw new System.Exception(string.Format("{0}, object not found. ObjectGuid: {1}", errorMessage, metadata.ObjectGuid));

			if (templateObject.Metadatas == null || templateObject.Metadatas.Count == 0)
				throw new System.Exception(string.Format("{0}, object has no metadata. ObjectGuid: {1}", errorMessage, metadata.ObjectGuid));

			var templateMetadata = templateObject.Metadatas.FirstOrDefault(m => m.MetadataSchemaGuid == metadata.MetadataSchemaGuid && m.LanguageCode == metadata.LanguageCode);

			if (templateMetadata == null)
				throw new System.Exception(string.Format("{0}, no matching schema and language code. ObjectGuid: {1} SchemaGuid: {2} LanguageCode: {3}", errorMessage, metadata.ObjectGuid, metadata.MetadataSchemaGuid, metadata.LanguageCode));

			return templateMetadata.MetadataXml.Root;
		}
 public AnnotationView(IMcmRepository repository) : base("Annotation")
 {
     Repository = repository;
 }
Exemplo n.º 30
0
		public UserProfile(IPortalApplication portalApplication, IMcmRepository mcmRepository, IPermissionManager permissionManager) : base(portalApplication, mcmRepository, permissionManager)
		{
            UserProfileController = new UserProfileController(mcmRepository);
		}
 public McmQuestionnaireGateway(IMcmRepository repository)
 {
     Repository = repository;
 }
Exemplo n.º 32
0
 public Folder(IPortalApplication portalApplication, IMcmRepository mcmRepository,
               IPermissionManager permissionManager) : base(portalApplication, mcmRepository, permissionManager)
 {
 }
 public McmQuestionGateway(IMcmRepository mcmRepository)
 {
     McmRepository = mcmRepository;
 }
		public static void SendTemplate(this IEmailService emailService, string from, string to, string subject, IMcmRepository repository, MetadataIdentifier template, IList<MetadataIdentifier> datas)
		{
			emailService.SendTemplate(from, new List<string> { to }, null, subject, repository, template, datas);
		}