Class EnvironmentVariableService

java.lang.Object
org.qubership.atp.itf.lite.backend.service.EnvironmentVariableService

@Service public class EnvironmentVariableService extends Object
  • Constructor Details

    • EnvironmentVariableService

      public EnvironmentVariableService()
  • Method Details

    • resolveEnvironmentParameters

      public void resolveEnvironmentParameters(OAuth2AuthorizationSaveRequest request, UUID environmentId) throws org.qubership.atp.crypt.exception.AtpDecryptException
      Resolve environment parameters values in OAuth2Authorization request.
      Parameters:
      request - OAuth2 authorization request
      Throws:
      org.qubership.atp.crypt.exception.AtpDecryptException
    • resolveEnvironmentParameters

      public void resolveEnvironmentParameters(BearerAuthorizationSaveRequest request, UUID environmentId) throws org.qubership.atp.crypt.exception.AtpDecryptException
      Resolve environment parameters values in BearerAuthorizationSaveRequest request.
      Parameters:
      request - Bearer authorization request
      Throws:
      org.qubership.atp.crypt.exception.AtpDecryptException
    • resolveEnvironmentParameters

      public void resolveEnvironmentParameters(List<String> resolvableFields, Map<org.codehaus.commons.compiler.util.Producer<String>,Consumer<String>> resolveMap, UUID environmentId) throws org.qubership.atp.crypt.exception.AtpDecryptException
      Resolve environment parameters values in auth request.
      Throws:
      org.qubership.atp.crypt.exception.AtpDecryptException
    • resolveEnvironmentParameters

      public void resolveEnvironmentParameters(HttpRequestEntitySaveRequest httpRequest, boolean onlyEncrypted, UUID environmentId) throws org.qubership.atp.crypt.exception.AtpDecryptException
      Resolve environment parameters values in http requests.
      Parameters:
      httpRequest - http request
      Throws:
      org.qubership.atp.crypt.exception.AtpDecryptException
    • getEnvironmentSystemsById

      public List<System> getEnvironmentSystemsById(UUID environmentId)
    • isEnvironmentVariablesPresent

      public boolean isEnvironmentVariablesPresent(Collection<String> params)
      Check if environment variables present in specified parameters.
      Parameters:
      params - parameters
      Returns:
      check result
    • isEnvironmentVariablesPresent

      public boolean isEnvironmentVariablesPresent(HttpRequestEntitySaveRequest httpRequest)
      Checks if http request contains at least one environment variable.
      Parameters:
      httpRequest - http request
      Returns:
      true if http request contains at least one environment variable
    • isEncryptedEnvironmentVariablesPresent

      public boolean isEncryptedEnvironmentVariablesPresent(HttpRequestEntitySaveRequest httpRequest)
      Checks if http request contains at least one encrypted environment variable.
      Parameters:
      httpRequest - http request
      Returns:
      true if http request contains at least one environment variable
    • encodeParameterExceptEnv

      public String encodeParameterExceptEnv(String parameter) throws UnsupportedEncodingException
      Encode parameter special characters except environments.
      Parameters:
      parameter - request parameter
      Returns:
      encoded parameter
      Throws:
      UnsupportedEncodingException - possible encoding exception