Class AbsolutePathBuilder

java.lang.Object
research.ch.cern.unicos.utilities.AbsolutePathBuilder

@Service public class AbsolutePathBuilder extends Object
Class to build absolute paths from the UnicosApplication.xml parameters.
If the parameter contains to a relative path, the class will build the absolute path using the path of the UnicosApplication.xml file.
Author:
Ivan Prieto Barreiro
  • Constructor Details

    • AbsolutePathBuilder

      public AbsolutePathBuilder()
  • Method Details

    • getTechnicalPathParameter

      public static String getTechnicalPathParameter(String paramLocation)
      Method used to get the absolute path of a UnicosApplication.xml technical PathParameter. If the PathParameter refers to a relative path, the method will build the full path taking the UnicosApplicationConfig path.
      Parameters:
      paramLocation - Parameter location in the plug-in parameters of the UnicosApplicationConfig.
      Returns:
      The absolute path of the PathParameter.
    • getTechnicalPathParameter

      public static String getTechnicalPathParameter(String paramLocation, String... otherParamLocations)
      Method used to get the absolute concatenated path of UnicosApplication.xml technical PathParameters. If the PathParameters refers to a relative path, the method will build the full path taking the UnicosApplicationConfig path.
      Parameters:
      paramLocation - Parameter location in the plug-in parameter of the UnicosApplicationConfig.
      otherParamLocations - Parameters location in the plug-in parameters of the UnicosApplicationConfig.
      Returns:
      The absolute path of the PathParameters.
    • getApplicationPathParameter

      public static String getApplicationPathParameter(String paramLocation)
      Method used to get the absolute path of a UnicosApplication.xml application PathParameter. If the PathParameter refers to a relative path, the method will build the full path taking the UnicosApplicationConfig path.
      Parameters:
      paramLocation - Parameter location in the plug-in parameters of the UnicosApplicationConfig.
      Returns:
      The absolute path of the PathParameter.
    • getAbsolutePath

      public static String getAbsolutePath(String path)
      Build an absolute path from the relative path provided as parameter.
      Parameters:
      path - Relative path from the application location.
      Returns:
      The absolute path of the PathParameter.
    • setCoreManager

      public void setCoreManager(research.ch.cern.unicos.core.CoreManager coreManager)
      Parameters:
      coreManager - to be used by the instance.