Enum PortalBaseFolder

    • 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 by IWebsite.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 new PortalFilePath 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 class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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​(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 name
        java.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 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 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 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:
        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 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