Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions api/src/org/labkey/api/query/DefaultSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ static public DefaultSchema get(User user, Container container)
/**
* Get QuerySchema for SchemaKey encoded schema path.
*
* @param user
* @param container
* @param schemaPath SchemaKey encoded schema path.
* @return The QuerySchema resolved by the schema path.
* @see QueryService#getUserSchema(org.labkey.api.security.User, org.labkey.api.data.Container, String)
Expand All @@ -171,8 +169,6 @@ static public QuerySchema get(User user, Container container, String schemaPath)
/**
* Get QuerySchema for SchemaKey schema path.
*
* @param user
* @param container
* @param schemaPath SchemaKey schema path.
* @return The QuerySchema resolved by the schema path.
* @see QueryService#getUserSchema(org.labkey.api.security.User, org.labkey.api.data.Container, String)
Expand Down Expand Up @@ -256,7 +252,16 @@ private QuerySchema _getSchema(@NotNull String name)

SchemaProvider provider = _providers.get(name);
if (provider != null)
return provider.getSchema(this);
{
QuerySchema result = provider.getSchema(this);
// Not all providers will be enabled in the current folder. For example, some are based on whether
// the module is enabled or not. If they don't resolve the schema, pass through to let dynamic providers
// (like linked schemas) claim the same name. This is helpful for automated testing.
if (result != null)
{
return result;
}
}

if (name.startsWith("/"))
{
Expand Down Expand Up @@ -325,7 +330,6 @@ public Set<String> getSchemaNames()

/**
* Get immediate UserSchema children names.
* @return
*/
public Set<String> getUserSchemaNames(boolean includeHidden)
{
Expand Down Expand Up @@ -356,7 +360,7 @@ public Set<String> getUserSchemaNames(boolean includeHidden)
*/
public Set<SchemaKey> getUserSchemaPaths(boolean includeHidden)
{
SimpleSchemaTreeVisitor<Set<SchemaKey>, Void> visitor = new SimpleSchemaTreeVisitor<Set<SchemaKey>, Void>(includeHidden)
SimpleSchemaTreeVisitor<Set<SchemaKey>, Void> visitor = new SimpleSchemaTreeVisitor<>(includeHidden)
{
@Override
public Set<SchemaKey> reduce(Set<SchemaKey> r1, Set<SchemaKey> r2)
Expand Down Expand Up @@ -410,7 +414,7 @@ public <R, P> R accept(SchemaTreeVisitor<R, P> visitor, SchemaTreeVisitor.Path p
}

@Override
public VisualizationProvider createVisualizationProvider()
public VisualizationProvider<?> createVisualizationProvider()
{
return null;
}
Expand Down