AVM Nodes are (theoretically) mostly aspect ready. AVMNodeService is

now derived from AbstractNodeServiceImpl to make policy awareness easier.
Moved addDefaultPropertyValues from DbNodeServiceImpl to 
AbstractNodeServiceImpl so AVMNodeService can use it.  A fix for an
NPE that showed up in stress test.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3603 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-08-24 18:36:59 +00:00
parent d67b926589
commit 0606fa3ab6
15 changed files with 252 additions and 619 deletions

View File

@@ -28,8 +28,6 @@ import java.util.SortedMap;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.namespace.QName;
/**
@@ -59,11 +57,6 @@ public class AVMRepository
*/
private Issuer fLayerIssuer;
/**
* The file storage directory.
*/
private String fStorage;
/**
* Create a new one.
*/
@@ -73,15 +66,6 @@ public class AVMRepository
fgInstance = this;
}
/**
* Set the storage directory.
* @param storage The absolute path to content storage directory.
*/
public void setStorage(String storage)
{
fStorage = storage;
}
/**
* Set the node issuer. For Spring.
* @param nodeIssuer The issuer.
@@ -100,12 +84,6 @@ public class AVMRepository
fLayerIssuer = layerIssuer;
}
public void init()
{
File storageDir = new File(fStorage);
storageDir.mkdirs();
}
/**
* Create a file.
* @param path The path to the containing directory.
@@ -496,33 +474,6 @@ public class AVMRepository
return store.getInputStream(version, pathParts[1]);
}
/**
* Get a ContentReader from a file.
* @param version The version to look under.
* @param path The path to the file.
* @return A ContentReader
*/
public ContentReader getReader(int version, String path)
{
fLookupCount.set(1);
String [] pathParts = SplitPath(path);
AVMStore store = getAVMStoreByName(pathParts[0]);
return store.getReader(version, pathParts[1]);
}
/**
* Get a ContentWriter to a file.
* @param path The path to the file.
* @return A ContentWriter.
*/
public ContentWriter getWriter(String path)
{
fLookupCount.set(1);
String [] pathParts = SplitPath(path);
AVMStore store = getAVMStoreByName(pathParts[0]);
return store.getWriter(pathParts[1]);
}
/**
* Get a listing of a directory.
* @param version The version to look under.
@@ -819,15 +770,6 @@ public class AVMRepository
return pathParts;
}
/**
* Get the path to file storage.
* @return The root path of file storage.
*/
public String getStorageRoot()
{
return fStorage;
}
/**
* Make a directory into a primary indirection.
* @param path The full path.