/// <exclude /> public BaseFunctionProviderElementProvider() { foreach (Type entityTokenType in OnGetEntityTokenTypes()) { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider(entityTokenType, this); } }
public AssociatedDataElementProviderHelper(ElementProviderContext elementProviderContext, EntityToken rootEntityToken, bool addVisualFunctionActions) { if (elementProviderContext == null) { throw new ArgumentNullException("elementProviderContext"); } if (rootEntityToken == null) { throw new ArgumentNullException("rootEntityToken"); } _elementProviderContext = elementProviderContext; _rootEntityToken = rootEntityToken; _addVisualFunctionActions = addVisualFunctionActions; _dataGroupingProviderHelper = new DataGroupingProviderHelper.DataGroupingProviderHelper(elementProviderContext) { OnOwnsType = type => typeof(IPageFolderData).IsAssignableFrom(type) || typeof(IPageDataFolder).IsAssignableFrom(type), OnCreateLeafElement = this.CreateElement, OnCreateDisabledLeafElement = data => ShowForeignElement(data, false), OnCreateGhostedLeafElement = data => ShowForeignElement(data, true), OnGetRootParentEntityToken = this.GetParentEntityToken, OnGetLeafsFilter = this.GetLeafsFilter, OnGetPayload = this.GetPayload }; AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataEntityToken>(this); }
public static void OnInitialized() { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <MyRootEntityToken>( new MyRootEntityTokenAuxiliarySecurityAncestorProvider()); AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataEntityToken>( new MyDataEntityTokenAuxiliarySecurityAncestorProvider()); }
public DeveloperApplicationProvider() { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DeveloperApplicationProviderEntityToken>(this); foreach (string treeDefinitionFilename in this.TreeDefinitionFilenames) { string filename = Path.GetFileName(treeDefinitionFilename); DeveloperApplicationProviderEntityToken entityToken = new DeveloperApplicationProviderEntityToken(DeveloperApplicationProviderEntityToken.TreeDefinitionId, filename); TreeFacade.AddCustomAttachmentPoint(filename, entityToken); } }
protected override void OnContextSetted() { string providerName = GetContext().ProviderName; if (_providerType == FunctionsProviderType) { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider(typeof(StandardFunctionProviderEntityToken), new StandardFunctionAuxiliarySecurityAncestorProvider(providerName)); } else { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider(typeof(StandardWidgetFunctionProviderEntityToken), new StandardFunctionAuxiliarySecurityAncestorProvider(providerName)); } }
public PageTemplateFeatureElementProvider() { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <PageTemplateFeatureEntityToken>(this); foreach (string pageTemplateFeratureFilename in this.PageTemplateFeatureFilenames) { string filename = Path.GetFileName(pageTemplateFeratureFilename); PageTemplateFeatureEntityToken entityToken = new PageTemplateFeatureEntityToken(PageTemplateFeatureEntityToken.FeatureId, filename); TreeFacade.AddCustomAttachmentPoint(filename, entityToken); } }
public DataGroupingProviderHelper(ElementProviderContext elementProviderContext) { _elementProviderContext = elementProviderContext; _undefinedLabelValue = StringResourceSystemFacade.GetString("Composite.Plugins.GeneratedDataTypesElementProvider", "UndefinedLabelTemplate"); this.FolderOpenIcon = GetIconHandle("datagroupinghelper-folder-open"); this.FolderClosedIcon = GetIconHandle("datagroupinghelper-folder-closed"); this.OnCreateLeafElement = d => new Element(_elementProviderContext.CreateElementHandle(d.GetDataEntityToken())); this.OnGetDataScopeIdentifier = t => DataScopeIdentifier.Administrated; this.OnAddActions = (e, p) => e; AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataEntityToken>(this); AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataGroupingProviderHelperEntityToken>(this); }
public void Initialize() { using (_resourceLocker.Locker) { var resources = _resourceLocker.Resources; if (!GlobalInitializerFacade.IsReinitializingTheSystem) { DataEvents <IDataItemTreeAttachmentPoint> .OnAfterAdd += OnUpdateTreeAttachmentPoints; DataEvents <IDataItemTreeAttachmentPoint> .OnDeleted += OnUpdateTreeAttachmentPoints; DataEvents <IDataItemTreeAttachmentPoint> .OnStoreChanged += OnTreeAttachmentPointsStoreChange; GeneratedTypesFacade.SubscribeToUpdateTypeEvent(OnDataTypeChanged); var treeAuxiliaryAncestorProvider = new TreeAuxiliaryAncestorProvider(); var entityTokenTypes = new[] { typeof(TreeSimpleElementEntityToken), typeof(TreeFunctionElementGeneratorEntityToken), typeof(TreeDataFieldGroupingElementEntityToken), typeof(DataEntityToken), typeof(TreePerspectiveEntityToken) }; entityTokenTypes.ForEach(type => AuxiliarySecurityAncestorFacade .AddAuxiliaryAncestorProvider(type, treeAuxiliaryAncestorProvider, true)); resources.PersistentAttachmentPoints = new Dictionary <string, List <IAttachmentPoint> >(); LoadAllTrees(); InitializeTreeAttachmentPoints(); TreeSharedRootsFacade.Clear(); var fileWatcher = new C1FileSystemWatcher(TreeDefinitionsFolder, "*.xml"); fileWatcher.Created += OnReloadTrees; fileWatcher.Deleted += OnReloadTrees; fileWatcher.Changed += OnReloadTrees; fileWatcher.Renamed += OnReloadTrees; fileWatcher.EnableRaisingEvents = true; resources.FileSystemWatcher = fileWatcher; resources.RootEntityToken = ElementFacade.GetRootsWithNoSecurity().First().ElementHandle.EntityToken; } } }
public DataGroupingProviderHelper(ElementProviderContext elementProviderContext) { _elementProviderContext = elementProviderContext; _undefinedLabelValue = StringResourceSystemFacade.GetString("Composite.Plugins.GeneratedDataTypesElementProvider", "UndefinedLabelTemplate"); this.FolderOpenIcon = GetIconHandle("datagroupinghelper-folder-open"); this.FolderClosedIcon = GetIconHandle("datagroupinghelper-folder-closed"); this.OnCreateLeafElement = d => new Element(_elementProviderContext.CreateElementHandle(d.GetDataEntityToken())); this.OnGetDataScopeIdentifier = t => DataScopeIdentifier.Administrated; this.OnAddActions = (e, p) => e; AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataEntityToken>(this); AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataGroupingProviderHelperEntityToken>(this); DataEventSystemFacade.SubscribeToDataAfterUpdate(typeof(IData), (sender, args) => { if (!OnOwnsType(args.DataType)) { return; } var dataTypeDescriptor = DynamicTypeManager.GetDataTypeDescriptor(args.DataType); IEnumerable <DataFieldDescriptor> groupingDataFieldDescriptors = from dfd in dataTypeDescriptor.Fields where dfd.GroupByPriority != 0 orderby dfd.GroupByPriority select dfd; if (groupingDataFieldDescriptors.Any()) { EntityTokenCacheFacade.ClearCache(args.Data.GetDataEntityToken()); } }, false); }
public PageElementProvider() { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataEntityToken>(this); }
public PageElementProvider() { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataEntityToken>(this); DataEvents <IPageType> .OnStoreChanged += DataEvents_IPageType_OnStoreChanged; }
public ScheduledTasksElementProvider() { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataEntityToken>(this); }
public LocalizationElementProvider() : base("Localization") { AuxiliarySecurityAncestorFacade.AddAuxiliaryAncestorProvider <DataEntityToken>(this); }