@ParametersAreNonnullByDefault public class

MockApplicationRoleDefinitions

extends Object
implements ApplicationRoleDefinitions
java.lang.Object
   ↳ com.atlassian.jira.application.MockApplicationRoleDefinitions

Summary

Public Constructors
MockApplicationRoleDefinitions()
Public Methods
MockApplicationRoleDefinition addDefined(String key, String name)
void addDefined(ApplicationRoleDefinitions.ApplicationRoleDefinition definition)
MockApplicationRoleDefinition addLicensed(String key, String name)
void addLicensed(ApplicationRoleDefinitions.ApplicationRoleDefinition definition)
@Nonnull Iterable<ApplicationRoleDefinitions.ApplicationRoleDefinition> getDefined()
Return all the defined ApplicationRoleDefinitions.
@Nonnull Option<ApplicationRoleDefinitions.ApplicationRoleDefinition> getDefined(ApplicationKey key)
Return the ApplicationRoleDefinitions.ApplicationRoleDefinition associated with the passed ApplicationKey provided it is defined.
@Nonnull Iterable<ApplicationRoleDefinitions.ApplicationRoleDefinition> getLicensed()
Return all the licensed ApplicationRoleDefinitions.
Option<ApplicationRoleDefinitions.ApplicationRoleDefinition> getLicensed(ApplicationKey key)
Return the ApplicationRoleDefinitions.ApplicationRoleDefinition associated with the passed ApplicationKey provided it has a license (irrespective of the license state whether it has expired or it user limit has been exceeded).
boolean isDefined(ApplicationKey key)
Return true if the ApplicationRoleDefinitions.ApplicationRoleDefinition identified by the given ApplicationKey is defined.
boolean isLicensed(ApplicationKey key)
Return true if the ApplicationRoleDefinitions.ApplicationRoleDefinition identified by the given ApplicationKey is licensed.
MockApplicationRoleDefinitions removeDefinition(ApplicationRoleDefinitions.ApplicationRoleDefinition def)
void removeDefinition(ApplicationKey key)
void removeLicensed(ApplicationKey key)
MockApplicationRoleDefinitions removeLicensed(ApplicationRoleDefinitions.ApplicationRoleDefinition def)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.application.ApplicationRoleDefinitions

Public Constructors

public MockApplicationRoleDefinitions ()

Public Methods

public MockApplicationRoleDefinition addDefined (String key, String name)

public void addDefined (ApplicationRoleDefinitions.ApplicationRoleDefinition definition)

public MockApplicationRoleDefinition addLicensed (String key, String name)

public void addLicensed (ApplicationRoleDefinitions.ApplicationRoleDefinition definition)

@Nonnull public Iterable<ApplicationRoleDefinitions.ApplicationRoleDefinition> getDefined ()

Return all the defined ApplicationRoleDefinitions.

Returns
  • all the defined ApplicationRoleDefinitions.

@Nonnull public Option<ApplicationRoleDefinitions.ApplicationRoleDefinition> getDefined (ApplicationKey key)

Return the ApplicationRoleDefinitions.ApplicationRoleDefinition associated with the passed ApplicationKey provided it is defined. A value of none() is returned if the passed ApplicationKey is undefined.

Parameters
key the ID to check.
Returns

@Nonnull public Iterable<ApplicationRoleDefinitions.ApplicationRoleDefinition> getLicensed ()

Return all the licensed ApplicationRoleDefinitions.

Returns
  • all the licensed ApplicationRoleDefinitions.

public Option<ApplicationRoleDefinitions.ApplicationRoleDefinition> getLicensed (ApplicationKey key)

Return the ApplicationRoleDefinitions.ApplicationRoleDefinition associated with the passed ApplicationKey provided it has a license (irrespective of the license state whether it has expired or it user limit has been exceeded). A value of none() is returned if the passed ApplicationKey does not have a license.

Parameters
key the ID to check.
Returns

public boolean isDefined (ApplicationKey key)

Return true if the ApplicationRoleDefinitions.ApplicationRoleDefinition identified by the given ApplicationKey is defined.

Parameters
key the key to check.
Returns

public boolean isLicensed (ApplicationKey key)

Return true if the ApplicationRoleDefinitions.ApplicationRoleDefinition identified by the given ApplicationKey is licensed.

Parameters
key the key to check.
Returns

public void removeDefinition (ApplicationKey key)

public void removeLicensed (ApplicationKey key)