Package lumis.portal.filesystem
Enum PortalBaseFolder
- java.lang.Object
-
- java.lang.Enum<PortalBaseFolder>
-
- lumis.portal.filesystem.PortalBaseFolder
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PortalBaseFolder>
,IPortalBaseFolder
@StableMinor(version="15.0", sinceVersion="4.1") public enum PortalBaseFolder extends java.lang.Enum<PortalBaseFolder> implements IPortalBaseFolder
Specifies a portal standard base folder. Also provides conversions between relative paths and absolute paths for each base folder.- Since:
- 4.1.0
- Version:
- $Revision: 25303 $ $Date: 2022-10-22 22:48:02 -0300 (Sat, 22 Oct 2022) $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DATA
Indicates the path is relative to the portal data (lumisdata/shared/data) folder.DEF
Indicates the path is relative to the portal definition (lumisdata/shared/def) folder.SERVER_BASE_SOURCE_PATH
Indicates the path is relative to the portal base source folder.WWW
Deprecated.Since 6.2.0, replaced byIWebsite.getWebRootBaseFolder()
due to the inclusion of multiple websites, and consequently, multiple web roots.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getAbsolutePath(java.lang.String relativePath)
Deprecated.since 8.0.0 it is not recommended to be used anymore due to the filesystem abstraction layer.java.lang.String
getRelativePath(java.lang.String absolutePath)
Deprecated.since 8.0.0 it is not recommended to be used anymore due to the filesystem abstraction layer.PortalFilePath
toPortalFilePath(java.lang.String relativePath)
Returns a newPortalFilePath
using this base folder and the given relative path.static PortalBaseFolder
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PortalBaseFolder[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface lumis.portal.filesystem.IPortalBaseFolder
equals, toString
-
-
-
-
Enum Constant Detail
-
WWW
@Deprecated public static final PortalBaseFolder WWW
Deprecated.Since 6.2.0, replaced byIWebsite.getWebRootBaseFolder()
due to the inclusion of multiple websites, and consequently, multiple web roots.For best compatibility, this enumeration value refers to the default website's web root folder. If there is no default website, it will cause an exception when converting the paths.
Indicates the path is relative to the portal WWW (web root) folder.- Since:
- 4.1.0
-
DATA
public static final PortalBaseFolder DATA
Indicates the path is relative to the portal data (lumisdata/shared/data) folder.- Since:
- 4.1.0
-
DEF
public static final PortalBaseFolder DEF
Indicates the path is relative to the portal definition (lumisdata/shared/def) folder.- Since:
- 4.1.0
-
SERVER_BASE_SOURCE_PATH
public static final PortalBaseFolder SERVER_BASE_SOURCE_PATH
Indicates the path is relative to the portal base source folder. Uses theServerConfiguration.getBaseSourcePath()
. If it is not defined, uselumisData
instead.- Since:
- 7.1.0
-
-
Method Detail
-
values
public static PortalBaseFolder[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PortalBaseFolder c : PortalBaseFolder.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PortalBaseFolder valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getAbsolutePath
@Deprecated public java.lang.String getAbsolutePath(java.lang.String relativePath)
Deprecated.since 8.0.0 it is not recommended to be used anymore due to the filesystem abstraction layer. Every file operation should use theIFile
interface, that can be obtained fromIFileSystemManager.getFile(PortalFilePath)
. The direct usage of Java file API can produce unpredictable portal behavior. The newfilesystem
API is highly recommended to be used instead.Calculates the absolute path from a relative path to this base folder.- Specified by:
getAbsolutePath
in interfaceIPortalBaseFolder
- Parameters:
relativePath
- the relative path.- Returns:
- the absolute path.
- Since:
- 4.1.0
-
getRelativePath
@Deprecated public java.lang.String getRelativePath(java.lang.String absolutePath)
Deprecated.since 8.0.0 it is not recommended to be used anymore due to the filesystem abstraction layer. Every file operation should use theIFile
interface, that can be obtained fromIFileSystemManager.getFile(PortalFilePath)
. The direct usage of Java file API can produce unpredictable portal behavior. The newfilesystem
API is highly recommended to be used instead.Calculates the relative path to this base folder from the given absolute path.- Specified by:
getRelativePath
in interfaceIPortalBaseFolder
- Parameters:
absolutePath
- the absolute path.- Returns:
- the calculated relative path, relative to this base folder.
- Throws:
java.lang.IllegalArgumentException
- if the given absolute path is invalid or does not belongs to this base folder area.- Since:
- 4.1.0
-
toPortalFilePath
public PortalFilePath toPortalFilePath(java.lang.String relativePath)
Returns a newPortalFilePath
using this base folder and the given relative path.- Parameters:
relativePath
- the relative path.- Returns:
- a new
PortalFilePath
using this base folder and the given relative path. - Since:
- 8.0.0
-
-