lumis.portal.filesystem
Enum PortalBaseFolder

Package class diagram package PortalBaseFolder
java.lang.Object
  extended by java.lang.Enum<PortalBaseFolder>
      extended by lumis.portal.filesystem.PortalBaseFolder
All Implemented Interfaces:
Serializable, Comparable<PortalBaseFolder>, IPortalBaseFolder

@StableMinor(version="6.2",
             sinceVersion="4.1")
public enum PortalBaseFolder
extends 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

Enum Constant Summary
DATA
          Indicates the path is relative to the portal data (lumisdata/data) folder.
DEF
          Indicates the path is relative to the portal definition (lumisdata/def) folder.
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.

 
Method Summary
 String getAbsolutePath(String relativePath)
          Calculates the absolute path from a relative path to this base folder.
 String getRelativePath(String absolutePath)
          Calculates the relative path to this base folder from the given absolute path.
static PortalBaseFolder valueOf(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
 
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 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/data) folder.

Since:
4.1.0

DEF

public static final PortalBaseFolder DEF
Indicates the path is relative to the portal definition (lumisdata/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

public String getAbsolutePath(String relativePath)
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

public String getRelativePath(String absolutePath)
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


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.