-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
137 changed files
with
1,741 additions
and
1,562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import org.labkey.gradle.util.BuildUtils | ||
|
||
plugins { | ||
id 'org.labkey.build.module' | ||
} | ||
|
||
dependencies { | ||
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:DiscvrLabKeyModules:discvrcore", depProjectConfig: "published", depExtension: "module") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ModuleClass: org.labkey.queryextensions.QueryExtensionsModule | ||
Label: Query Extensions | ||
Description: This module contains low-level extensions to the LabKey Query layer | ||
License: Apache 2.0 | ||
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0 |
19 changes: 19 additions & 0 deletions
19
QueryExtensions/resources/schemas/dbscripts/postgresql/queryextensions-0.00-23.000.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (c) 2023 LabKey Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
-- Create schema, tables, indexes, and constraints used for QueryExtensions module here | ||
-- All SQL VIEW definitions should be created in queryextensions-create.sql and dropped in queryextensions-drop.sql | ||
CREATE SCHEMA queryextensions; |
20 changes: 20 additions & 0 deletions
20
QueryExtensions/resources/schemas/dbscripts/sqlserver/queryextensions-0.00-23.000.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) 2023 LabKey Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
-- Create schema, tables, indexes, and constraints used for QueryExtensions module here | ||
-- All SQL VIEW definitions should be created in queryextensions-create.sql and dropped in queryextensions-drop.sql | ||
CREATE SCHEMA queryextensions; | ||
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
* Copyright (c) 2023 LabKey Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
--> | ||
<tables xsi:schemaLocation="http://labkey.org/data/xml ..\..\..\..\schemas\tableInfo.xsd" | ||
xmlns="http://labkey.org/data/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/> |
37 changes: 37 additions & 0 deletions
37
QueryExtensions/src/org/labkey/queryextensions/QueryExtensionsController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (c) 2023 LabKey Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.labkey.queryextensions; | ||
|
||
import org.labkey.api.action.SimpleViewAction; | ||
import org.labkey.api.action.SpringActionController; | ||
import org.labkey.api.security.RequiresPermission; | ||
import org.labkey.api.security.permissions.ReadPermission; | ||
import org.labkey.api.view.JspView; | ||
import org.labkey.api.view.NavTree; | ||
import org.springframework.validation.BindException; | ||
import org.springframework.web.servlet.ModelAndView; | ||
|
||
public class QueryExtensionsController extends SpringActionController | ||
{ | ||
private static final DefaultActionResolver _actionResolver = new DefaultActionResolver(QueryExtensionsController.class); | ||
public static final String NAME = "queryextensions"; | ||
|
||
public QueryExtensionsController() | ||
{ | ||
setActionResolver(_actionResolver); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
QueryExtensions/src/org/labkey/queryextensions/QueryExtensionsManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2023 LabKey Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.labkey.queryextensions; | ||
|
||
public class QueryExtensionsManager | ||
{ | ||
private static final QueryExtensionsManager _instance = new QueryExtensionsManager(); | ||
|
||
private QueryExtensionsManager() | ||
{ | ||
|
||
} | ||
|
||
public static QueryExtensionsManager get() | ||
{ | ||
return _instance; | ||
} | ||
} |
84 changes: 84 additions & 0 deletions
84
QueryExtensions/src/org/labkey/queryextensions/QueryExtensionsModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* Copyright (c) 2023 LabKey Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.labkey.queryextensions; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.labkey.api.data.Container; | ||
import org.labkey.api.module.DefaultModule; | ||
import org.labkey.api.module.ModuleContext; | ||
import org.labkey.api.view.WebPartFactory; | ||
|
||
import java.util.Collection; | ||
import java.util.Collections; | ||
import java.util.Set; | ||
|
||
public class QueryExtensionsModule extends DefaultModule | ||
{ | ||
public static final String NAME = "QueryExtensions"; | ||
|
||
@Override | ||
public String getName() | ||
{ | ||
return NAME; | ||
} | ||
|
||
@Override | ||
public @Nullable Double getSchemaVersion() | ||
{ | ||
return 23.000; | ||
} | ||
|
||
@Override | ||
public boolean hasScripts() | ||
{ | ||
return true; | ||
} | ||
|
||
@Override | ||
@NotNull | ||
protected Collection<WebPartFactory> createWebPartFactories() | ||
{ | ||
return Collections.emptyList(); | ||
} | ||
|
||
@Override | ||
protected void init() | ||
{ | ||
addController(QueryExtensionsController.NAME, QueryExtensionsController.class); | ||
} | ||
|
||
@Override | ||
public void doStartup(ModuleContext moduleContext) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
@NotNull | ||
public Collection<String> getSummary(Container c) | ||
{ | ||
return Collections.emptyList(); | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public Set<String> getSchemaNames() | ||
{ | ||
return Collections.singleton(QueryExtensionsSchema.NAME); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
QueryExtensions/src/org/labkey/queryextensions/QueryExtensionsSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2023 LabKey Corporation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.labkey.queryextensions; | ||
|
||
import org.labkey.api.data.DbSchema; | ||
import org.labkey.api.data.DbSchemaType; | ||
import org.labkey.api.data.dialect.SqlDialect; | ||
|
||
public class QueryExtensionsSchema | ||
{ | ||
private static final QueryExtensionsSchema _instance = new QueryExtensionsSchema(); | ||
public static final String NAME = "queryextensions"; | ||
|
||
public static QueryExtensionsSchema getInstance() | ||
{ | ||
return _instance; | ||
} | ||
|
||
private QueryExtensionsSchema() | ||
{ | ||
// private constructor to prevent instantiation from | ||
// outside this class: this singleton should only be | ||
// accessed via org.labkey.queryextensions.QueryExtensionsSchema.getInstance() | ||
} | ||
|
||
public DbSchema getSchema() | ||
{ | ||
return DbSchema.get(NAME, DbSchemaType.Module); | ||
} | ||
|
||
public SqlDialect getSqlDialect() | ||
{ | ||
return getSchema().getSqlDialect(); | ||
} | ||
} |
Oops, something went wrong.