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 getTarget()
          Returns the active target.
 boolean isHostAvailable()
          Returns true if host plugin is available.
 void setClientAvailable(boolean available)
          Sets the client availability.
 void setTarget(ServiceSelector.Target target)
          Sets the target to use if available.
 

Method Detail

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) 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)
Sets the target to use if available.

Parameters:
target - the target to use if available

setClientAvailable

void setClientAvailable(boolean available)
Sets the client availability.

Parameters:
available - true if ServiceSelector.Target.REMOTE target can be used

isHostAvailable

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

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


Copyright © 2012 Atlassian. All Rights Reserved.