com.atlassian.jira.license
Class MockLicenseRoleDefinitions
java.lang.Object
com.atlassian.jira.license.MockLicenseRoleDefinitions
- All Implemented Interfaces:
- LicenseRoleDefinitions
public class MockLicenseRoleDefinitions
- extends Object
- implements LicenseRoleDefinitions
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockLicenseRoleDefinitions
public MockLicenseRoleDefinitions()
getDefinedRoleDefinitions
@Nonnull
public Set<LicenseRoleDefinition> getDefinedRoleDefinitions()
- Description copied from interface:
LicenseRoleDefinitions
- Return all the defined
LicenseRoleDefinition
s. 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
LicenseRoleDefinition
s.
getAuthenticatedRoleDefinitions
@Nonnull
public Set<LicenseRoleDefinition> getAuthenticatedRoleDefinitions()
- Description copied from interface:
LicenseRoleDefinitions
- Return all the authenticated
LicenseRoleDefinition
s. A LicenseRoleDefinition
is authenticated when
a plugin defines it and it is licensed.
- Specified by:
getAuthenticatedRoleDefinitions
in interface LicenseRoleDefinitions
- Returns:
- all the authenticated
LicenseRoleDefinition
s.
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.