org.objectweb.dsrg.sofa.repository
Class RepositoryDeleter

java.lang.Object
  extended by org.objectweb.dsrg.sofa.repository.RepositoryDeleter

public class RepositoryDeleter
extends java.lang.Object

This class is responsible for deleting any data from the repository.


Constructor Summary
RepositoryDeleter(NodeConfiguration configuration)
          This constructor should not be used by public.
 
Method Summary
 void delete(java.util.List<VersionedEntity> entityList, boolean deleteDependencies)
          Main method of this class.
 void delete(VersionedEntity entity, boolean deleteDependencies)
          Main method of this class.
 java.util.List<VersionedEntity> getDeletingDependencies(VersionedEntity entity)
          Function for getting all dependencies that should be deleted with the entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryDeleter

public RepositoryDeleter(NodeConfiguration configuration)
This constructor should not be used by public. It is used by RepositoryAgent.

Parameters:
rs - RepositoryAgent's ResourceSet
Method Detail

delete

public void delete(VersionedEntity entity,
                   boolean deleteDependencies)
            throws java.io.IOException
Main method of this class. Deletes specified entity from repository.

Parameters:
entity - VersionedEntity to be deleted from Repository
deleteDepencies - Boolean indicating whether the dependencies of the entity should also be deleted. You probably want this to be set to true.
Throws:
java.io.IOException

delete

public void delete(java.util.List<VersionedEntity> entityList,
                   boolean deleteDependencies)
            throws java.io.IOException
Main method of this class. Deletes specified entity from repository.

Parameters:
entityList - List of VersionedEntities to be deleted from Repository
deleteDepencies - Boolean indicating whether the dependencies of the entities should also be deleted. You probably want this to be set to true.
Throws:
java.io.IOException

getDeletingDependencies

public java.util.List<VersionedEntity> getDeletingDependencies(VersionedEntity entity)
Function for getting all dependencies that should be deleted with the entity. WARNING - can take quite a time to execute.

Parameters:
entity - The entity which is about to be deleted.
Returns:
List of dependencies to be deleted with the entity to keep consistency.