com.atlassian.mywork.service
Interface ServiceSelector


public interface ServiceSelector

This service is responsible for managing where the data is persisted locally, remotely or not persisted at all.


Nested Class Summary
static class ServiceSelector.Target
           
 
Method Summary
 ServiceSelector.Target getEffectiveTarget()
           
 ServiceSelector.Target getTarget()
          Returns the active target.
 boolean isHostAvailable()
          Returns true if host plugin is available.
 void setTarget(ServiceSelector.Target target, com.atlassian.applinks.api.ApplicationId host)
          Sets the target to use if available.
 

Method Detail

getEffectiveTarget

ServiceSelector.Target getEffectiveTarget()

getTarget

ServiceSelector.Target getTarget()
Returns the active target.

Note that this might differ from the target set by setTarget(com.atlassian.mywork.service.ServiceSelector.Target, ApplicationId) for example when configured to use ServiceSelector.Target.REMOTE but the remote host is not available.

Returns:
the active target

setTarget

void setTarget(ServiceSelector.Target target,
               com.atlassian.applinks.api.ApplicationId host)
Sets the target to use if available.

Parameters:
target - the target to use if available

isHostAvailable

boolean isHostAvailable()
Returns true if host plugin is available.

Returns:
true if ServiceSelector.Target.LOCAL can be used


Copyright © 2013 Atlassian. All Rights Reserved.