com.atlassian.jira.mock.multitenant
Class MockMultiTenantComponentMap<T>

java.lang.Object
  extended by com.atlassian.jira.mock.multitenant.MockMultiTenantComponentMap<T>
All Implemented Interfaces:
com.atlassian.multitenant.MultiTenantComponentMap<T>, com.atlassian.multitenant.MultiTenantLifecycleAware

public class MockMultiTenantComponentMap<T>
extends Object
implements com.atlassian.multitenant.MultiTenantComponentMap<T>

Map that doesn't use tenant reference, rather it always returns the same component.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.multitenant.MultiTenantComponentMap
com.atlassian.multitenant.MultiTenantComponentMap.LazyLoadStrategy, com.atlassian.multitenant.MultiTenantComponentMap.NoTenantStrategy, com.atlassian.multitenant.MultiTenantComponentMap.Registration
 
Constructor Summary
MockMultiTenantComponentMap(com.atlassian.multitenant.MultiTenantCreator<T> creator, com.atlassian.multitenant.TenantReference tenantReference)
           
 
Method Summary
 void addInstance(T object)
           
 void destroy()
           
 T get()
           
 Collection<T> getAll()
           
 void initialiseAll()
           
 boolean isInitialised()
           
 void onTenantStart(com.atlassian.multitenant.Tenant tenant)
           
 void onTenantStop(com.atlassian.multitenant.Tenant tenant)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockMultiTenantComponentMap

public MockMultiTenantComponentMap(com.atlassian.multitenant.MultiTenantCreator<T> creator,
                                   com.atlassian.multitenant.TenantReference tenantReference)
Method Detail

get

public T get()
      throws IllegalStateException
Specified by:
get in interface com.atlassian.multitenant.MultiTenantComponentMap<T>
Throws:
IllegalStateException

getAll

public Collection<T> getAll()
Specified by:
getAll in interface com.atlassian.multitenant.MultiTenantComponentMap<T>

initialiseAll

public void initialiseAll()
Specified by:
initialiseAll in interface com.atlassian.multitenant.MultiTenantComponentMap<T>

isInitialised

public boolean isInitialised()
                      throws IllegalStateException
Specified by:
isInitialised in interface com.atlassian.multitenant.MultiTenantComponentMap<T>
Throws:
IllegalStateException

addInstance

public void addInstance(T object)
                 throws IllegalStateException
Specified by:
addInstance in interface com.atlassian.multitenant.MultiTenantComponentMap<T>
Throws:
IllegalStateException

destroy

public void destroy()
Specified by:
destroy in interface com.atlassian.multitenant.MultiTenantComponentMap<T>

onTenantStart

public void onTenantStart(com.atlassian.multitenant.Tenant tenant)
Specified by:
onTenantStart in interface com.atlassian.multitenant.MultiTenantLifecycleAware

onTenantStop

public void onTenantStop(com.atlassian.multitenant.Tenant tenant)
Specified by:
onTenantStop in interface com.atlassian.multitenant.MultiTenantLifecycleAware


Copyright © 2002-2013 Atlassian. All Rights Reserved.