com.unitesk.requality.eclipse.core
Class ResourceStorage

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

public class ResourceStorage
extends AbstractTreeStorage


Nested Class Summary
static class ResourceStorage.ResourceMap
           
 
Field Summary
static java.lang.String RESOURCE_POSTFIX
           
 
Constructor Summary
ResourceStorage(IProject project)
           
 
Method Summary
 boolean canLoad(java.util.UUID uuid)
           
 void changeNodeId(java.util.UUID uuid, 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 parentUUId)
           
 DeltaProcessor getDeltaProcessor()
           
 java.lang.String getName()
           
 java.lang.String getNodeId(java.util.UUID uuid)
           
 java.lang.String getNodeResourcePath(java.util.UUID uuId)
           
 java.util.UUID getParent(IFile file)
           
 java.util.UUID getParent(java.util.UUID uuid)
           
 IProject getProject()
           
 IFile getResource(java.util.UUID uuid)
           
 IResourceChangeListener getResourceChangeListener()
           
 java.io.InputStream getResourceContents(java.util.UUID uuid, java.lang.String resName)
           
 IFolder getResourceFolder(java.util.UUID uuid)
           
 ResourceStorage.ResourceMap getResourceMap()
           
 java.util.UUID getRootNode()
           
 java.util.UUID getUUId(IFile file)
           
 boolean isResourceExists(java.util.UUID uuid, java.lang.String resName)
           
 java.lang.String[] listResources(java.util.UUID uuid)
           
 void moveNodeTo(java.util.UUID curNodeUUId, java.util.UUID newParentUUId)
           
 void remove(java.util.UUID uuid)
           
 void saveAttributes(java.util.UUID uuid, 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
 

Field Detail

RESOURCE_POSTFIX

public static final java.lang.String RESOURCE_POSTFIX
See Also:
Constant Field Values
Constructor Detail

ResourceStorage

public ResourceStorage(IProject project)
Method Detail

getResourceChangeListener

public IResourceChangeListener getResourceChangeListener()

getDeltaProcessor

public DeltaProcessor getDeltaProcessor()

getResourceFolder

public IFolder getResourceFolder(java.util.UUID uuid)

getRootNode

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

getNodeId

public java.lang.String getNodeId(java.util.UUID uuid)
Specified by:
getNodeId in interface ITreeStorage
Specified by:
getNodeId 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

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(IFile file)
Specified by:
getParent in interface ITreeStorage
Specified by:
getParent in class AbstractTreeStorage

getUUId

public java.util.UUID getUUId(IFile file)

getChildren

public java.util.Collection<java.util.UUID> getChildren(java.util.UUID parentUUId)
Specified by:
getChildren in interface ITreeStorage
Specified by:
getChildren 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

getProject

public IProject getProject()

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

isResourceExists

public boolean isResourceExists(java.util.UUID uuid,
                                java.lang.String resName)
Specified by:
isResourceExists in interface ITreeStorage
Specified by:
isResourceExists 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

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

changeNodeId

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

remove

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

saveAttributes

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

moveNodeTo

public void moveNodeTo(java.util.UUID curNodeUUId,
                       java.util.UUID newParentUUId)
Specified by:
moveNodeTo in interface ITreeStorage
Specified by:
moveNodeTo 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

deleteResource

public void deleteResource(java.util.UUID uuid,
                           java.lang.String resName)
Specified by:
deleteResource in interface ITreeStorage
Specified by:
deleteResource 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

getResourceMap

public ResourceStorage.ResourceMap getResourceMap()

getResource

public IFile getResource(java.util.UUID uuid)