Class PathUtils

java.lang.Object
com.priint.pubserver.comet.util.PathUtils

public class PathUtils extends Object
Utilities connected to path
  • Field Details

  • Method Details

    • isApplicationConfigFile

      @Deprecated public static boolean isApplicationConfigFile(String absolutePath)
      Deprecated.

      Checks, if a path denotes the application configuration file.

      Since the "application configuration resource" was never implemented, this method is deprecated and will be removed from the SDK in 4.1.6

      Parameters:
      absolutePath - absolute path of the repository resource
      Returns:
      true, if the file is a "application configuration file", false otherwise
    • getPathInfoFromOldStructure

      @Deprecated public static PathUtils.PathInfo getPathInfoFromOldStructure(String absolutePath)
      Deprecated.

      Gets the path info from an old repository structure.

      Since automatic updates of old repositories isn't supported any more, this method is obsolete and will be removed from the SDK in 4.1.6

      Parameters:
      absolutePath - absolute path of the repository resource
      Returns:
      PathInfo object
    • getPathInfo

      public static PathUtils.PathInfo getPathInfo(String absolutePath)
      Gets path info.
      Parameters:
      absolutePath - the absolute path
      Returns:
      the path info
    • translateToNewPath

      @Deprecated public static String translateToNewPath(String absolutePath)
      Deprecated.

      Gets the new path for a repository resource stored in old structure.

      Since automatic updates of old repositories isn't supported any more, this method is obsolete and will be removed from the SDK in 4.1.6

      Parameters:
      absolutePath - absolute path of the repository resource
      Returns:
      new path for this repository resource
    • normalizePath

      public static String normalizePath(String path)
      Normalize path string.
      Parameters:
      path - the path
      Returns:
      the string
    • getClassByAbsoluteOldPath

      @Deprecated public static Class<? extends CometEntity> getClassByAbsoluteOldPath(String path)
      Deprecated.

      Gets the configuration class from an old repository structure.

      Since automatic updates of old repositories isn't supported any more, this method is obsolete and will be removed from the SDK in 4.1.6

      Parameters:
      path - absolute path of the repository resource
      Returns:
      PathInfo object
    • getClassByAbsolutePath

      public static Class<? extends CometEntity> getClassByAbsolutePath(String path)
      Gets class by absolute path.
      Parameters:
      path - the path
      Returns:
      the class by absolute path
    • getClassByProjectRelativePath

      public static Class<? extends CometEntity> getClassByProjectRelativePath(String path)
      Gets class by project relative path.
      Parameters:
      path - the path
      Returns:
      the class by project relative path
    • getProjectRelativeContainerRoot

      public static String getProjectRelativeContainerRoot(Class<? extends CometEntity> clazz)
      Gets project relative container root.
      Parameters:
      clazz - the class
      Returns:
      the project relative container root
    • getProjectRelativeContainerPath

      public static final String getProjectRelativeContainerPath(PluginConfigDataHandler container) throws CometException
      Gets project relative container path.
      Parameters:
      container - the container
      Returns:
      the project relative container path
      Throws:
      CometException - the comet exception
    • getConfigClass

      public static Class<? extends CometEntity> getConfigClass(PluginConfigDataHandler container) throws CometException
      Gets config class.
      Parameters:
      container - the container
      Returns:
      the config class
      Throws:
      CometException - the comet exception
    • getProjectRelativeContainerPath

      public static final String getProjectRelativeContainerPath(int id, Class<? extends CometEntity> clazz) throws CometException
      Gets project relative container path.
      Parameters:
      id - the id
      clazz - the class
      Returns:
      the project relative container path
      Throws:
      CometException - the comet exception
    • getProjectLayout

      public static List<String> getProjectLayout()
      Gets project layout.
      Returns:
      the project layout
    • getDetailedProjectLayout

      public static List<String> getDetailedProjectLayout() throws CometException
      Gets detailed project layout.
      Returns:
      the detailed project layout
      Throws:
      CometException - the comet exception
    • getFolderAndFilename

      public static String[] getFolderAndFilename(String path)
      Get folder and filename string [ ].
      Parameters:
      path - the path
      Returns:
      the string [ ]
    • isNullFilename

      @Deprecated public static boolean isNullFilename(String path)
      Deprecated.

      Checks, if the file name of a configuration resource is "0.xml".

      Since this method was never used, it will be removed from the SDK in 4.1.6

      Parameters:
      path - absolute path of the repository resource
      Returns:
      true, if the filename is "0.xml", false otherwise.