org.alfresco.repo.avm
Class LayeredFileNodeImpl

java.lang.Object
  extended by org.alfresco.repo.avm.AVMNodeImpl
      extended by org.alfresco.repo.avm.LayeredFileNodeImpl
All Implemented Interfaces:
AVMNode, FileNode, Layered, LayeredFileNode

public class LayeredFileNodeImpl
extends AVMNodeImpl
implements LayeredFileNode

A LayeredFileNode behaves like a copy on write symlink.


Field Summary
 
Fields inherited from class org.alfresco.repo.avm.AVMNodeImpl
DEBUG
 
Constructor Summary
LayeredFileNodeImpl()
          Default constructor.
LayeredFileNodeImpl(LayeredFileNode other, AVMStore store, java.lang.Long parentAcl, ACLCopyMode mode)
          Basically a copy constructor.
LayeredFileNodeImpl(java.lang.String indirection, AVMStore store, DbAccessControlList acl)
          Make a brand new layered file node.
 
Method Summary
 AVMNode copy(org.alfresco.repo.avm.Lookup lPath)
          Copy on write logic.
 LayeredFileNode copyLiterally(org.alfresco.repo.avm.Lookup lookup)
          Make a copy of this node that is a LayeredFileNode.
 ContentData getContentData(org.alfresco.repo.avm.Lookup lPath)
          Get the ContentData for this file.
 AVMNodeDescriptor getDescriptor(org.alfresco.repo.avm.Lookup lPath)
          Get the descriptor for this node.
 AVMNodeDescriptor getDescriptor(org.alfresco.repo.avm.Lookup lPath, java.lang.String name)
          Get the descriptor for this node.
 AVMNodeDescriptor getDescriptor(java.lang.String parentPath, java.lang.String name, java.lang.String parentIndirection, int parentIndirectionVersion)
          Get the descriptor for this node.
 java.lang.String getIndirection()
          Get the indirection.
 java.lang.Integer getIndirectionVersion()
          Get the indirection version.
 int getType()
          Get the type of this node.
 java.lang.String getUnderlying(org.alfresco.repo.avm.Lookup lookup)
          Get the underlying path.
 int getUnderlyingVersion(org.alfresco.repo.avm.Lookup lookup)
          Get the indirection version.
 void setContentData(ContentData contentData)
          Set the ContentData for this file.
 void setIndirection(java.lang.String indirection)
          Set the indirection.
 void setIndirectionVersion(java.lang.Integer version)
          Set the indirection version for this layered node.
 java.lang.String toString(org.alfresco.repo.avm.Lookup lPath)
          Get a diagnostic String representation.
 
Methods inherited from class org.alfresco.repo.avm.AVMNodeImpl
addAspect, addProperties, changeAncestor, checkReadOnly, copyACLs, copyAspects, copyCreationAndOwnerBasicAttributes, copyMetaDataFrom, copyProperties, deleteProperties, deleteProperty, equals, getAcl, getAncestor, getAspects, getBasicAttributes, getGuid, getId, getIsNew, getIsRoot, getMergedFrom, getProperties, getProperty, getStoreNew, getVers, getVersionID, hashCode, removeAspect, setAcl, setAncestor, setAspects, setBasicAttributes, setGuid, setId, setIsRoot, setMergedFrom, setProperties, setProperty, setStoreNew, setVers, setVersionID, toString, updateModTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.alfresco.repo.avm.AVMNode
addAspect, addProperties, changeAncestor, copyMetaDataFrom, deleteProperties, deleteProperty, getAcl, getAncestor, getAspects, getBasicAttributes, getGuid, getId, getIsNew, getIsRoot, getMergedFrom, getProperties, getProperty, getStoreNew, getVersionID, removeAspect, setAcl, setAncestor, setGuid, setIsRoot, setMergedFrom, setProperties, setProperty, setStoreNew, setVersionID, updateModTime
 
Methods inherited from interface org.alfresco.repo.avm.AVMNode
addAspect, addProperties, changeAncestor, copyMetaDataFrom, deleteProperties, deleteProperty, getAcl, getAncestor, getAspects, getBasicAttributes, getGuid, getId, getIsNew, getIsRoot, getMergedFrom, getProperties, getProperty, getStoreNew, getVersionID, removeAspect, setAcl, setAncestor, setGuid, setIsRoot, setMergedFrom, setProperties, setProperty, setStoreNew, setVersionID, updateModTime
 

Constructor Detail

LayeredFileNodeImpl

public LayeredFileNodeImpl()
Default constructor.


LayeredFileNodeImpl

public LayeredFileNodeImpl(LayeredFileNode other,
                           AVMStore store,
                           java.lang.Long parentAcl,
                           ACLCopyMode mode)
Basically a copy constructor. Used when a branch is created from a layered file.

Parameters:
other - The file to make a copy of.
store - The store that contains us.

LayeredFileNodeImpl

public LayeredFileNodeImpl(java.lang.String indirection,
                           AVMStore store,
                           DbAccessControlList acl)
Make a brand new layered file node.

Parameters:
indirection - The thing we point to.
store - The store we belong to.
Method Detail

copy

public AVMNode copy(org.alfresco.repo.avm.Lookup lPath)
Copy on write logic.

Specified by:
copy in interface AVMNode
Parameters:
lPath - The path by which this was found.
Returns:
A copy of ourself or null if no copy was necessary.

getType

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

Specified by:
getType in interface AVMNode
Returns:
The type.

getUnderlying

public java.lang.String getUnderlying(org.alfresco.repo.avm.Lookup lookup)
Get the underlying path.

Specified by:
getUnderlying in interface Layered
Parameters:
lookup - The Lookup. (Unused here.)
Returns:
The underlying path.

toString

public java.lang.String toString(org.alfresco.repo.avm.Lookup lPath)
Get a diagnostic String representation.

Specified by:
toString in interface AVMNode
Parameters:
lPath - The Lookup.
Returns:
A diagnostic String representation.

getDescriptor

public AVMNodeDescriptor getDescriptor(org.alfresco.repo.avm.Lookup lPath,
                                       java.lang.String name)
Get the descriptor for this node.

Specified by:
getDescriptor in interface AVMNode
Parameters:
lPath - The Lookup.
name - The name of this in the current context.
Returns:
A descriptor.

getDescriptor

public AVMNodeDescriptor getDescriptor(org.alfresco.repo.avm.Lookup lPath)
Get the descriptor for this node.

Specified by:
getDescriptor in interface AVMNode
Parameters:
lPath - The Lookup.
Returns:
A descriptor.

getDescriptor

public AVMNodeDescriptor getDescriptor(java.lang.String parentPath,
                                       java.lang.String name,
                                       java.lang.String parentIndirection,
                                       int parentIndirectionVersion)
Get the descriptor for this node.

Specified by:
getDescriptor in interface AVMNode
Parameters:
parentPath - The parent path.
name - The name this was looked up with.
parentIndirection - The parent indirection.
parentIndirectionVersion - The indirection version of the parent.
Returns:
The descriptor.

getIndirection

public java.lang.String getIndirection()
Get the indirection.

Specified by:
getIndirection in interface Layered
Returns:
The indirection.

setIndirection

public void setIndirection(java.lang.String indirection)
Set the indirection.

Parameters:
indirection -

setContentData

public void setContentData(ContentData contentData)
Set the ContentData for this file.

Specified by:
setContentData in interface FileNode
Parameters:
contentData - The value to set.

getContentData

public ContentData getContentData(org.alfresco.repo.avm.Lookup lPath)
Get the ContentData for this file.

Specified by:
getContentData in interface FileNode
Parameters:
lPath - The Lookup used to get here.
Returns:
The ContentData object for this file.

getUnderlyingVersion

public int getUnderlyingVersion(org.alfresco.repo.avm.Lookup lookup)
Description copied from interface: Layered
Get the indirection version.

Specified by:
getUnderlyingVersion in interface Layered
Parameters:
lookup - The lookup path.
Returns:
The underlying indirection version.

getIndirectionVersion

public java.lang.Integer getIndirectionVersion()
Description copied from interface: LayeredFileNode
Get the indirection version.

Specified by:
getIndirectionVersion in interface LayeredFileNode
Returns:
The indirection version.

setIndirectionVersion

public void setIndirectionVersion(java.lang.Integer version)
Description copied from interface: Layered
Set the indirection version for this layered node.

Specified by:
setIndirectionVersion in interface Layered
Parameters:
version - The indirection version to set.

copyLiterally

public LayeredFileNode copyLiterally(org.alfresco.repo.avm.Lookup lookup)
Description copied from interface: LayeredFileNode
Make a copy of this node that is a LayeredFileNode.

Specified by:
copyLiterally in interface LayeredFileNode
Parameters:
lookup - The context.
Returns:
The copy.


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