Enum PortalBaseFolder

    • Enum Constant Detail

      • WWW

        @Deprecated
        public static final PortalBaseFolder WWW
        Deprecated.
        Since 6.2.0, replaced by IWebsite.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
    • 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​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getAbsolutePath

        @Deprecated
        public String getAbsolutePath​(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 the IFile interface, that can be obtained from IFileSystemManager.getFile(PortalFilePath). The direct usage of Java file API can produce unpredictable portal behavior. The new filesystem API is highly recommended to be used instead.
        Calculates the absolute path from a relative path to this base folder.
        Specified by:
        getAbsolutePath in interface IPortalBaseFolder
        Parameters:
        relativePath - the relative path.
        Returns:
        the absolute path.
        Since:
        4.1.0
      • getRelativePath

        @Deprecated
        public String getRelativePath​(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 the IFile interface, that can be obtained from IFileSystemManager.getFile(PortalFilePath). The direct usage of Java file API can produce unpredictable portal behavior. The new filesystem 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 interface IPortalBaseFolder
        Parameters:
        absolutePath - the absolute path.
        Returns:
        the calculated relative path, relative to this base folder.
        Throws:
        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​(String relativePath)
        Returns a new PortalFilePath 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