예제 #1
0
        /// <summary>
        /// Remove non printing characters such as byte order marks from certificate thumbprints
        /// </summary>
        /// <param name="property"></param>
        /// <param name="data"></param>
        public void ValueChanged(Property property, ConfigurationDataBase data)
        {
            if (property.DataType != PropertyType.String)
                return;

            var value = data.GetStringValue(property);
            if (!string.IsNullOrEmpty(value))
                data.SetStringValue(property, CleanThumbprint(value.Trim()));
        }
예제 #2
0
        /// <summary>
        /// Remove non printing characters such as byte order marks from certificate thumbprints
        /// </summary>
        /// <param name="property"></param>
        /// <param name="data"></param>
        public void ValueChanged(Property property, ConfigurationDataBase data)
        {
            if (property.DataType != PropertyType.String)
            {
                return;
            }

            var value = data.GetStringValue(property);

            if (!string.IsNullOrEmpty(value))
            {
                data.SetStringValue(property, CleanThumbprint(value.Trim()));
            }
        }
 public InlineContentControl(ConfigurationDataBase configurationDataBase)
 {
     _configurationDataBase = configurationDataBase;
 }
 public void ValueChanged(Property property, ConfigurationDataBase data)
 {
     _callback(data.GetStringValue(property));
 }
        //1) can userId create application? anyone for now
        //2) what containerTypes are supported? just group containers for now
        //3) containerId is the group Guid, or any other application that has a nodeId
        //4) configurationDatabase is the properties set in the panel used to create the application

        public IApplication Create(int userId, Guid containerTypeId, Guid containerId, ConfigurationDataBase createConfigurationData)
        {
            try
            {
                foreach (Guid _containerTypeId in ContainerTypes)
                {
                    //container types for groups is
                    if (Apis.Get <IGroups>().ContainerTypeId == _containerTypeId)
                    {
                        int groupId = Apis.Get <IGroups>().Get(containerId).Id.Value;
                        InternalApi.CoriaMapBook coriaMapBook = new InternalApi.CoriaMapBook();
                        coriaMapBook.ApplicationId     = Guid.NewGuid();
                        coriaMapBook.ApplicationTypeId = CoriaMapBookType._applicationTypeId;
                        coriaMapBook.AvatarUrl         = createConfigurationData.GetStringValue("mapBookAvatarUrl", "/cfs-filesystemfile/__key/system/images/grid.svg");
                        coriaMapBook.Name        = createConfigurationData.GetStringValue("mapBookName", "Map Book");
                        coriaMapBook.GroupId     = groupId;
                        coriaMapBook.IsEnabled   = createConfigurationData.GetBoolValue("mapBookIsEnabled", true);
                        coriaMapBook.Id          = 0;
                        coriaMapBook.OntologyId  = 0;
                        coriaMapBook.Description = createConfigurationData.GetStringValue("mapBookDesc", "a list of maps");
                        coriaMapBook.Url         = createConfigurationData.GetStringValue("mapBookUrl", "mapbooks");
                        coriaMapBook.SafeName    = createConfigurationData.GetStringValue("safeNameUrl", coriaMapBook.ApplicationId.ToString());
                        //coriaMapBook.SafeName = createConfigurationData.GetStringValue("mapBookUrl", "mapbook");

                        coriaMapBook = InternalApi.CoriaDataService.CreateUpdateMapBook(coriaMapBook);

                        return(PublicApi.MapBooks.Get(coriaMapBook.Id));
                    }
                    if (Apis.Get <IUsers>().ContainerTypeId == _containerTypeId)
                    {
                        //TODO: implement user's map applications
                        return(null);
                    }
                }
            }
            catch (Exception ex)
            {
                //IUserRenderableException.
                string exceptions = ex.Message;
                throw;
            }
            return(null);
        }
예제 #6
0
 public InlineContentControl(ConfigurationDataBase configurationDataBase)
 {
     _configurationDataBase = configurationDataBase;
 }
예제 #7
0
 public void ValueChanged(Property property, ConfigurationDataBase data)
 {
     _callback(data.GetStringValue(property));
 }
 public IApplication Create(int userId, Guid containerTypeId, Guid containerId, ConfigurationDataBase createConfigurationData)
 {
     throw new NotImplementedException();
 }