com.atlassian.jira.studio
Class MockStudioHooks.MockStudioLicenseHooks

java.lang.Object
  extended by com.atlassian.jira.studio.MockStudioHooks.MockStudioLicenseHooks
All Implemented Interfaces:
StudioLicenseHooks
Enclosing class:
MockStudioHooks

public static class MockStudioHooks.MockStudioLicenseHooks
extends Object
implements StudioLicenseHooks


Constructor Summary
MockStudioHooks.MockStudioLicenseHooks()
           
 
Method Summary
 boolean canActivateNumberOfUsers(int numUsers, com.atlassian.util.concurrent.Function<Integer,Boolean> method)
          Called when a call to UserUtil.canActivateNumberOfUsers(int) is made.
 boolean canActivateUsers(Collection<String> userNames, com.atlassian.util.concurrent.Function<Collection<String>,Boolean> method)
          Called when a call to UserUtil.canActivateUsers(java.util.Collection) is made.
 void clearActiveUserCount(com.atlassian.util.concurrent.Function<Void,Void> method)
          Called when a call to UserUtil.clearActiveUserCount() is made.
static MockStudioHooks.MockStudioLicenseHooks getInstance()
           
 boolean hasExceededUserLimit(com.atlassian.util.concurrent.Function<Void,Boolean> method)
          Called when a call to UserUtil.hasExceededUserLimit() is made.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockStudioHooks.MockStudioLicenseHooks

public MockStudioHooks.MockStudioLicenseHooks()
Method Detail

getInstance

public static MockStudioHooks.MockStudioLicenseHooks getInstance()

clearActiveUserCount

public void clearActiveUserCount(com.atlassian.util.concurrent.Function<Void,Void> method)
Description copied from interface: StudioLicenseHooks
Called when a call to UserUtil.clearActiveUserCount() is made. JIRA's default implementation of this method can be called by invoking the function passed to the method.

Specified by:
clearActiveUserCount in interface StudioLicenseHooks
Parameters:
method - function that can be used to invoke JIRAs default implementation of this method.

hasExceededUserLimit

public boolean hasExceededUserLimit(com.atlassian.util.concurrent.Function<Void,Boolean> method)
Description copied from interface: StudioLicenseHooks
Called when a call to UserUtil.hasExceededUserLimit() is made. JIRA's default implementation of this method can be called by invoking the function passed to the method.

Specified by:
hasExceededUserLimit in interface StudioLicenseHooks
Parameters:
method - function that can be used to invoke JIRAs default implementation of this method.
Returns:
see UserUtil.hasExceededUserLimit()}.

canActivateNumberOfUsers

public boolean canActivateNumberOfUsers(int numUsers,
                                        com.atlassian.util.concurrent.Function<Integer,Boolean> method)
Description copied from interface: StudioLicenseHooks
Called when a call to UserUtil.canActivateNumberOfUsers(int) is made. JIRA's default implementation of this method can be called by invoking the function passed to the method.

Specified by:
canActivateNumberOfUsers in interface StudioLicenseHooks
Parameters:
numUsers - see UserUtil.canActivateNumberOfUsers(int)
method - function that can be used to invoke JIRAs default implementation of this method.
Returns:
see UserUtil.canActivateNumberOfUsers(int)

canActivateUsers

public boolean canActivateUsers(Collection<String> userNames,
                                com.atlassian.util.concurrent.Function<Collection<String>,Boolean> method)
Description copied from interface: StudioLicenseHooks
Called when a call to UserUtil.canActivateUsers(java.util.Collection) is made. JIRA's default implementation of this method can be called by invoking the function passed to the method.

Specified by:
canActivateUsers in interface StudioLicenseHooks
Parameters:
userNames - see UserUtil.canActivateUsers(java.util.Collection)
method - function that can be used to invoke JIRAs default implementation of this method.
Returns:
see UserUtil.canActivateUsers(java.util.Collection)


Copyright © 2002-2013 Atlassian. All Rights Reserved.