Class PathUtils
- java.lang.Object
-
- com.priint.pubserver.comet.util.PathUtils
-
public class PathUtils extends java.lang.ObjectUtilities connected to path
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPathUtils.PathInfoThe type Path info.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPATH_DELIMITERThe constant PATH_DELIMITER "/".
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.Class<? extends CometEntity>getClassByAbsoluteOldPath(java.lang.String path)Deprecated.static java.lang.Class<? extends CometEntity>getClassByAbsolutePath(java.lang.String path)Gets class by absolute path.static java.lang.Class<? extends CometEntity>getClassByProjectRelativePath(java.lang.String path)Gets class by project relative path.static java.lang.Class<? extends CometEntity>getConfigClass(PluginConfigDataHandler container)Gets config class.static java.util.List<java.lang.String>getDetailedProjectLayout()Gets detailed project layout.static java.lang.String[]getFolderAndFilename(java.lang.String path)Get folder and filename string [ ].static PathUtils.PathInfogetPathInfo(java.lang.String absolutePath)Gets path info.static PathUtils.PathInfogetPathInfoFromOldStructure(java.lang.String absolutePath)Deprecated.static java.util.List<java.lang.String>getProjectLayout()Gets project layout.static java.lang.StringgetProjectRelativeContainerPath(int id, java.lang.Class<? extends CometEntity> clazz)Gets project relative container path.static java.lang.StringgetProjectRelativeContainerPath(PluginConfigDataHandler container)Gets project relative container path.static java.lang.StringgetProjectRelativeContainerRoot(java.lang.Class<? extends CometEntity> clazz)Gets project relative container root.static booleanisApplicationConfigFile(java.lang.String absolutePath)Deprecated.static booleanisNullFilename(java.lang.String path)Deprecated.static java.lang.StringnormalizePath(java.lang.String path)Normalize path string.static java.lang.StringtranslateToNewPath(java.lang.String absolutePath)Deprecated.
-
-
-
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
-
getConfigClass
public static java.lang.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 java.lang.String getProjectRelativeContainerPath(int id, java.lang.Class<? extends CometEntity> clazz) throws CometExceptionGets project relative container path.- Parameters:
id- the idclazz- 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 CometExceptionGets 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.
-
-