public static OrganizationModel UpdateFormData( Dictionary <string, object> dataModel, OrganizationModel model ) { foreach (var item in dataModel) { model.Write(item.Key, item.Value); } return(model); }
private async Task ConfigureBackendAsync(OrganizationModel organizationModel, PCMSOrganizationModel pcms) { // create a private folder to store backend configuration var privateFolder = new FolderModel(new FolderIdentifier(organizationModel.Identifier, ":private")) .InitializeEmptyMetadata() .InitializeEmptyPrivileges(); // write the backend configuration into the folder's metadata var backendConfiguration = new BackendConfiguration { DriverTypeName = "Documents.Backends.Drivers.Encryption.Driver, Documents.Backends.Drivers.Encryption", ConfigurationJSON = JsonConvert.SerializeObject(new { NextDriverTypeName = "Documents.Backends.Drivers.S3.Driver, Documents.Backends.Drivers.S3", MasterKey = pcms.MasterEncryptionKey, NextDriverConfigurationJson = JsonConvert.SerializeObject(new { AWSRegion = pcms.AWSS3Region, BucketName = pcms.AWSS3BucketName, pcms.AWSSecretAccessKey, pcms.AWSAccessKeyID }) }) }; privateFolder.Write(MetadataKeyConstants.BACKEND_CONFIGURATION, backendConfiguration); privateFolder.WriteACLs("read", idSystem); privateFolder.WriteACLs("write", idSystem); privateFolder.WriteACLs("gateway", idSystem, idOrganizationMember); privateFolder.Write("synchronize", new { ConnectionString = pcms.PCMSDBConnectionString, pcms.CountyID, LastChangeLogID = 0, LastAccountChangeLogID = 0 }); if (organizationModel.Read <bool?>("synchronize[isactive]") == null) { organizationModel.Write("synchronize[isactive]", true); } await api.Folder.PutAsync(privateFolder); }
private void ConfigureSearch(OrganizationModel organizationModel) { organizationModel.Write("searchconfiguration", new { languageMap = new Dictionary <string, string> { { "_path", "Path" }, { "attribute.make", "Camera Make" }, { "attribute.model", "Camera Model" }, { "attribute.casestatus", "Case Status" }, { "attribute.closed", "Open or Closed" }, { "attribute.closed.true", "Closed" }, { "attribute.closed.false", "Open" }, { "attribute.ada.last", "Primary ADA" }, { "attribute.firstname", "Defendant First name" }, { "attribute.lastname", "Defendant Last name" } }, displayFields = new string[] { "attribute.firstname", "attribute.lastname", "attribute.casestatus" } }); organizationModel.WriteForFolder("attributelocators[locatorlist]", new List <AttributeLocator>() { new AttributeLocator { Key = "_path", Label = "Path", IsFacet = true, IsIndexed = true, IsReadOnly = true, IsOnDetailView = false, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.defendantid", Label = "Defendant ID", IsFacet = false, IsIndexed = true, IsReadOnly = true, IsOnDetailView = false, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.ada.last", Label = "ADA Last Name", IsFacet = true, IsIndexed = true, IsReadOnly = true, IsOnDetailView = false, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.firstname", Label = "First Name", IsFacet = false, IsIndexed = true, IsReadOnly = true, IsOnDetailView = false, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.lastname", Label = "Last Name", IsFacet = true, IsIndexed = true, IsReadOnly = true, IsOnDetailView = false, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.casestatus", Label = "Case Status", IsFacet = true, IsIndexed = true, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.closed", Label = "Closed", IsFacet = true, IsIndexed = true, IsReadOnly = true, IsOnDetailView = false, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.deleted", Label = "Deleted", IsFacet = false, IsIndexed = true, IsReadOnly = true, IsOnDetailView = false, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.created", Label = "Created", IsFacet = false, IsIndexed = true, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.make", Label = "Camera Make", IsFacet = true, IsIndexed = true, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.model", Label = "Camera Model", IsFacet = true, IsIndexed = true, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.gps", Label = "GPS Coordinates", IsFacet = false, IsIndexed = true, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.datetimeoriginal", Label = "Date/Time Original", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.height", Label = "Height", IsFacet = false, IsIndexed = true, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.width", Label = "Width", IsFacet = false, IsIndexed = true, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.lensid", Label = "Lens ID", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.software", Label = "Software", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.filesize", Label = "EXIF File Size", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.duration", Label = "Duration in Seconds", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.isosetting", Label = "ISO Setting", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.shutterspeed", Label = "Shutter Speed", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.fnumber", Label = "F Number", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.flash", Label = "Flash", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.megapixels", Label = "Megapixels", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.imageuniqueid", Label = "Image Unique ID", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.codec", Label = "Codec", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.framerate", Label = "Frame Rate", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.framecount", Label = "Frame Count", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString }, new AttributeLocator { Key = "attribute.resolution", Label = "Resolution", IsFacet = false, IsIndexed = false, IsReadOnly = true, IsOnDetailView = true, StorageType = StorageType.SystemString } }); }