diff --git a/api/gwtsrc/org/labkey/api/gwt/client/model/GWTDomain.java b/api/gwtsrc/org/labkey/api/gwt/client/model/GWTDomain.java index d802cdfc2c6..3f63de2a11c 100644 --- a/api/gwtsrc/org/labkey/api/gwt/client/model/GWTDomain.java +++ b/api/gwtsrc/org/labkey/api/gwt/client/model/GWTDomain.java @@ -69,7 +69,8 @@ public class GWTDomain implements IsSer @Getter @Setter private String queryName = null; @Getter @Setter private String templateDescription = null; // null if no template @Getter @Setter private String instructions = null; - @Getter @Setter private boolean supportsPhiLevel = false; + @Getter @Setter private boolean phiLevelEnabled = false; + @Getter @Setter private String phiLevelDisabledReason = null; public GWTDomain() { @@ -99,7 +100,8 @@ public GWTDomain(GWTDomain src) this.defaultValueOptions = src.defaultValueOptions; this.defaultValuesURL = src.defaultValuesURL; this.provisioned = src.provisioned; - this.supportsPhiLevel = src.supportsPhiLevel; + this.phiLevelEnabled = src.phiLevelEnabled; + this.phiLevelDisabledReason = src.phiLevelDisabledReason; if (src.indices != null) { diff --git a/api/src/org/labkey/api/data/Results.java b/api/src/org/labkey/api/data/Results.java index 938c8ba6b87..eababd6e21e 100644 --- a/api/src/org/labkey/api/data/Results.java +++ b/api/src/org/labkey/api/data/Results.java @@ -32,8 +32,6 @@ /** * A {@link java.sql.ResultSet} with additional metadata to make it easier to use. Understands the mapping of a * {@link org.labkey.api.query.FieldKey} that was part of the query to its value in the result set. - * User: matthewb - * Date: Nov 18, 2010 */ public interface Results extends ResultSet, TableResultSet { @@ -43,11 +41,9 @@ public interface Results extends ResultSet, TableResultSet @NotNull Map getFieldMap(); - @NotNull - public Map getFieldIndexMap(); + @NotNull Map getFieldIndexMap(); - @NotNull - public Map getFieldKeyRowMap(); + @NotNull Map getFieldKeyRowMap(); @Nullable ResultSet getResultSet(); diff --git a/api/src/org/labkey/api/exp/api/SampleTypeDomainKind.java b/api/src/org/labkey/api/exp/api/SampleTypeDomainKind.java index 1a6a9af04ae..e5154ea26a4 100644 --- a/api/src/org/labkey/api/exp/api/SampleTypeDomainKind.java +++ b/api/src/org/labkey/api/exp/api/SampleTypeDomainKind.java @@ -23,7 +23,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.labkey.api.collections.CaseInsensitiveHashSet; -import org.labkey.api.compliance.ComplianceService; import org.labkey.api.data.Container; import org.labkey.api.data.ContainerFilter; import org.labkey.api.data.ContainerManager; @@ -61,7 +60,6 @@ import org.labkey.api.security.permissions.AdminPermission; import org.labkey.api.security.permissions.DesignSampleTypePermission; import org.labkey.api.util.PageFlowUtil; -import org.labkey.api.util.Pair; import org.labkey.api.util.StringUtilsLabKey; import org.labkey.api.view.ActionURL; import org.labkey.api.view.NotFoundException; @@ -667,12 +665,6 @@ public boolean hasNullValues(Domain domain, DomainProperty prop) return false; } - @Override - public boolean supportsPhiLevel() - { - return ComplianceService.get().isComplianceSupported(); - } - @Override public boolean supportsNamingPattern() { diff --git a/api/src/org/labkey/api/exp/list/ListDefinition.java b/api/src/org/labkey/api/exp/list/ListDefinition.java index 40e5a70b432..781d769398e 100644 --- a/api/src/org/labkey/api/exp/list/ListDefinition.java +++ b/api/src/org/labkey/api/exp/list/ListDefinition.java @@ -378,4 +378,7 @@ default boolean isPicklist() boolean getFileAttachmentIndex(); void setFileAttachmentIndex(boolean index); + + boolean getMultiFolder(); + void setMultiFolder(boolean multiFolder); } diff --git a/api/src/org/labkey/api/exp/property/DomainKind.java b/api/src/org/labkey/api/exp/property/DomainKind.java index 5d2e7c74002..6cf87920be1 100644 --- a/api/src/org/labkey/api/exp/property/DomainKind.java +++ b/api/src/org/labkey/api/exp/property/DomainKind.java @@ -406,11 +406,16 @@ public boolean isUserCreatedType() return true; } - public boolean supportsPhiLevel() + public boolean supportsPhiLevel(Domain domain) { return false; } + public String getPhiLevelUnsupportedReason(Domain domain) + { + return "This table type does not support PHI annotations"; + } + public boolean supportsNamingPattern() { return false; diff --git a/api/src/org/labkey/api/exp/property/DomainUtil.java b/api/src/org/labkey/api/exp/property/DomainUtil.java index d26c1e3af96..74e79c05bfa 100644 --- a/api/src/org/labkey/api/exp/property/DomainUtil.java +++ b/api/src/org/labkey/api/exp/property/DomainUtil.java @@ -91,6 +91,7 @@ import java.util.Date; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Map; @@ -121,9 +122,8 @@ public static String getFormattedDefaultValue(User user, DomainProperty property { if (defaultValue == null || (defaultValue instanceof String && StringUtils.isBlank((String)defaultValue))) return "[none]"; - if (defaultValue instanceof Date) + if (defaultValue instanceof Date defaultDate) { - Date defaultDate = (Date) defaultValue; if (property.getFormat() != null) return DateUtil.formatDateTime(defaultDate, property.getFormat()); else @@ -143,7 +143,7 @@ else if (AbstractAssayProvider.PARTICIPANT_VISIT_RESOLVER_PROPERTY_NAME.equalsIg } catch (Exception e) { - LogManager.getLogger(DomainUtil.class).debug("Failed to parse JSON for default value. It may predate JSON encoding for thaw list.", e); + LOG.debug("Failed to parse JSON for default value. It may predate JSON encoding for thaw list.", e); // And then fall through below to return defaultValue.toString(); } } @@ -215,10 +215,7 @@ private static boolean isValidPdLookup(User user, Container c, GWTPropertyDescri tableNames = new CaseInsensitiveHashSet(schema.getTableNames()); } - if (tableNames.contains(p.getLookupQuery())) - return true; - - return false; + return tableNames.contains(p.getLookupQuery()); } @Nullable @@ -447,7 +444,8 @@ private static GWTDomain getDomain(Domain dd) gwtDomain.setAllowCalculatedFields(kind.allowCalculatedFields()); gwtDomain.setShowDefaultValueSettings(kind.showDefaultValueSettings()); gwtDomain.setInstructions(kind.getDomainEditorInstructions()); - gwtDomain.setSupportsPhiLevel(kind.supportsPhiLevel()); + gwtDomain.setPhiLevelEnabled(kind.supportsPhiLevel(dd)); + gwtDomain.setPhiLevelDisabledReason(kind.getPhiLevelUnsupportedReason(dd)); } return gwtDomain; } @@ -878,17 +876,27 @@ public static ValidationException updateDomainDescriptor(GWTDomain badPhiFields = new LinkedList<>(); + // now add properties for (GWTPropertyDescriptor pd : update.getFields()) { addProperty(d, pd, defaultValues, propertyUrisInUse, validationException); + if (!supportsPhi && !PHI.NotPHI.name().equals(pd.getPHI())) + badPhiFields.add(pd.getName()); } + if (!badPhiFields.isEmpty()) + validationException.addError(new SimpleValidationError(kind.getPhiLevelUnsupportedReason(d) + " but the " + + StringUtilsLabKey.joinWithConjunction(badPhiFields, "and") + " field" + + (badPhiFields.size() == 1 ? " has" : "s have") + " a PHI level set")); + try { if (validationException.getErrors().isEmpty()) { - // Reorder the properties based on what we got from GWT + // Reorder the properties based on what the client sent Map dps = new HashMap<>(); for (DomainProperty dp : d.getProperties()) { @@ -1199,7 +1207,7 @@ private static List> updatePropertyValidators(DomainProperty if (v.getExtraProperties() != null && v.getExtraProperties().containsKey("valueUpdates")) { - if (v.getExtraProperties().get("valueUpdates").size() > 0) + if (!v.getExtraProperties().get("valueUpdates").isEmpty()) valueUpdates.add(v.getExtraProperties().get("valueUpdates")); } } @@ -1296,7 +1304,6 @@ private static void updateTextChoiceValueRows(Domain domain, User user, String p } } - @SuppressWarnings("unchecked") private static void _copyValidator(IPropertyValidator pv, GWTPropertyValidator gpv) { if (pv != null && gpv != null) @@ -1343,7 +1350,7 @@ public static ValidationException validateProperties(@Nullable Domain domain, @N String name = field.getName(); - if (null == name || name.trim().length() == 0) + if (null == name || name.trim().isEmpty()) { exception.addError(new SimpleValidationError(getDomainErrorMessage(updates,"Please provide a name for each field."))); continue; diff --git a/api/src/org/labkey/api/settings/SiteSettingsProperties.java b/api/src/org/labkey/api/settings/SiteSettingsProperties.java index 89e4b092463..cd9da396ffb 100644 --- a/api/src/org/labkey/api/settings/SiteSettingsProperties.java +++ b/api/src/org/labkey/api/settings/SiteSettingsProperties.java @@ -1,8 +1,6 @@ package org.labkey.api.settings; import org.apache.logging.log4j.Logger; -import org.labkey.api.security.AuthenticationManager; -import org.labkey.api.security.UserManager; import org.labkey.api.util.ExceptionReportingLevel; import org.labkey.api.util.SafeToRenderEnum; import org.labkey.api.util.UsageReportingLevel; diff --git a/core/package-lock.json b/core/package-lock.json index ea8d7139df8..e1eb52534b6 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -8,7 +8,7 @@ "name": "labkey-core", "version": "0.0.0", "dependencies": { - "@labkey/components": "6.8.0", + "@labkey/components": "6.11.3-fb-multifolder.0", "@labkey/themes": "1.4.0" }, "devDependencies": { @@ -3058,9 +3058,9 @@ } }, "node_modules/@labkey/components": { - "version": "6.8.0", - "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-6.8.0.tgz", - "integrity": "sha512-wHErvhP7+d0K6rrXUREgpzj5HjMJTfgQO3iJrg/wW9B9408mjMgtW76MGfjdn1haqepnbEIvUlA7u1Y5qS2X5A==", + "version": "6.11.3-fb-multifolder.0", + "resolved": "https://labkey.jfrog.io/artifactory/api/npm/libs-client/@labkey/components/-/@labkey/components-6.11.3-fb-multifolder.0.tgz", + "integrity": "sha512-PZsmWMNU7jTfEnuMo7MSOfQsRsKzFL9won1Nb5ShaxJv8KFu6+afRDX1f1OGdQ6mDNCfPeKFg3KiLwT4/esiGg==", "dependencies": { "@hello-pangea/dnd": "17.0.0", "@labkey/api": "1.37.0", diff --git a/core/package.json b/core/package.json index c9ae5452bf7..4554b207700 100644 --- a/core/package.json +++ b/core/package.json @@ -54,7 +54,7 @@ } }, "dependencies": { - "@labkey/components": "6.8.0", + "@labkey/components": "6.11.3-fb-multifolder.0", "@labkey/themes": "1.4.0" }, "devDependencies": { diff --git a/core/src/client/QueryMetadataEditor/QueryMetadataEditor.tsx b/core/src/client/QueryMetadataEditor/QueryMetadataEditor.tsx index 39882945147..ee1f63ca0b7 100644 --- a/core/src/client/QueryMetadataEditor/QueryMetadataEditor.tsx +++ b/core/src/client/QueryMetadataEditor/QueryMetadataEditor.tsx @@ -373,7 +373,6 @@ class QueryMetadataEditor extends PureComponent> { hideRequired: true, isDragDisabled: true, hideValidators: true, - phiLevelDisabled: true, hideAddFieldsButton: true, hideTextOptions: true, disableMvEnabled: true, diff --git a/experiment/resources/schemas/dbscripts/postgresql/exp-25.000-25.001.sql b/experiment/resources/schemas/dbscripts/postgresql/exp-25.000-25.001.sql new file mode 100644 index 00000000000..be881d8b99d --- /dev/null +++ b/experiment/resources/schemas/dbscripts/postgresql/exp-25.000-25.001.sql @@ -0,0 +1 @@ +ALTER TABLE exp.List ADD MultiFolder BOOLEAN NOT NULL DEFAULT FALSE; diff --git a/experiment/resources/schemas/dbscripts/sqlserver/exp-25.000-25.001.sql b/experiment/resources/schemas/dbscripts/sqlserver/exp-25.000-25.001.sql new file mode 100644 index 00000000000..16aca6cc1e0 --- /dev/null +++ b/experiment/resources/schemas/dbscripts/sqlserver/exp-25.000-25.001.sql @@ -0,0 +1 @@ +ALTER TABLE exp.List ADD MultiFolder BIT NOT NULL DEFAULT 0; diff --git a/experiment/resources/schemas/exp.xml b/experiment/resources/schemas/exp.xml index 257e5074782..756f5395001 100644 --- a/experiment/resources/schemas/exp.xml +++ b/experiment/resources/schemas/exp.xml @@ -248,6 +248,7 @@ + diff --git a/experiment/src/org/labkey/experiment/ExperimentModule.java b/experiment/src/org/labkey/experiment/ExperimentModule.java index 2ee50cd73ca..7e2db028da0 100644 --- a/experiment/src/org/labkey/experiment/ExperimentModule.java +++ b/experiment/src/org/labkey/experiment/ExperimentModule.java @@ -182,7 +182,7 @@ public String getName() @Override public Double getSchemaVersion() { - return 25.000; + return 25.001; } @Nullable @@ -824,7 +824,7 @@ public Collection getSummary(Container c) Collection list = new LinkedList<>(); int runGroupCount = ExperimentService.get().getExperiments(c, null, false, true).size(); if (runGroupCount > 0) - list.add("" + runGroupCount + " Run Group" + (runGroupCount > 1 ? "s" : "")); + list.add(runGroupCount + " Run Group" + (runGroupCount > 1 ? "s" : "")); User user = HttpView.currentContext().getUser(); diff --git a/experiment/src/org/labkey/experiment/api/DataClassDomainKind.java b/experiment/src/org/labkey/experiment/api/DataClassDomainKind.java index 6cf6ffb1002..ceb254d003b 100644 --- a/experiment/src/org/labkey/experiment/api/DataClassDomainKind.java +++ b/experiment/src/org/labkey/experiment/api/DataClassDomainKind.java @@ -21,7 +21,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.labkey.api.collections.CaseInsensitiveHashSet; -import org.labkey.api.compliance.ComplianceService; import org.labkey.api.data.Container; import org.labkey.api.data.ContainerFilter; import org.labkey.api.data.DbSchema; @@ -481,12 +480,6 @@ public boolean allowCalculatedFields() return true; } - @Override - public boolean supportsPhiLevel() - { - return ComplianceService.get().isComplianceSupported(); - } - @Override public boolean supportsNamingPattern() { diff --git a/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java b/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java index 9e0ac2b3f6d..cf26dcbf873 100644 --- a/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java +++ b/experiment/src/org/labkey/experiment/controllers/property/PropertyController.java @@ -503,7 +503,7 @@ public Object execute(DomainApiForm form, BindException errors) @Marshal(Marshaller.Jackson) @RequiresPermission(ReadPermission.class) //Real permissions will be enforced later on by the DomainKind - public class SaveDomainAction extends MutatingApiAction + public static class SaveDomainAction extends MutatingApiAction { //Keeping both request and response object mappers to avoid serialization/deserialization issues //as not sure if request object mapper is needed diff --git a/filecontent/src/org/labkey/filecontent/FilePropertiesDomainKind.java b/filecontent/src/org/labkey/filecontent/FilePropertiesDomainKind.java index b62130335ec..a90ebd42158 100644 --- a/filecontent/src/org/labkey/filecontent/FilePropertiesDomainKind.java +++ b/filecontent/src/org/labkey/filecontent/FilePropertiesDomainKind.java @@ -34,11 +34,6 @@ import java.util.List; import java.util.Set; -/** - * User: klum - * Date: May 4, 2010 - * Time: 4:24:36 PM - */ public class FilePropertiesDomainKind extends BaseAbstractDomainKind { private static final List RESERVED_FIELDS = Collections.unmodifiableList(Arrays.asList( @@ -125,7 +120,7 @@ public DefaultValueType getDefaultDefaultType(Domain domain) } @Override - public boolean supportsPhiLevel() + public boolean supportsPhiLevel(Domain domain) { return ComplianceService.get().isComplianceSupported(); } diff --git a/list/schemas/lists.xsd b/list/schemas/lists.xsd index ee54345ed56..ab279ca25d1 100644 --- a/list/schemas/lists.xsd +++ b/list/schemas/lists.xsd @@ -2,7 +2,7 @@ + elementFormDefault="qualified"> Describes the list settings, list-specific properties beyond those included in tableInfo.xsd. @@ -12,31 +12,32 @@ - + - - - - - + + + + + - - - - - + + + + + - - - - - - + + + + + + - - + + + diff --git a/list/src/org/labkey/list/model/ListDef.java b/list/src/org/labkey/list/model/ListDef.java index b9b0f1f79ed..33a4fef4119 100644 --- a/list/src/org/labkey/list/model/ListDef.java +++ b/list/src/org/labkey/list/model/ListDef.java @@ -61,6 +61,8 @@ public class ListDef extends Entity implements Cloneable, ListIndexingSettings protected boolean _fileAttachmentIndex = false; + protected boolean _multiFolder = false; + public int getListId() { return _listId; @@ -204,6 +206,11 @@ public boolean isFileAttachmentIndex() return _fileAttachmentIndex; } + public boolean isMultiFolder() + { + return _multiFolder; + } + public boolean isVisible(@Nullable User user) { // any user can see public picklists and lists that aren't picklists @@ -244,6 +251,7 @@ protected void copyTo(ListDef to) to._eachItemBodySetting = _eachItemBodySetting; to._eachItemBodyTemplate = _eachItemBodyTemplate; to._fileAttachmentIndex = _fileAttachmentIndex; + to._multiFolder = _multiFolder; } @Override @@ -276,6 +284,7 @@ public boolean equals(Object o) if (!Objects.equals(_entireListBodyTemplate, listDef._entireListBodyTemplate)) return false; if (!Objects.equals(_eachItemTitleTemplate, listDef._eachItemTitleTemplate)) return false; if (_eachItemBodySetting != listDef._eachItemBodySetting) return false; + if (_multiFolder != listDef._multiFolder) return false; return Objects.equals(_eachItemBodyTemplate, listDef._eachItemBodyTemplate); } @@ -306,6 +315,7 @@ public int hashCode() result = 31 * result + (_eachItemBodySetting != null ? _eachItemBodySetting.hashCode() : 0); result = 31 * result + (_eachItemBodyTemplate != null ? _eachItemBodyTemplate.hashCode() : 0); result = 31 * result + (_fileAttachmentIndex ? 1 : 0); + result = 31 * result + (_multiFolder ? 1 : 0); return result; } @@ -452,6 +462,7 @@ public void setFileAttachmentIndex(boolean index) { _fileAttachmentIndex = index; } + public void setMultiFolder(boolean multiFolder) { _multiFolder = multiFolder; } } static diff --git a/list/src/org/labkey/list/model/ListDefinitionImpl.java b/list/src/org/labkey/list/model/ListDefinitionImpl.java index 54349632940..9d7e0dd866f 100644 --- a/list/src/org/labkey/list/model/ListDefinitionImpl.java +++ b/list/src/org/labkey/list/model/ListDefinitionImpl.java @@ -366,6 +366,17 @@ public void setFileAttachmentIndex(boolean fileAttachmentIndex) edit().setFileAttachmentIndex(fileAttachmentIndex); } + @Override + public boolean getMultiFolder() + { + return _def.isMultiFolder(); + } + + @Override + public void setMultiFolder(boolean multiFolder) + { + edit().setMultiFolder(multiFolder); + } @Override public void save(User user) throws Exception diff --git a/list/src/org/labkey/list/model/ListDomainKind.java b/list/src/org/labkey/list/model/ListDomainKind.java index 2fdac89b394..a647c8d9d40 100644 --- a/list/src/org/labkey/list/model/ListDomainKind.java +++ b/list/src/org/labkey/list/model/ListDomainKind.java @@ -198,8 +198,6 @@ public Set getMandatoryPropertyNames(Domain domain) /** * Returns the List's primary key as a field to get special treatment elsewhere, despite being property driven. - * @param domain - * @return */ @Override public Set getAdditionalProtectedProperties(Domain domain) @@ -322,9 +320,9 @@ private static String getType(KeyType keyType, @Nullable ListDefinition.Category private static StringBuilder getBaseURI(String listName, String type, Container c) { return new StringBuilder("urn:lsid:") - .append(PageFlowUtil.encode(AppProps.getInstance().getDefaultLsidAuthority())) - .append(":").append(type).append(".Folder-").append(c.getRowId()).append(":") - .append(PageFlowUtil.encode(listName)); + .append(PageFlowUtil.encode(AppProps.getInstance().getDefaultLsidAuthority())) + .append(":").append(type).append(".Folder-").append(c.getRowId()).append(":") + .append(PageFlowUtil.encode(listName)); } @Override @@ -650,6 +648,7 @@ private ListDomainKindProperties updateListProperties(ListDomainKindProperties e updatedListProps.setEachItemIndex(newListProps.isEachItemIndex()); updatedListProps.setEachItemBodyTemplate(newListProps.getEachItemBodyTemplate()); updatedListProps.setFileAttachmentIndex(newListProps.isFileAttachmentIndex()); + updatedListProps.setMultiFolder(newListProps.isMultiFolder()); return updatedListProps; } @@ -733,14 +732,25 @@ public boolean matchesTemplateXML(String templateName, DomainTemplateType templa return type.equals(getDefaultKeyType().getPropertyType()); } - public void ensureBaseProperties(Domain d) + @Override + public boolean supportsPhiLevel(Domain domain) { - var props = getBaseProperties(d); + boolean phiLevelEnabled = false; + + if (ComplianceService.get().isComplianceSupported()) + { + ListDefinition list = ListService.get().getList(domain); + if (list != null) + phiLevelEnabled = !list.getMultiFolder(); + } + + return phiLevelEnabled; } @Override - public boolean supportsPhiLevel() + public String getPhiLevelUnsupportedReason(Domain domain) { - return ComplianceService.get().isComplianceSupported(); + ListDefinition list = ListService.get().getList(domain); + return list != null && list.getMultiFolder() ? "Multi-folder lists do not support PHI annotations" : super.getPhiLevelUnsupportedReason(domain); } } diff --git a/list/src/org/labkey/list/model/ListDomainKindProperties.java b/list/src/org/labkey/list/model/ListDomainKindProperties.java index 71bfb1e6604..e6a96b24c13 100644 --- a/list/src/org/labkey/list/model/ListDomainKindProperties.java +++ b/list/src/org/labkey/list/model/ListDomainKindProperties.java @@ -41,6 +41,8 @@ public class ListDomainKindProperties implements Cloneable, ListIndexingSettings private boolean fileAttachmentIndex = false; + private boolean multiFolder = false; + public ListDomainKindProperties() { } @@ -70,6 +72,7 @@ public ListDomainKindProperties(ListDomainKindProperties copyFrom) eachItemBodySetting = copyFrom.eachItemBodySetting; eachItemBodyTemplate = copyFrom.eachItemBodyTemplate; fileAttachmentIndex = copyFrom.fileAttachmentIndex; + multiFolder = copyFrom.multiFolder; } public int getListId() @@ -311,4 +314,14 @@ public void setFileAttachmentIndex(boolean fileAttachmentIndex) { this.fileAttachmentIndex = fileAttachmentIndex; } + + public boolean isMultiFolder() + { + return multiFolder; + } + + public void setMultiFolder(boolean multiFolder) + { + this.multiFolder = multiFolder; + } } diff --git a/list/src/org/labkey/list/model/ListImporter.java b/list/src/org/labkey/list/model/ListImporter.java index e68bd4d2d67..7f72f671f23 100644 --- a/list/src/org/labkey/list/model/ListImporter.java +++ b/list/src/org/labkey/list/model/ListImporter.java @@ -76,11 +76,6 @@ import java.util.Set; import java.util.stream.Collectors; -/* -* User: adam -* Date: Aug 27, 2009 -* Time: 2:12:01 PM -*/ public class ListImporter { private static final String TYPE_NAME_COLUMN = "ListName"; @@ -391,7 +386,7 @@ public void processMany(VirtualFile listsDir, Container c, User user, List 0) + if (!fileTypeMap.isEmpty()) { log.info("The following files were not imported because the server could not find a list with matching name: "); for (String s : fileTypeMap.keySet()) @@ -445,6 +440,8 @@ private boolean createNewList(Container c, User user, String listName, Collectio if (listSettingsXml.getCategory() != null) list.setCategory(ListDefinition.Category.valueOf(listSettingsXml.getCategory())); + list.setMultiFolder(listSettingsXml.getMultiFolder()); + // These settings have been ignored for years. Code remnants were removed for 23.7, Issue 48182. // TODO: Remove these XSD elements and warnings in 25.7 or before. if (listSettingsXml.isSetEntireListTitleSetting()) diff --git a/list/src/org/labkey/list/model/ListWriter.java b/list/src/org/labkey/list/model/ListWriter.java index ec2bb757018..b39ef876cec 100644 --- a/list/src/org/labkey/list/model/ListWriter.java +++ b/list/src/org/labkey/list/model/ListWriter.java @@ -77,11 +77,6 @@ import java.util.Set; import java.util.stream.Collectors; -/* -* User: adam -* Date: Aug 25, 2009 -* Time: 10:11:16 AM -*/ public class ListWriter { static final String SCHEMA_FILENAME = "lists.xml"; @@ -176,10 +171,10 @@ private void writeLists(List> listsToExport, Virtua if (!columns.isEmpty()) { List displayColumns = columns - .stream() - .filter(Objects::nonNull) - .map(ListExportDataColumn::new) - .collect(Collectors.toCollection(LinkedList::new)); + .stream() + .filter(Objects::nonNull) + .map(ListExportDataColumn::new) + .collect(Collectors.toCollection(LinkedList::new)); // Sort the data rows by PK, #11261 Sort sort = ti.getPkColumnNames().size() != 1 ? null : new Sort(ti.getPkColumnNames().get(0)); @@ -266,6 +261,7 @@ private void writeSettings(ListsDocument.Lists.List settings, ListDefinition def if (null != def.getCategory()) settings.setCategory(def.getCategory().toString()); if (def.getFileAttachmentIndex()) settings.setFileAttachmentIndex(def.getFileAttachmentIndex()); + if (def.getMultiFolder()) settings.setMultiFolder(def.getMultiFolder()); } private void writeAttachments(TableInfo ti, ListDefinition def, Container c, VirtualFile listsDir, PHI exportPhiLevel) throws SQLException, IOException diff --git a/query/src/org/labkey/query/MetadataTableJSON.java b/query/src/org/labkey/query/MetadataTableJSON.java index e8950025597..c16d5a7f4c1 100644 --- a/query/src/org/labkey/query/MetadataTableJSON.java +++ b/query/src/org/labkey/query/MetadataTableJSON.java @@ -639,6 +639,7 @@ public static MetadataTableJSON getMetadata(String schemaName, String tableName, metadataTableJSON.setSchemaName(schemaName); metadataTableJSON.setQueryName(tableName); metadataTableJSON.setName(tableName); + metadataTableJSON.setPhiLevelDisabledReason("Query metadata properties do not support PHI annotations"); UserSchema schema = QueryService.get().getUserSchema(user, container, schemaName); if (schema == null) diff --git a/study/src/org/labkey/study/model/DatasetDomainKind.java b/study/src/org/labkey/study/model/DatasetDomainKind.java index 39355ec9118..2e3c8a6016f 100644 --- a/study/src/org/labkey/study/model/DatasetDomainKind.java +++ b/study/src/org/labkey/study/model/DatasetDomainKind.java @@ -819,7 +819,7 @@ public void afterLoadTable(SchemaTableInfo ti, Domain domain) } @Override - public boolean supportsPhiLevel() + public boolean supportsPhiLevel(Domain domain) { return ComplianceService.get().isComplianceSupported(); }