public override void InitSchema(JsonSchemaManager.Schema owner)
        {
            IDictionary pmore = new OrderedDictionary();

            base.InitSchema(owner);
            pmore["config"]           = "DataProviders";
            pmore["always_show_help"] = true;
            base.AddSchemaProp(owner, "ac", "ConfigChoice", pmore);
            pmore                     = new OrderedDictionary();
            pmore["lines"]            = 4;
            pmore["always_show_help"] = true;
            base.AddSchemaProp(owner, "cs", "String", pmore);
            pmore = new OrderedDictionary();
            pmore["always_show_help"] = true;
            pmore["is_password"]      = true;
            base.AddSchemaProp(owner, "pw", "String", pmore);
            pmore = new OrderedDictionary();
            pmore["always_show_help"] = true;
            pmore["lines"]            = 8;
            base.AddSchemaProp(owner, "sq", "String", pmore);
            pmore = new OrderedDictionary();
            base.AddSchemaProp(owner, "pd", "DataFields", "w", true, pmore);
            pmore = new OrderedDictionary();
            base.AddSchemaProp(owner, "pt", "DataFields", "w", true, pmore);
            pmore = new OrderedDictionary();
            base.AddSchemaProp(owner, "pp", "DataFields", "w", true, pmore);
            pmore = new OrderedDictionary();
            base.AddSchemaProp(owner, "pu", "DataFields", "w", true, pmore);
            this.InitSchemaForCaching(owner, false, true);
        }
        protected IDictionary AddSchemaProp(JsonSchemaManager.Schema owner, string pname, object ptype, string tab, bool sharedRes, IDictionary pmore)
        {
            IDictionary dictionary = new OrderedDictionary();

            if (string.IsNullOrEmpty(tab))
            {
                tab = "t__" + base.GetType().Name;
            }
            dictionary["type"]            = ptype;
            dictionary["tab"]             = tab;
            dictionary["show_in_summary"] = false;
            IDictionary dictionary2 = pmore["show_if"] as IDictionary;

            if (dictionary2 == null)
            {
                dictionary2 = new OrderedDictionary();
            }
            dictionary2["t"]      = base.GetType().Name;
            dictionary["show_if"] = dictionary2;
            if (sharedRes)
            {
                dictionary["res_title"] = "PC_DataSources_" + pname;
                dictionary["res_desc"]  = "PD_DataSources_" + pname;
            }
            if (pmore != null)
            {
                foreach (DictionaryEntry entry in pmore)
                {
                    dictionary[entry.Key] = entry.Value;
                }
            }
            owner.RawSchema[this.SchemaPropNamePrefix + "_" + pname] = dictionary;
            return(dictionary);
        }
        public override void InitSchema(JsonSchemaManager.Schema owner)
        {
            IDictionary pmore = new OrderedDictionary();

            pmore["lines"]     = 4;
            pmore["default"]   = "ID\r\nTitle\r\nSampleColumn";
            pmore["validator"] = "roxValidateNonEmpty";
            base.AddSchemaProp(owner, "f", "String", pmore);
            pmore = new OrderedDictionary();
            pmore["validator"] = "roxValidateNumeric";
            pmore["default"]   = "85";
            base.AddSchemaProp(owner, "c", "String", pmore);
            pmore              = new OrderedDictionary();
            pmore["lines"]     = "4";
            pmore["validator"] = "roxValidateJson";
            base.AddSchemaProp(owner, "r", "String", pmore);
            pmore            = new OrderedDictionary();
            pmore["default"] = "SampleColumn:" + ProductPage.GetResource("PC_DataSources_t_" + base.GetType().Name, new object[0]);
            base.AddSchemaProp(owner, "pd", "DataFields", "w", true, pmore);
            pmore            = new OrderedDictionary();
            pmore["default"] = "[Title]";
            base.AddSchemaProp(owner, "pt", "DataFields", "w", true, pmore);
            pmore = new OrderedDictionary();
            base.AddSchemaProp(owner, "pp", "DataFields", "w", true, pmore);
            pmore = new OrderedDictionary();
            base.AddSchemaProp(owner, "pu", "DataFields", "w", true, pmore);
            this.InitSchemaForCaching(owner, false, false);
        }
        public virtual void InitSchemaForCaching(JsonSchemaManager.Schema owner, bool defVal, bool allowChange)
        {
            IDictionary pmore       = new OrderedDictionary();
            IDictionary dictionary2 = new OrderedDictionary();

            dictionary2[this.SchemaPropNamePrefix + "_cc"] = "c";
            pmore["default"]          = defVal;
            pmore["always_show_help"] = true;
            if (!allowChange)
            {
                pmore["readonly"] = true;
            }
            this.AddSchemaProp(owner, "cc", new ArrayList(new string[] { defVal ? "c" : "n", defVal ? "n" : "c" }), "u", true, pmore);
            pmore.Clear();
            pmore["show_if"]          = dictionary2;
            pmore["validator"]        = "roxValidateNumeric";
            pmore["default"]          = "10";
            pmore["always_show_help"] = true;
            this.AddSchemaProp(owner, "cr", "String", "u", true, pmore);
            pmore.Clear();
            pmore["show_if"]          = dictionary2;
            pmore["always_show_help"] = true;
            this.AddSchemaProp(owner, "cn", "Boolean", "u", true, pmore);
            pmore.Clear();
            pmore["show_if"]          = dictionary2;
            pmore["always_show_help"] = true;
            this.AddSchemaProp(owner, "rc", "Boolean", "u", true, pmore);
            pmore.Clear();
            pmore["show_if"]          = dictionary2;
            pmore["always_show_help"] = true;
            this.AddSchemaProp(owner, "cl", "ClearCache", "u", true, pmore);
        }
Example #5
0
        public override void InitSchema(JsonSchemaManager.Schema owner)
        {
            IDictionary pmore = new OrderedDictionary();

            base.InitSchema(owner);
            pmore["default"] = this.GetDefVal("pd");
            base.AddSchemaProp(owner, "pd", "DataFields", "w", true, pmore);
            pmore            = new OrderedDictionary();
            pmore["default"] = this.GetDefVal("pt");
            base.AddSchemaProp(owner, "pt", "DataFields", "w", true, pmore);
            pmore            = new OrderedDictionary();
            pmore["default"] = this.GetDefVal("pp");
            base.AddSchemaProp(owner, "pp", "DataFields", "w", true, pmore);
            pmore            = new OrderedDictionary();
            pmore["default"] = this.GetDefVal("pu");
            base.AddSchemaProp(owner, "pu", "DataFields", "w", true, pmore);
            pmore            = new OrderedDictionary();
            pmore["default"] = this.GetDefVal("pm");
            base.AddSchemaProp(owner, "pm", "DataFields", "w", true, pmore);
            pmore            = new OrderedDictionary();
            pmore["default"] = this.GetDefVal("pl");
            base.AddSchemaProp(owner, "pl", "DataFields", "w", true, pmore);
            pmore                     = new OrderedDictionary();
            pmore["default"]          = this.GetDefVal("vc");
            pmore["default_if_empty"] = true;
            pmore["lines"]            = 6;
            base.AddSchemaProp(owner, "vc", "String", "w", true, pmore);
            pmore          = new OrderedDictionary();
            pmore["lines"] = 6;
            base.AddSchemaProp(owner, "mf", "String", "w", true, pmore);
        }
        public override void InitSchema(JsonSchemaManager.Schema owner)
        {
            IDictionary pmore       = new OrderedDictionary();
            IDictionary dictionary2 = new OrderedDictionary();

            base.InitSchema(owner);
            dictionary2[this.SchemaPropNamePrefix + "_au"] = new string[] { "Secure", "None", "" };
            pmore            = new OrderedDictionary();
            pmore["default"] = "LDAP://OU=Departments,DC=global,DC=local";
            base.AddSchemaProp(owner, "cs", "String", pmore);
            pmore = new OrderedDictionary();
            base.AddSchemaProp(owner, "sq", "String", pmore);
            pmore             = new OrderedDictionary();
            pmore["default"]  = "Subtree";
            pmore["enumtype"] = typeof(SearchScope).AssemblyQualifiedName;
            base.AddSchemaProp(owner, "ss", "EnumChoice", pmore);
            pmore             = new OrderedDictionary();
            pmore["default"]  = "None";
            pmore["exclude"]  = "Signing,Sealing,ServerBind,FastBind,ReadonlyServer";
            pmore["enumtype"] = typeof(AuthenticationTypes).AssemblyQualifiedName;
            base.AddSchemaProp(owner, "au", "EnumChoice", pmore);
            pmore            = new OrderedDictionary();
            pmore["show_if"] = dictionary2;
            base.AddSchemaProp(owner, "us", "String", pmore);
            pmore = new OrderedDictionary();
            pmore["is_password"] = true;
            pmore["show_if"]     = dictionary2;
            base.AddSchemaProp(owner, "pw", "String", pmore);
            this.InitSchemaForCaching(owner, false, true);
        }
        public override void InitSchema(JsonSchemaManager.Schema owner)
        {
            string[] c         = new string[] { "a", "s", "u", "n" };
            string[] strArray2 = new string[] { "n", "g", "s" };
            base.InitSchema(owner);
            IDictionary pmore = new OrderedDictionary();

            base.AddSchemaProp(owner, "u", new ArrayList(c), pmore);
            base.AddSchemaProp(owner, "g", new ArrayList(strArray2), pmore);
            this.InitSchemaForCaching(owner, false, true);
        }
Example #8
0
        public void InitSchema(JsonSchemaManager.Schema owner)
        {
            Exception error = null;

            foreach (System.Type type in DataSource.KnownProviderTypes)
            {
                DataSource source = DataSource.GetStatic(type, null, ref error);
                if (source != null)
                {
                    source.InitSchema(owner);
                }
            }
        }
        public static DataSource Load(JsonSchemaManager.Schema schema, IDictionary inst, string typeName)
        {
            System.Type type   = ProductPage.Assembly.GetType("roxority.Data.Providers." + (string.IsNullOrEmpty(typeName) ? inst["t"] : typeName), false, true);
            Exception   error  = null;
            DataSource  source = (type == null) ? null : New(type, ref error);

            if (source != null)
            {
                source.schema = schema;
                source.schema.ShouldSerialize = new Converter <KeyValuePair <IDictionary, JsonSchemaManager.Property>, bool>(DataSource.ShouldSerialize);
                source.inst = inst;
                return(source);
            }
            if (error != null)
            {
                throw error;
            }
            return(source);
        }
Example #10
0
 public override void InitSchema(JsonSchemaManager.Schema owner)
 {
     base.InitSchema(owner);
     this.InitSchemaForCaching(owner, true, false);
 }
 protected IDictionary AddSchemaProp(JsonSchemaManager.Schema owner, string pname, object ptype, IDictionary pmore)
 {
     return(this.AddSchemaProp(owner, pname, ptype, null, false, pmore));
 }
 public virtual void InitSchema(JsonSchemaManager.Schema owner)
 {
 }
Example #13
0
 public virtual void InitSchema(JsonSchemaManager.Schema owner)
 {
     this.AddSchemaProp(owner, "s2", "String", "w", true, new OrderedDictionary());
 }