org.alfresco.service.cmr.avm
Class AVMNodeDescriptor

java.lang.Object
  extended by org.alfresco.service.cmr.avm.AVMNodeDescriptor
All Implemented Interfaces:
java.io.Serializable

public class AVMNodeDescriptor
extends java.lang.Object
implements java.io.Serializable

This class describes an AVM node object. It serves a similar purpose to the data structure returned by the stat() system call in UNIX.

See Also:
Serialized Form

Constructor Summary
AVMNodeDescriptor(java.lang.String path, java.lang.String name, int type, java.lang.String creator, java.lang.String owner, java.lang.String lastModifier, long createDate, long modDate, long accessDate, long id, java.lang.String guid, int versionID, java.lang.String indirection, int indirectionVersion, boolean isPrimary, long layerID, boolean opacity, long length, int deletedType)
          Make one up.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Equals override.
 long getAccessDate()
          Get the last access date in java milliseconds.
 long getCreateDate()
          Get the creation date in java milliseconds.
 java.lang.String getCreator()
          Get the user who created this.
 int getDeletedType()
          Get the type of node that a deleted node is standing in for.
 java.lang.String getGuid()
          Get the GUID for the node.
 long getId()
          Get the object id.
 java.lang.String getIndirection()
          Get the indirection path if this is layered or null.
 int getIndirectionVersion()
          Get the indirection version.
 java.lang.String getLastModifier()
          Get the user who last modified this node.
 long getLayerID()
          Get the layer id of this node.
 long getLength()
          Get the file length if applicable.
 long getModDate()
          Get the modification date of this node.
 java.lang.String getName()
          Get the name of the node.
 boolean getOpacity()
           
 java.lang.String getOwner()
          Get the owner of this node.
 java.lang.String getPath()
          Get the path that this node was looked up by.
 int getType()
          Get the type of this node.
 int getVersionID()
          Get the version id of this node.
 int hashCode()
          Hashcode override.
 boolean isDeleted()
          Is this a deleted node.
 boolean isDeletedDirectory()
          Is this a deleted directory?
 boolean isDeletedFile()
          Is this a deleted file?
 boolean isDirectory()
          Determines whether this node corresponds to either a plain or layered directory.
 boolean isFile()
          Determines whether this node corresponds to either a plain or layered file.
 boolean isLayeredDirectory()
          Determines whether this node corresponds to a layered directory.
 boolean isLayeredFile()
          Determines whether this node corresponds to a layered file.
 boolean isPlainDirectory()
          Determines whether this node corresponds to a plain (non-layered) directory.
 boolean isPlainFile()
          Determines whether this node corresponds to a plain (non-layered) file.
 boolean isPrimary()
          Is this a primary indirection node.
 java.lang.String toString()
          Get a debuggable string representation of this.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AVMNodeDescriptor

public AVMNodeDescriptor(java.lang.String path,
                         java.lang.String name,
                         int type,
                         java.lang.String creator,
                         java.lang.String owner,
                         java.lang.String lastModifier,
                         long createDate,
                         long modDate,
                         long accessDate,
                         long id,
                         java.lang.String guid,
                         int versionID,
                         java.lang.String indirection,
                         int indirectionVersion,
                         boolean isPrimary,
                         long layerID,
                         boolean opacity,
                         long length,
                         int deletedType)
Make one up.

Parameters:
path - The looked up path.
type - The type of the node.
creator - The creator of the node.
owner - The owner of the node.
lastModifier - The last modifier of the node.
createDate - The creation date.
modDate - The modification date.
accessDate - The access date.
id - The object id.
versionID - The version id.
guid - The GUID.
indirection - The indirection.
indirectionVersion - The indirection version.
isPrimary - Whether this is a primary indirection.
layerID - The layer id.
length - The file length.
deletedType - The type of node that was deleted.
Method Detail

getAccessDate

public long getAccessDate()
Get the last access date in java milliseconds.

Returns:
The last access date.

getCreateDate

public long getCreateDate()
Get the creation date in java milliseconds.

Returns:
The creation date.

getCreator

public java.lang.String getCreator()
Get the user who created this.

Returns:
The creator.

getIndirection

public java.lang.String getIndirection()
Get the indirection path if this is layered or null.

Returns:
The indirection path or null.

getIndirectionVersion

public int getIndirectionVersion()
Get the indirection version.

Returns:
The indirection version.

isPrimary

public boolean isPrimary()
Is this a primary indirection node. Will always be false for non-layered nodes.

Returns:
Whether this is a primary indirection node.

isFile

public boolean isFile()
Determines whether this node corresponds to either a plain or layered file.

NOTE: A deleted file node is not considered a file (i.e.: isFile() returns false when isDeleted() returns true). Therefore, use isDeletedFile() to determine if a deleted node was a file, not isFile().

Returns:
true if AVMNodeDescriptor is a plain or layered file, otherwise false.

isPlainFile

public boolean isPlainFile()
Determines whether this node corresponds to a plain (non-layered) file.

Returns:
true if AVMNodeDescriptor is a plain file, otherwise false.

isLayeredFile

public boolean isLayeredFile()
Determines whether this node corresponds to a layered file.

Returns:
true if AVMNodeDescriptor is a layered file, otherwise false.

isDirectory

public boolean isDirectory()
Determines whether this node corresponds to either a plain or layered directory.

NOTE: A deleted directory node is not considered a directory (i.e.: isDirectory() returns false when isDeleted() returns true). Therefore, use isDeletedDirectory() to determine if a deleted node was a directory, not isDirectory().

Returns:
true if AVMNodeDescriptor is a plain or layered directory, otherwise false.

isPlainDirectory

public boolean isPlainDirectory()
Determines whether this node corresponds to a plain (non-layered) directory.

Returns:
true if AVMNodeDescriptor is a plain directory, otherwise false.

isLayeredDirectory

public boolean isLayeredDirectory()
Determines whether this node corresponds to a layered directory.

Returns:
true if AVMNodeDescriptor is a layered directory, otherwise false.

isDeleted

public boolean isDeleted()
Is this a deleted node.

Returns:
Whether this node is a deleted node.

getLastModifier

public java.lang.String getLastModifier()
Get the user who last modified this node.

Returns:
Who last modified this node.

getLayerID

public long getLayerID()
Get the layer id of this node.

Returns:
The layer id if there is one or -1.

getModDate

public long getModDate()
Get the modification date of this node.

Returns:
The modification date.

getOwner

public java.lang.String getOwner()
Get the owner of this node.

Returns:
The owner of this node.

getPath

public java.lang.String getPath()
Get the path that this node was looked up by. The format is the full store reference. Consisting of the store + ":" + path e.g. 79170e-675e-4b35-b1b1-3aee463c170b:/avm/ibatis/.svn/tmp/text-base

Returns:
The full path of this AVM node.

getType

public int getType()
Get the type of this node. AVMNodeType constants.

Returns:
The type node.

getVersionID

public int getVersionID()
Get the version id of this node.

Returns:
The version id of this node.

getId

public long getId()
Get the object id.

Returns:
The object id.

getLength

public long getLength()
Get the file length if applicable.

Returns:
The file length.

getName

public java.lang.String getName()
Get the name of the node.


getOpacity

public boolean getOpacity()
Returns:
the opacity

toString

public java.lang.String toString()
Get a debuggable string representation of this.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this.

equals

public boolean equals(java.lang.Object obj)
Equals override.

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
Equality.

hashCode

public int hashCode()
Hashcode override.

Overrides:
hashCode in class java.lang.Object
Returns:
The objid as hashcode.

getDeletedType

public int getDeletedType()
Get the type of node that a deleted node is standing in for.


isDeletedDirectory

public boolean isDeletedDirectory()
Is this a deleted directory?


isDeletedFile

public boolean isDeletedFile()
Is this a deleted file?


getGuid

public java.lang.String getGuid()
Get the GUID for the node.



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