com.atlassian.jira.license
Class MockLicenseRoleDefinitions

java.lang.Object
  extended by com.atlassian.jira.license.MockLicenseRoleDefinitions
All Implemented Interfaces:
LicenseRoleDefinitions

public class MockLicenseRoleDefinitions
extends Object
implements LicenseRoleDefinitions


Constructor Summary
MockLicenseRoleDefinitions()
           
 
Method Summary
 MockLicenseRoleDefinitions addAuthorised(LicenseRoleDefinition def)
           
 MockLicenseRoleDefinitions addDefined(LicenseRoleDefinition def)
           
 com.atlassian.fugue.Option<LicenseRoleDefinition> getAuthenticatedRoleDefinition(LicenseRoleId licenseRoleId)
          Return the LicenseRoleDefinition associated with the passed LicenseRoleId provided it is authenticated.
 Set<LicenseRoleDefinition> getAuthenticatedRoleDefinitions()
          Return all the authenticated LicenseRoleDefinitions.
 com.atlassian.fugue.Option<LicenseRoleDefinition> getDefinedRoleDefinition(LicenseRoleId licenseRoleId)
          Return the LicenseRoleDefinition associated with the passed LicenseRoleId provided it is defined.
 Set<LicenseRoleDefinition> getDefinedRoleDefinitions()
          Return all the defined LicenseRoleDefinitions.
 boolean isLicenseRoleAuthenticated(LicenseRoleId licenseRoleId)
          Return true when the passed LicenseRoleId is authenticated.
 boolean isLicenseRoleDefined(LicenseRoleId licenseRoleId)
          Return true when the passed LicenseRoleId is defined.
 MockLicenseRoleDefinitions removeAuthorised(LicenseRoleDefinition def)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockLicenseRoleDefinitions

public MockLicenseRoleDefinitions()
Method Detail

getDefinedRoleDefinitions

@Nonnull
public Set<LicenseRoleDefinition> getDefinedRoleDefinitions()
Description copied from interface: LicenseRoleDefinitions
Return all the defined LicenseRoleDefinitions. A LicenseRoleDefinition is defined when a plugin provides it. This does not indicate if the LicenseRoleDefinition is licensed or not.

Specified by:
getDefinedRoleDefinitions in interface LicenseRoleDefinitions
Returns:
all the defined LicenseRoleDefinitions.

getAuthenticatedRoleDefinitions

@Nonnull
public Set<LicenseRoleDefinition> getAuthenticatedRoleDefinitions()
Description copied from interface: LicenseRoleDefinitions
Return all the authenticated LicenseRoleDefinitions. A LicenseRoleDefinition is authenticated when a plugin defines it and it is licensed.

Specified by:
getAuthenticatedRoleDefinitions in interface LicenseRoleDefinitions
Returns:
all the authenticated LicenseRoleDefinitions.

isLicenseRoleDefined

public boolean isLicenseRoleDefined(@Nonnull
                                    LicenseRoleId licenseRoleId)
Description copied from interface: LicenseRoleDefinitions
Return true when the passed LicenseRoleId is defined. A LicenseRoleId is defined when a plugin provides a LicenseRoleDefinition. This does not indicate if the LicenseRoleId is licensed or not.

Specified by:
isLicenseRoleDefined in interface LicenseRoleDefinitions
Parameters:
licenseRoleId - the ID to check.
Returns:
true when the passed LicenseRoleId is defined.

isLicenseRoleAuthenticated

public boolean isLicenseRoleAuthenticated(@Nonnull
                                          LicenseRoleId licenseRoleId)
Description copied from interface: LicenseRoleDefinitions
Return true when the passed LicenseRoleId is authenticated. A LicenseRoleId is authenticated when a plugin provides a LicenseRoleDefinition and it is also licensed.

Specified by:
isLicenseRoleAuthenticated in interface LicenseRoleDefinitions
Parameters:
licenseRoleId - the ID to check.
Returns:
true when the passed LicenseRoleId is authenticated.

getDefinedRoleDefinition

@Nonnull
public com.atlassian.fugue.Option<LicenseRoleDefinition> getDefinedRoleDefinition(@Nonnull
                                                                                          LicenseRoleId licenseRoleId)
Description copied from interface: LicenseRoleDefinitions
Return the LicenseRoleDefinition associated with the passed LicenseRoleId provided it is defined. A value of Option.none() is returned if the passed LicenseRoleId is undefined. A LicenseRoleId is defined when a plugin provides a LicenseRoleDefinition. This does not indicate if the LicenseRoleId is licensed or not.

Specified by:
getDefinedRoleDefinition in interface LicenseRoleDefinitions
Parameters:
licenseRoleId - the ID to check.
Returns:
Return the LicenseRoleDefinition associated with the passed LicenseRoleId if it is defined or Option.none() otherwise.

getAuthenticatedRoleDefinition

@Nonnull
public com.atlassian.fugue.Option<LicenseRoleDefinition> getAuthenticatedRoleDefinition(@Nonnull
                                                                                                LicenseRoleId licenseRoleId)
Description copied from interface: LicenseRoleDefinitions
Return the LicenseRoleDefinition associated with the passed LicenseRoleId provided it is authenticated. A value of Option.none() is returned if the passed LicenseRoleId is not authenticated. A LicenseRoleId is authenticated when a plugin provides a LicenseRoleDefinition and it is licensed.

Specified by:
getAuthenticatedRoleDefinition in interface LicenseRoleDefinitions
Parameters:
licenseRoleId - the ID to check.
Returns:
Return the LicenseRoleDefinition associated with the passed LicenseRoleId if it is authenticated or Option.none() otherwise.

addDefined

public MockLicenseRoleDefinitions addDefined(LicenseRoleDefinition def)

addAuthorised

public MockLicenseRoleDefinitions addAuthorised(LicenseRoleDefinition def)

removeAuthorised

public MockLicenseRoleDefinitions removeAuthorised(LicenseRoleDefinition def)


Copyright © 2002-2014 Atlassian. All Rights Reserved.