public class OdsFilenameURL
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected AoSession |
aoSess |
protected static java.lang.String |
BinPath |
protected static boolean |
checkPath |
protected static java.lang.String |
FileRootExtRefName |
protected java.lang.String |
fileRootName |
protected static java.lang.String |
FileRootName |
protected static java.lang.String |
FileSymbols |
protected OdsFileMode |
fm |
protected OdsFileNotation |
fn |
protected static java.util.HashMap<java.lang.Integer,OdsFilenameURL> |
OdsFileUrlMap |
protected java.util.HashMap<java.lang.String,java.lang.String> |
symbolMap |
protected java.lang.String |
uriPrefix |
protected static boolean |
useCache |
Constructor and Description |
---|
OdsFilenameURL(AoSession aoSess)
Constructor, use the session for the setting of Avalon.
|
OdsFilenameURL(AoSession aoSess,
java.lang.String fileRootName)
Constructor, use the session for the setting of Avalon.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
getFile(java.lang.String storageLocation)
Get the file from the storage location.
|
protected java.io.File |
getFileInternal(java.lang.String storageLocation)
Get the file from the storage location without the check.
|
java.lang.String |
getFormatDate(java.lang.String format)
This method returns the current date as a string.
|
static OdsFilenameURL |
getInstances(AoSession aoSess,
java.lang.String fileRoot) |
java.lang.String |
getStorageLocation(java.io.File file)
Get the string of the storage location, this string can be used to store
the in the filename_url attribute of the AoExternalComponent
|
java.lang.String |
getStorageLocation(java.lang.String filename)
Get the string of the storage location, this string can be used to store
the in the filename_url attribute of the AoExternalComponent
|
protected java.lang.String |
getSymbol(java.lang.String symbol)
Get the symbol, use the map as cache for the symbols of the session.
|
static void |
setCheckPath(boolean check)
Set the switch to check the path, to be the directory or sub directory of one of the symbols.
|
void |
setFileRootName(java.lang.String fileRootName)
Set the name of the FILE_ROOT, the default is FILE_ROOT
for external reference use FILE_ROOT_EXTREF.
|
void |
setUriPrefix(java.lang.String uriPrefix)
Set the URI prefix, e.g file:
|
static void |
setUsecache(boolean use)
Set the switch to use cache of the session.
|
protected java.lang.String |
substituteSymbol(java.lang.String key)
Substitute the symbol of the key.
|
protected static final java.lang.String FileRootName
protected static final java.lang.String FileRootExtRefName
protected static final java.lang.String FileSymbols
protected static final java.lang.String BinPath
protected java.lang.String uriPrefix
protected AoSession aoSess
protected OdsFileMode fm
protected OdsFileNotation fn
protected java.util.HashMap<java.lang.String,java.lang.String> symbolMap
protected java.lang.String fileRootName
protected static boolean useCache
protected static java.util.HashMap<java.lang.Integer,OdsFilenameURL> OdsFileUrlMap
protected static boolean checkPath
public OdsFilenameURL(AoSession aoSess)
aoSess
- the session for the settings.public OdsFilenameURL(AoSession aoSess, java.lang.String fileRootName)
aoSess
- the session for the settings.fileRootName
- the symbol of the file root (FILE_ROOT or FILE_ROOT_EXTREF), in case of null
will be set to FileRootName
public static OdsFilenameURL getInstances(AoSession aoSess, java.lang.String fileRoot)
public static void setUsecache(boolean use)
use
- public void setFileRootName(java.lang.String fileRootName)
fileRootName
- the file root name.protected java.lang.String getSymbol(java.lang.String symbol) throws AoException
symbol
- the symbolAoException
protected java.lang.String substituteSymbol(java.lang.String key) throws AoException
key
- the key with symbolAoException
- any occurring ASAM ODS Exceptionpublic java.lang.String getStorageLocation(java.lang.String filename) throws AoException
filename
- the filenameAoException
- any occurring ASAM ODS exception.public java.lang.String getStorageLocation(java.io.File file) throws AoException, java.io.IOException
file
- the fileAoException
- any occurring ASAM ODS exception.java.io.IOException
public java.lang.String getFormatDate(java.lang.String format)
format
- the format of the date.public java.io.File getFile(java.lang.String storageLocation) throws AoException, CORBAFileServerException
storageLocation
- the storage locationAoException
CORBAFileServerException
protected java.io.File getFileInternal(java.lang.String storageLocation) throws AoException
storageLocation
- the storage locationAoException
CORBAFileServerException
public void setUriPrefix(java.lang.String uriPrefix)
uriPrefix
- the uri prefixpublic static void setCheckPath(boolean check)
check
- true the check will be done.