org.alfresco.repo.avm
Class AVMNodeConverter

java.lang.Object
  extended by org.alfresco.repo.avm.AVMNodeConverter

public class AVMNodeConverter
extends java.lang.Object

Utility for going back and forth between the AVM world and the StoreRef, NodeRef world.


Constructor Summary
AVMNodeConverter()
           
 
Method Summary
static java.lang.String ExtendAVMPath(java.lang.String path, java.lang.String name)
          Extend an already valid AVM path by one more component.
static java.lang.String NormalizePath(java.lang.String path)
          Deprecated. see org.alfresco.repo.avm.util.AVMUtil.normalizePath
static java.lang.String[] SplitBase(java.lang.String path)
          Split a path into its parent path and its base name.
static org.alfresco.util.Pair ToAVMVersionPath(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Convert a NodeRef into a version, AVMPath pair.
static org.alfresco.service.cmr.repository.NodeRef ToNodeRef(int version, java.lang.String avmPath)
          Get a NodeRef corresponding to the given path and version.
static org.alfresco.service.cmr.repository.StoreRef ToStoreRef(java.lang.String avmStore)
          Get a StoreRef that corresponds to a given AVMStore name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVMNodeConverter

public AVMNodeConverter()
Method Detail

ToNodeRef

public static org.alfresco.service.cmr.repository.NodeRef ToNodeRef(int version,
                                                                    java.lang.String avmPath)
Get a NodeRef corresponding to the given path and version.

Parameters:
version - The version id.
avmPath - The AVM path.
Returns:
A NodeRef with AVM info stuffed inside.

ToStoreRef

public static org.alfresco.service.cmr.repository.StoreRef ToStoreRef(java.lang.String avmStore)
Get a StoreRef that corresponds to a given AVMStore name.

Parameters:
avmStore - The name of the AVMStore.
Returns:
A working StoreRef.

ToAVMVersionPath

public static org.alfresco.util.Pair ToAVMVersionPath(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Convert a NodeRef into a version, AVMPath pair.

Parameters:
nodeRef - The NodeRef to convert.
Returns:
An Integer, String array.

ExtendAVMPath

public static java.lang.String ExtendAVMPath(java.lang.String path,
                                             java.lang.String name)
Extend an already valid AVM path by one more component.

Parameters:
path - The starting AVM path.
name - The name to add to it.
Returns:
The extended path.

SplitBase

public static java.lang.String[] SplitBase(java.lang.String path)
Split a path into its parent path and its base name.

Parameters:
path - The initial AVM path.
Returns:
An array of 2 Strings containing the parent path and the base name.

NormalizePath

public static java.lang.String NormalizePath(java.lang.String path)
Deprecated. see org.alfresco.repo.avm.util.AVMUtil.normalizePath

Normalize an AVM path.

Parameters:
path - The incoming path.
Returns:
The normalized path.


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