com.unitesk.requality.core
Class FSStorage

java.lang.Object
  extended by com.unitesk.requality.core.AbstractTreeStorage
      extended by com.unitesk.requality.core.FSStorage
All Implemented Interfaces:
ITreeStorage

public class FSStorage
extends AbstractTreeStorage


Constructor Summary
FSStorage(java.lang.String path)
           
 
Method Summary
 boolean canLoad(java.util.UUID uuid)
           
 void changeNodeId(java.util.UUID node, java.lang.String id)
           
 void createNode(java.util.UUID parentUUId, java.util.UUID uuid, java.lang.String id, java.util.Collection<Attribute> attrs)
           
 void createStorage(java.lang.String name)
           
 void deleteResource(java.util.UUID uuid, java.lang.String resName)
           
 void deleteStorage()
           
 java.util.Collection<Attribute> getAttributes(java.util.UUID uuid)
           
 java.util.Collection<java.util.UUID> getChildren(java.util.UUID uuid)
           
 java.io.File getFile(java.util.UUID uuid)
           
 java.lang.String getName()
           
 java.lang.String getNodeId(java.util.UUID uuid)
           
 java.lang.String getNodeResourcePath(java.util.UUID uuId)
           
 java.util.UUID getParent(java.io.File file)
           
 java.util.UUID getParent(java.util.UUID uuid)
           
 java.io.InputStream getResourceContents(java.util.UUID uuid, java.lang.String resName)
           
 java.io.File getResourceFolder(java.util.UUID uuid)
           
 java.util.UUID getRootNode()
           
 boolean isResourceExists(java.util.UUID uuid, java.lang.String resName)
           
 java.lang.String[] listResources(java.util.UUID uuid)
           
 void moveNodeTo(java.util.UUID node, java.util.UUID parent)
           
 void remove(java.util.UUID uuid)
           
 void saveAttributes(java.util.UUID node, java.util.Collection<Attribute> attributes)
           
 void setResourceContents(java.util.UUID uuid, java.lang.String resName, java.io.InputStream in, java.lang.Object data)
           
 
Methods inherited from class com.unitesk.requality.core.AbstractTreeStorage
createNode, getDeltaTarget, getNodeType, setDeltaTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSStorage

public FSStorage(java.lang.String path)
Method Detail

getFile

public java.io.File getFile(java.util.UUID uuid)

getRootNode

public java.util.UUID getRootNode()
Specified by:
getRootNode in interface ITreeStorage
Specified by:
getRootNode in class AbstractTreeStorage

getResourceFolder

public java.io.File getResourceFolder(java.util.UUID uuid)

getNodeId

public java.lang.String getNodeId(java.util.UUID uuid)
Specified by:
getNodeId in interface ITreeStorage
Specified by:
getNodeId in class AbstractTreeStorage

getParent

public java.util.UUID getParent(java.util.UUID uuid)
Specified by:
getParent in interface ITreeStorage
Specified by:
getParent in class AbstractTreeStorage

getParent

public java.util.UUID getParent(java.io.File file)

getChildren

public java.util.Collection<java.util.UUID> getChildren(java.util.UUID uuid)
Specified by:
getChildren in interface ITreeStorage
Specified by:
getChildren in class AbstractTreeStorage

createNode

public void createNode(java.util.UUID parentUUId,
                       java.util.UUID uuid,
                       java.lang.String id,
                       java.util.Collection<Attribute> attrs)
Specified by:
createNode in interface ITreeStorage
Specified by:
createNode in class AbstractTreeStorage

remove

public void remove(java.util.UUID uuid)
Specified by:
remove in interface ITreeStorage
Specified by:
remove in class AbstractTreeStorage

changeNodeId

public void changeNodeId(java.util.UUID node,
                         java.lang.String id)
Specified by:
changeNodeId in interface ITreeStorage
Specified by:
changeNodeId in class AbstractTreeStorage

getAttributes

public java.util.Collection<Attribute> getAttributes(java.util.UUID uuid)
Specified by:
getAttributes in interface ITreeStorage
Specified by:
getAttributes in class AbstractTreeStorage

saveAttributes

public void saveAttributes(java.util.UUID node,
                           java.util.Collection<Attribute> attributes)
Specified by:
saveAttributes in interface ITreeStorage
Specified by:
saveAttributes in class AbstractTreeStorage

moveNodeTo

public void moveNodeTo(java.util.UUID node,
                       java.util.UUID parent)
Specified by:
moveNodeTo in interface ITreeStorage
Specified by:
moveNodeTo in class AbstractTreeStorage

canLoad

public boolean canLoad(java.util.UUID uuid)
Specified by:
canLoad in interface ITreeStorage
Specified by:
canLoad in class AbstractTreeStorage

getNodeResourcePath

public java.lang.String getNodeResourcePath(java.util.UUID uuId)
Specified by:
getNodeResourcePath in interface ITreeStorage
Specified by:
getNodeResourcePath in class AbstractTreeStorage

getResourceContents

public java.io.InputStream getResourceContents(java.util.UUID uuid,
                                               java.lang.String resName)
Specified by:
getResourceContents in interface ITreeStorage
Specified by:
getResourceContents in class AbstractTreeStorage

setResourceContents

public void setResourceContents(java.util.UUID uuid,
                                java.lang.String resName,
                                java.io.InputStream in,
                                java.lang.Object data)
Specified by:
setResourceContents in interface ITreeStorage
Specified by:
setResourceContents in class AbstractTreeStorage

isResourceExists

public boolean isResourceExists(java.util.UUID uuid,
                                java.lang.String resName)
Specified by:
isResourceExists in interface ITreeStorage
Specified by:
isResourceExists in class AbstractTreeStorage

deleteResource

public void deleteResource(java.util.UUID uuid,
                           java.lang.String resName)
Specified by:
deleteResource in interface ITreeStorage
Specified by:
deleteResource in class AbstractTreeStorage

listResources

public java.lang.String[] listResources(java.util.UUID uuid)
Specified by:
listResources in interface ITreeStorage
Specified by:
listResources in class AbstractTreeStorage

getName

public java.lang.String getName()
Specified by:
getName in interface ITreeStorage
Specified by:
getName in class AbstractTreeStorage

createStorage

public void createStorage(java.lang.String name)
Specified by:
createStorage in interface ITreeStorage
Specified by:
createStorage in class AbstractTreeStorage

deleteStorage

public void deleteStorage()
Specified by:
deleteStorage in interface ITreeStorage
Specified by:
deleteStorage in class AbstractTreeStorage