Class PathUtils


  • public class PathUtils
    extends java.lang.Object
    Utilities connected to path
    • Field Detail

      • PATH_DELIMITER

        public static final java.lang.String PATH_DELIMITER
        The constant PATH_DELIMITER "/".
        See Also:
        Constant Field Values
    • Method Detail

      • isApplicationConfigFile

        @Deprecated
        public static boolean isApplicationConfigFile​(java.lang.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​(java.lang.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​(java.lang.String absolutePath)
        Gets path info.
        Parameters:
        absolutePath - the absolute path
        Returns:
        the path info
      • translateToNewPath

        @Deprecated
        public static java.lang.String translateToNewPath​(java.lang.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 java.lang.String normalizePath​(java.lang.String path)
        Normalize path string.
        Parameters:
        path - the path
        Returns:
        the string
      • getClassByAbsoluteOldPath

        @Deprecated
        public static java.lang.Class<? extends CometEntity> getClassByAbsoluteOldPath​(java.lang.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 java.lang.Class<? extends CometEntity> getClassByAbsolutePath​(java.lang.String path)
        Gets class by absolute path.
        Parameters:
        path - the path
        Returns:
        the class by absolute path
      • getClassByProjectRelativePath

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

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

        public static final java.lang.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
      • getProjectRelativeContainerPath

        public static final java.lang.String getProjectRelativeContainerPath​(int id,
                                                                             java.lang.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 java.util.List<java.lang.String> getProjectLayout()
        Gets project layout.
        Returns:
        the project layout
      • getDetailedProjectLayout

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

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

        @Deprecated
        public static boolean isNullFilename​(java.lang.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.