Skip to content

Commit 578e9f8

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fb_audit_union_query
2 parents a9807aa + 1853b88 commit 578e9f8

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

experiment/src/org/labkey/experiment/controllers/property/PropertyController.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,18 @@ public Object execute(DomainApiForm form, BindException errors)
521521
DomainKind kind = PropertyService.get().getDomainKindByName(kindName);
522522
if (kind == null)
523523
throw new IllegalArgumentException("No domain kind matches name '" + kindName + "'");
524-
String typeURI = "urn:lsid:labkey.com:" + kindName + ".Folder-1000.1001:1002"; // note using a fake lsid here, since not all domain kinds override generateDomainURI
525-
Domain domain = PropertyService.get().createDomain(getContainer(), typeURI, "test");
524+
525+
// try using the DomainKind to generate a domain URI, if it supports it. default to using a fake / representative URI
526+
String typeURI = null;
527+
try
528+
{
529+
typeURI = kind.generateDomainURI("schemaName", "queryName", getContainer(), getUser());
530+
}
531+
catch (AssertionError ignored) {} // no-op if the DomainKind does not support generateDomainURI()
532+
if (typeURI == null)
533+
typeURI = "urn:lsid:labkey.com:" + kindName + ".Folder-21085:Test+Domain+Name-115c61b7-4faa-103e-8e7f-a47ad552213c";
534+
535+
Domain domain = PropertyService.get().createDomain(getContainer(), typeURI, "queryName");
526536

527537
boolean checkFieldNames = !domainDesign.getFields().isEmpty();
528538
boolean checkDomainName = domainDesign.getName() != null;

search/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
id 'org.labkey.build.module'
66
}
77

8-
ext.mime4jVersion="0.8.12"
8+
ext.mime4jVersion="0.8.13"
99

1010
dependencies {
1111
BuildUtils.addExternalDependency(

0 commit comments

Comments
 (0)