@ParametersAreNonnullByDefault public class MockApplicationRoleDefinitions extends Object implements ApplicationRoleDefinitions
ApplicationRoleDefinitions.ApplicationRoleDefinition
Constructor and Description |
---|
MockApplicationRoleDefinitions() |
Modifier and Type | Method and Description |
---|---|
void |
addDefined(ApplicationRoleDefinitions.ApplicationRoleDefinition definition) |
MockApplicationRoleDefinition |
addDefined(String key,
String name) |
void |
addLicensed(ApplicationRoleDefinitions.ApplicationRoleDefinition definition) |
MockApplicationRoleDefinition |
addLicensed(String key,
String name) |
Iterable<ApplicationRoleDefinitions.ApplicationRoleDefinition> |
getDefined()
Return all the defined
ApplicationRoleDefinition s. |
io.atlassian.fugue.Option<ApplicationRoleDefinitions.ApplicationRoleDefinition> |
getDefined(com.atlassian.application.api.ApplicationKey key)
Return the
ApplicationRoleDefinitions.ApplicationRoleDefinition associated with the passed ApplicationKey
provided it is defined. |
Iterable<ApplicationRoleDefinitions.ApplicationRoleDefinition> |
getLicensed()
Return all the licensed
ApplicationRoleDefinition s. |
io.atlassian.fugue.Option<ApplicationRoleDefinitions.ApplicationRoleDefinition> |
getLicensed(com.atlassian.application.api.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(com.atlassian.application.api.ApplicationKey key)
Return
true if the ApplicationRoleDefinitions.ApplicationRoleDefinition identified by the given ApplicationKey
is defined. |
boolean |
isLicensed(com.atlassian.application.api.ApplicationKey key)
Return
true if the ApplicationRoleDefinitions.ApplicationRoleDefinition identified by the given ApplicationKey
is licensed. |
void |
removeDefinition(com.atlassian.application.api.ApplicationKey key) |
MockApplicationRoleDefinitions |
removeDefinition(ApplicationRoleDefinitions.ApplicationRoleDefinition def) |
void |
removeLicensed(com.atlassian.application.api.ApplicationKey key) |
MockApplicationRoleDefinitions |
removeLicensed(ApplicationRoleDefinitions.ApplicationRoleDefinition def) |
@Nonnull public Iterable<ApplicationRoleDefinitions.ApplicationRoleDefinition> getDefined()
ApplicationRoleDefinitions
ApplicationRoleDefinition
s.getDefined
in interface ApplicationRoleDefinitions
ApplicationRoleDefinition
s.@Nonnull public io.atlassian.fugue.Option<ApplicationRoleDefinitions.ApplicationRoleDefinition> getDefined(com.atlassian.application.api.ApplicationKey key)
ApplicationRoleDefinitions
ApplicationRoleDefinitions.ApplicationRoleDefinition
associated with the passed ApplicationKey
provided it is defined. A value of Option.none()
is returned if the passed
ApplicationKey
is undefined.getDefined
in interface ApplicationRoleDefinitions
key
- the ID to check.ApplicationRoleDefinitions.ApplicationRoleDefinition
associated with the passed
ApplicationKey
if it is defined or Option.none()
otherwise.public boolean isDefined(com.atlassian.application.api.ApplicationKey key)
ApplicationRoleDefinitions
true
if the ApplicationRoleDefinitions.ApplicationRoleDefinition
identified by the given ApplicationKey
is defined.isDefined
in interface ApplicationRoleDefinitions
key
- the key to check.true
when the passed ApplicationRoleDefinitions.ApplicationRoleDefinition
is defined.@Nonnull public Iterable<ApplicationRoleDefinitions.ApplicationRoleDefinition> getLicensed()
ApplicationRoleDefinitions
ApplicationRoleDefinition
s.getLicensed
in interface ApplicationRoleDefinitions
ApplicationRoleDefinition
s.public io.atlassian.fugue.Option<ApplicationRoleDefinitions.ApplicationRoleDefinition> getLicensed(com.atlassian.application.api.ApplicationKey key)
ApplicationRoleDefinitions
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 Option.none()
is returned if the passed ApplicationKey
does not have a license.getLicensed
in interface ApplicationRoleDefinitions
key
- the ID to check.ApplicationRoleDefinitions.ApplicationRoleDefinition
associated with the passed
ApplicationKey
if it has a license or Option.none()
otherwise.public boolean isLicensed(com.atlassian.application.api.ApplicationKey key)
ApplicationRoleDefinitions
true
if the ApplicationRoleDefinitions.ApplicationRoleDefinition
identified by the given ApplicationKey
is licensed.isLicensed
in interface ApplicationRoleDefinitions
key
- the key to check.true
when the passed ApplicationRoleDefinitions.ApplicationRoleDefinition
is licensed.public void addDefined(ApplicationRoleDefinitions.ApplicationRoleDefinition definition)
public MockApplicationRoleDefinition addDefined(String key, String name)
public void addLicensed(ApplicationRoleDefinitions.ApplicationRoleDefinition definition)
public MockApplicationRoleDefinition addLicensed(String key, String name)
public void removeDefinition(com.atlassian.application.api.ApplicationKey key)
public void removeLicensed(com.atlassian.application.api.ApplicationKey key)
public MockApplicationRoleDefinitions removeDefinition(ApplicationRoleDefinitions.ApplicationRoleDefinition def)
public MockApplicationRoleDefinitions removeLicensed(ApplicationRoleDefinitions.ApplicationRoleDefinition def)
Copyright © 2002-2019 Atlassian. All Rights Reserved.