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>

public enum PortalBaseFolder
extends Enum<PortalBaseFolder>

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
          Indicates the path is relative to the portal WWW (web root) folder.
 
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're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WWW

public static final PortalBaseFolder WWW
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 final PortalBaseFolder[] values()
Returns an array containing the constants of this enum type, in the order they're 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're 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

getAbsolutePath

public String getAbsolutePath(String relativePath)
Calculates the absolute path from a relative path to this base folder.

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.

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  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.