This is an automated email from the ASF dual-hosted git repository.

yasith pushed a commit to branch worktree-cleanup+lean-core
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 7d8b1bf1c3e69582a1d9df7f2cb792811a0074b5
Author: yasithdev <[email protected]>
AuthorDate: Mon Mar 30 07:49:33 2026 -0400

    cleanup: remove remaining deprecated methods 
(getGatewayStorageResourcePreference, getAbsoluteSetting)
    
    - Delete getAbsoluteSetting() from ApplicationSettings — no external 
callers, only self-recursive; also removes dead private helpers getAllMatches, 
getVariableNameOnly, REGULAR_EXPRESSION constant, and unused Matcher import
    - Un-deprecate getGatewayStorageResourcePreference() in TaskContext — still 
needed as the default fallback for 
getStorageResourceId/LoginUserName/FileSystemRootLocation; replacement variants 
(input/output specific) delegate back to it
    
    Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
 .../common/config/ApplicationSettings.java         | 48 ----------------------
 .../execution/orchestrator/TaskContext.java        |  5 +--
 2 files changed, 1 insertion(+), 52 deletions(-)

diff --git 
a/airavata-api/src/main/java/org/apache/airavata/common/config/ApplicationSettings.java
 
b/airavata-api/src/main/java/org/apache/airavata/common/config/ApplicationSettings.java
index d64ea0be69..892c5627d7 100644
--- 
a/airavata-api/src/main/java/org/apache/airavata/common/config/ApplicationSettings.java
+++ 
b/airavata-api/src/main/java/org/apache/airavata/common/config/ApplicationSettings.java
@@ -26,7 +26,6 @@ import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.*;
-import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.util.StringUtil;
@@ -44,8 +43,6 @@ public class ApplicationSettings {
 
     private Exception propertyLoadException;
 
-    private static final String REGULAR_EXPRESSION = "\\$\\{[a-zA-Z.-]*\\}";
-
     private static final Logger logger = 
LoggerFactory.getLogger(ApplicationSettings.class);
 
     private static final String SHUTDOWN_STATEGY_STRING = "shutdown.strategy";
@@ -133,51 +130,6 @@ public class ApplicationSettings {
         }
     }
 
-    /**
-     * Returns the configuration value relevant for the given key.
-     * If configuration value contains references to other configuration 
values they will also
-     * be replaced. E.g :- If configuration key reads 
http://${ip}:${port}/axis2/services/RegistryService?wsdl,
-     * the variables ip and port will get replaced by their appropriated 
values in the configuration.
-     * @param key The configuration key to read value of
-     * @return The configuration value. For above example caller will get a 
value like
-     * http://192.2.33.12:8080/axis2/services/RegistryService?wsdl
-     * @throws ApplicationSettingsException If an error occurred while reading 
configurations.
-     * @deprecated use #getSetting(String) instead
-     */
-    @Deprecated
-    public String getAbsoluteSetting(String key) throws 
ApplicationSettingsException {
-
-        String configurationValueWithVariables = 
ApplicationSettings.getSetting(key);
-
-        List<String> variableList = 
getAllMatches(configurationValueWithVariables, REGULAR_EXPRESSION);
-
-        if (variableList == null || variableList.isEmpty()) {
-            return configurationValueWithVariables;
-        }
-
-        for (String variableIdentifier : variableList) {
-            String variableName = getVariableNameOnly(variableIdentifier);
-            String value = getAbsoluteSetting(variableName);
-
-            configurationValueWithVariables = 
configurationValueWithVariables.replace(variableIdentifier, value);
-        }
-
-        return configurationValueWithVariables;
-    }
-
-    private static String getVariableNameOnly(String variableWithIdentifiers) {
-        return variableWithIdentifiers.substring(2, 
(variableWithIdentifiers.length() - 1));
-    }
-
-    private static List<String> getAllMatches(String text, String regex) {
-        List<String> matches = new ArrayList<String>();
-        Matcher m = Pattern.compile("(?=(" + regex + "))").matcher(text);
-        while (m.find()) {
-            matches.add(m.group(1));
-        }
-        return matches;
-    }
-
     public String getSettingImpl(String key) throws 
ApplicationSettingsException {
         String rawValue;
         if (System.getProperties().containsKey(key)) {
diff --git 
a/airavata-api/src/main/java/org/apache/airavata/execution/orchestrator/TaskContext.java
 
b/airavata-api/src/main/java/org/apache/airavata/execution/orchestrator/TaskContext.java
index 99dc6ca615..d52a9e975b 100644
--- 
a/airavata-api/src/main/java/org/apache/airavata/execution/orchestrator/TaskContext.java
+++ 
b/airavata-api/src/main/java/org/apache/airavata/execution/orchestrator/TaskContext.java
@@ -333,11 +333,8 @@ public class TaskContext {
     /**
      * Returns the default storage preference for the gateway.
      * Prefers gateway-specific storage (ID starting with gatewayId), 
otherwise uses the first available preference.
-     *
-     * @deprecated Use {@link #getInputGatewayStorageResourcePreference()} for 
input staging operations
-     *             or {@link #getOutputGatewayStorageResourcePreference()} for 
output staging operations.
+     * Used as the fallback when no specific input/output storage resource is 
configured.
      */
-    @Deprecated
     public StoragePreference getGatewayStorageResourcePreference() throws 
Exception {
         if (this.gatewayStorageResourcePreference == null) {
             try {

Reply via email to