com.xebialabs.deployit.test.repository
Class InMemoryRepository

java.lang.Object
  extended by com.xebialabs.deployit.test.repository.InMemoryRepository
All Implemented Interfaces:
com.xebialabs.deployit.plugin.api.deployment.planning.ReadOnlyRepository, com.xebialabs.deployit.plugin.api.services.Repository

public class InMemoryRepository
extends java.lang.Object
implements com.xebialabs.deployit.plugin.api.services.Repository


Field Summary
static java.util.concurrent.atomic.AtomicReference<InMemoryRepository> REFERENCE
           
 
Constructor Summary
InMemoryRepository()
           
 
Method Summary
 void clear()
           
<T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
void
create(T... entities)
           
<T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
void
createOrUpdate(T... entities)
           
 void delete(java.lang.String... ids)
           
 boolean exists(java.lang.String id)
           
 void initializeWithFakeRootFolders()
           
 void move(java.lang.String id, java.lang.String newId)
           
<T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
T
read(java.lang.String id)
           
 void rename(java.lang.String id, java.lang.String newName)
           
<T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
java.util.List<T>
search(com.xebialabs.deployit.plugin.api.reflect.Type type)
           
<T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
java.util.List<T>
search(com.xebialabs.deployit.plugin.api.reflect.Type type, java.lang.String parent)
           
<T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem>
void
update(T... entities)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCE

public static final java.util.concurrent.atomic.AtomicReference<InMemoryRepository> REFERENCE
Constructor Detail

InMemoryRepository

public InMemoryRepository()
Method Detail

initializeWithFakeRootFolders

public void initializeWithFakeRootFolders()

exists

public boolean exists(java.lang.String id)
Specified by:
exists in interface com.xebialabs.deployit.plugin.api.services.Repository

read

public <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> T read(java.lang.String id)
Specified by:
read in interface com.xebialabs.deployit.plugin.api.deployment.planning.ReadOnlyRepository
Specified by:
read in interface com.xebialabs.deployit.plugin.api.services.Repository

create

public <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> void create(T... entities)
Specified by:
create in interface com.xebialabs.deployit.plugin.api.services.Repository

update

public <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> void update(T... entities)
Specified by:
update in interface com.xebialabs.deployit.plugin.api.services.Repository

createOrUpdate

public <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> void createOrUpdate(T... entities)
Specified by:
createOrUpdate in interface com.xebialabs.deployit.plugin.api.services.Repository

delete

public void delete(java.lang.String... ids)
Specified by:
delete in interface com.xebialabs.deployit.plugin.api.services.Repository

move

public void move(java.lang.String id,
                 java.lang.String newId)
Specified by:
move in interface com.xebialabs.deployit.plugin.api.services.Repository

rename

public void rename(java.lang.String id,
                   java.lang.String newName)
Specified by:
rename in interface com.xebialabs.deployit.plugin.api.services.Repository

search

public <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> java.util.List<T> search(com.xebialabs.deployit.plugin.api.reflect.Type type)
Specified by:
search in interface com.xebialabs.deployit.plugin.api.deployment.planning.ReadOnlyRepository
Specified by:
search in interface com.xebialabs.deployit.plugin.api.services.Repository

search

public <T extends com.xebialabs.deployit.plugin.api.udm.ConfigurationItem> java.util.List<T> search(com.xebialabs.deployit.plugin.api.reflect.Type type,
                                                                                                    java.lang.String parent)
Specified by:
search in interface com.xebialabs.deployit.plugin.api.deployment.planning.ReadOnlyRepository
Specified by:
search in interface com.xebialabs.deployit.plugin.api.services.Repository

clear

public void clear()