public abstract class AbstractPortalBaseFolder extends Object implements IPortalBaseFolder
IPortalBaseFolder
implementation, used as base class for
some implementations.
This implementation assumes the base folder corresponds to a folder
in the local file system. The concrete implementation decides the local
folder to be used by implementing calculateBasePath()
.
Constructor and Description |
---|
AbstractPortalBaseFolder() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
calculateBasePath()
Calculates the absolute path for this base folder.
|
String |
getAbsolutePath(String relativePath)
Calculates the absolute path from a relative path to this base folder.
|
String |
getBasePath()
Returns the path that corresponds to this base folder.
|
String |
getRelativePath(String absolutePath)
Calculates the relative path to this base folder for the given absolute
path.
|
String |
toString()
A string for display purposes that identifies this base folder.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public final String getBasePath()
protected abstract String calculateBasePath()
Called by getBasePath()
. Its result stored and reused
automatically.
public String getAbsolutePath(String relativePath)
IPortalBaseFolder
getAbsolutePath
in interface IPortalBaseFolder
relativePath
- the relative path.public String getRelativePath(String absolutePath)
IPortalBaseFolder
getRelativePath
in interface IPortalBaseFolder
absolutePath
- the absolute path.public String toString()
IPortalBaseFolder
In special, PortalFilePath
uses this string to create its
own toString
, in the form: [base folder]:/[relative path]
.
This method should return a value that keeps that form friendly.
toString
in interface IPortalBaseFolder
toString
in class Object
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.