lumis.portal.filesystem
Class PortalFilePath

Package class diagram package PortalFilePath
java.lang.Object
  extended by lumis.portal.filesystem.PortalFilePath
All Implemented Interfaces:
Serializable

public final class PortalFilePath
extends Object
implements Serializable

Represents a path to a portal file. It is internally stored as a PortalBaseFolder and a relative path to that folder.

Since:
4.1.0
See Also:
Serialized Form

Constructor Summary
PortalFilePath(PortalBaseFolder baseFolder, String relativePath)
          Creates a portal file path from a base folder and a relative path.
PortalFilePath(String absolutePath)
          Creates a portal file path from an absolute path.
 
Method Summary
 boolean equals(Object obj)
           
 String getAbsolutePath()
          Returns the absolute path this instance corresponds to.
 PortalBaseFolder getBaseFolder()
          Returns the base folder for this path.
 String getRelativePath()
          Returns the relative path to getBaseFolder().
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortalFilePath

public PortalFilePath(PortalBaseFolder baseFolder,
                      String relativePath)
Creates a portal file path from a base folder and a relative path.

Parameters:
baseFolder - the base folder.
relativePath - the relative path, relative to the base folder.
Since:
4.1.0

PortalFilePath

public PortalFilePath(String absolutePath)
Creates a portal file path from an absolute path.

Parameters:
absolutePath - the absolute path.
Throws:
IllegalArgumentException - if the given absolute path is invalid or does not belongs to an area that may be mapped using a portal file path.
Since:
4.1.0
Method Detail

getAbsolutePath

public String getAbsolutePath()
Returns the absolute path this instance corresponds to.

Returns:
the absolute path this instance corresponds to.
Since:
4.1.0

getRelativePath

public String getRelativePath()
Returns the relative path to getBaseFolder().

Returns:
the relative path relative to the base folder.
Since:
4.1.0

getBaseFolder

public PortalBaseFolder getBaseFolder()
Returns the base folder for this path.

Returns:
the base folder for this path.
Since:
4.1.0

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.