org.alfresco.filesys.avm
Class AVMPath

java.lang.Object
  extended by org.alfresco.filesys.avm.AVMPath

public class AVMPath
extends java.lang.Object

AVM Path Class

Parses a share relative path into store, version and remaining path values.


Nested Class Summary
static class AVMPath.LevelId
           
 
Field Summary
static char AVM_SEPERATOR
           
static java.lang.String AVM_SEPERATOR_STR
           
static java.lang.String DataFolder
           
static java.lang.String MetaDataFolder
           
static java.lang.String VersionFolderPrefix
           
static java.lang.String VersionNameHead
           
static java.lang.String VersionsFolder
           
 
Constructor Summary
AVMPath()
          Default constructor
AVMPath(java.lang.String shrPath)
          Class constructor
AVMPath(java.lang.String storeName, int version, java.lang.String path)
          Class constructor
 
Method Summary
 int generateFileId()
          Generate a file id for the path
 java.lang.String getAVMPath()
          Return the AVM style path, in :/ format
 java.lang.String getRelativePath()
          Return the share relative path
 java.lang.String getStoreName()
          Return the store name
 int getVersion()
          Return the version id
 java.lang.String getVersionString()
          Return the version as a string
 boolean hasRelativePath()
          Check if there is a share relative path
 boolean hasVersion()
          Check if the version id was specified in the path
 AVMPath.LevelId isLevel()
          Return the level id for the path
 boolean isPseudoPath()
          Check if the path is to a pseudo folder in the virtualization view
 boolean isReadOnlyAccess()
          Check if the path is read-only
 boolean isReadOnlyPseudoPath()
          Check if hte path is a read-only part of the pseudo folder tree
 boolean isRootPath()
          Check if the path is the root path
 boolean isValid()
          Check if the path is valid
 void parsePath(java.lang.String path)
          Parse the path, for the virtualization view onto all stores/versions
 void parsePath(java.lang.String storeName, int version, java.lang.String path)
          Parse the path, to generate a path for a single store/version
 void setReadOnlyAccess(boolean readOnly)
          Set the path access, true for read-only access
 java.lang.String toString()
          Return the AVM path details as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VersionNameHead

public static final java.lang.String VersionNameHead
See Also:
Constant Field Values

VersionsFolder

public static final java.lang.String VersionsFolder
See Also:
Constant Field Values

DataFolder

public static final java.lang.String DataFolder
See Also:
Constant Field Values

MetaDataFolder

public static final java.lang.String MetaDataFolder
See Also:
Constant Field Values

VersionFolderPrefix

public static final java.lang.String VersionFolderPrefix
See Also:
Constant Field Values

AVM_SEPERATOR

public static final char AVM_SEPERATOR
See Also:
Constant Field Values

AVM_SEPERATOR_STR

public static final java.lang.String AVM_SEPERATOR_STR
See Also:
Constant Field Values
Constructor Detail

AVMPath

public AVMPath()
Default constructor


AVMPath

public AVMPath(java.lang.String shrPath)
Class constructor

Construct an AVM path for the virtualization view, with store and version folders

Parameters:
shrPath - String

AVMPath

public AVMPath(java.lang.String storeName,
               int version,
               java.lang.String path)
Class constructor

Construct an AVM path for a standard view onto a store/version

Parameters:
storeName - String
version - int
path - String
Method Detail

isLevel

public AVMPath.LevelId isLevel()
Return the level id for the path

Returns:
LevelId

isReadOnlyAccess

public final boolean isReadOnlyAccess()
Check if the path is read-only

Returns:
boolean

getStoreName

public final java.lang.String getStoreName()
Return the store name

Returns:
String

hasVersion

public final boolean hasVersion()
Check if the version id was specified in the path

Returns:
boolean

getVersion

public final int getVersion()
Return the version id

Returns:
int

getVersionString

public final java.lang.String getVersionString()
Return the version as a string

Returns:
String

hasRelativePath

public final boolean hasRelativePath()
Check if there is a share relative path

Returns:
boolean

getRelativePath

public final java.lang.String getRelativePath()
Return the share relative path

Returns:
String

getAVMPath

public final java.lang.String getAVMPath()
Return the AVM style path, in :/ format

Returns:
String

isValid

public final boolean isValid()
Check if the path is valid

Returns:
boolean

isPseudoPath

public final boolean isPseudoPath()
Check if the path is to a pseudo folder in the virtualization view

Returns:
boolean

isReadOnlyPseudoPath

public final boolean isReadOnlyPseudoPath()
Check if hte path is a read-only part of the pseudo folder tree

Returns:
boolean

isRootPath

public final boolean isRootPath()
Check if the path is the root path

Returns:
boolean

parsePath

public final void parsePath(java.lang.String path)
Parse the path, for the virtualization view onto all stores/versions

Parameters:
path - String

parsePath

public final void parsePath(java.lang.String storeName,
                            int version,
                            java.lang.String path)
Parse the path, to generate a path for a single store/version

Parameters:
storeName - String
version - int
path - String

generateFileId

public final int generateFileId()
Generate a file id for the path

Returns:
int

setReadOnlyAccess

public final void setReadOnlyAccess(boolean readOnly)
Set the path access, true for read-only access

Parameters:
access - boolean

toString

public java.lang.String toString()
Return the AVM path details as a string

Overrides:
toString in class java.lang.Object
Returns:
String


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.