diff --git a/modules/org.jkiss.utils/META-INF/MANIFEST.MF b/modules/org.jkiss.utils/META-INF/MANIFEST.MF index f85d528..c99a4fb 100644 --- a/modules/org.jkiss.utils/META-INF/MANIFEST.MF +++ b/modules/org.jkiss.utils/META-INF/MANIFEST.MF @@ -8,6 +8,7 @@ Bundle-Release-Date: 20240205 Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: com.google.gson Export-Package: org.jkiss.api, + org.jkiss.api.verification, org.jkiss.code, org.jkiss.utils, org.jkiss.utils.csv, diff --git a/modules/org.jkiss.utils/src/org/jkiss/api/ObjectWithContextParameters.java b/modules/org.jkiss.utils/src/org/jkiss/api/ObjectWithContextParameters.java index 8192516..3acd2e0 100644 --- a/modules/org.jkiss.utils/src/org/jkiss/api/ObjectWithContextParameters.java +++ b/modules/org.jkiss.utils/src/org/jkiss/api/ObjectWithContextParameters.java @@ -25,7 +25,6 @@ * Object with contextual information */ public interface ObjectWithContextParameters { - @NotNull Map getObjectContextParameters(); diff --git a/modules/org.jkiss.utils/src/org/jkiss/api/verification/FileSystemAccessVerifyer.java b/modules/org.jkiss.utils/src/org/jkiss/api/verification/FileSystemAccessVerifyer.java new file mode 100644 index 0000000..ced64f4 --- /dev/null +++ b/modules/org.jkiss.utils/src/org/jkiss/api/verification/FileSystemAccessVerifyer.java @@ -0,0 +1,29 @@ +/* + * DBeaver - Universal Database Manager + * Copyright (C) 2010-2024 DBeaver Corp and others + * + * 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.jkiss.api.verification; + +import org.jkiss.code.NotNull; + +import java.nio.file.Path; + +public interface FileSystemAccessVerifyer { + /** + * @param path - the path the object is trying to access + * @return true if access is allowed + */ + boolean isPathReadAllowed(@NotNull Path path); +} diff --git a/modules/org.jkiss.utils/src/org/jkiss/api/verification/ObjectWithVerification.java b/modules/org.jkiss.utils/src/org/jkiss/api/verification/ObjectWithVerification.java new file mode 100644 index 0000000..2d37c58 --- /dev/null +++ b/modules/org.jkiss.utils/src/org/jkiss/api/verification/ObjectWithVerification.java @@ -0,0 +1,22 @@ +/* + * DBeaver - Universal Database Manager + * Copyright (C) 2010-2024 DBeaver Corp and others + * + * 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.jkiss.api.verification; + +public interface ObjectWithVerification { + String CONTEXT_PARAMETER_FILE_SYSTEM_VERIFIER = "fs.verifier"; + +}