public class MockApplicationRole extends Object implements ApplicationRole
| Constructor and Description |
|---|
MockApplicationRole() |
MockApplicationRole(com.atlassian.application.api.ApplicationKey key) |
MockApplicationRole(ApplicationRole copy) |
| Modifier and Type | Method and Description |
|---|---|
MockApplicationRole |
copy() |
MockApplicationRole |
defaultGroupNames(Iterable<String> names) |
MockApplicationRole |
defaultGroupNames(String... names) |
MockApplicationRole |
defaultGroups(com.atlassian.crowd.embedded.api.Group... group) |
MockApplicationRole |
defaultGroups(Iterable<com.atlassian.crowd.embedded.api.Group> groups) |
MockApplicationRole |
defined(boolean defined) |
boolean |
equals(Object o) |
Set<com.atlassian.crowd.embedded.api.Group> |
getDefaultGroups()
Return the default groups configured for the role.
|
Set<com.atlassian.crowd.embedded.api.Group> |
getGroups()
Return the set of groups associated with the role including the default ones.
|
com.atlassian.application.api.ApplicationKey |
getKey()
Returns the canonical
ApplicationKey that uniquely identifies this ApplicationRole. |
String |
getName()
Return the name of the
ApplicationRole. |
int |
getNumberOfSeats()
Returns the total number of seats of this
ApplicationRole issued with the licence. |
MockApplicationRole |
groupNames(Iterable<String> groups) |
MockApplicationRole |
groupNames(String... groups) |
MockApplicationRole |
groups(com.atlassian.crowd.embedded.api.Group... groups) |
MockApplicationRole |
groups(Iterable<com.atlassian.crowd.embedded.api.Group> groups) |
int |
hashCode() |
boolean |
isDefined()
Indicates if the Application/Product is defined.
|
boolean |
isPlatform()
Returns whether the role is part of the core platform.
|
boolean |
isSelectedByDefault()
Determines whether
ApplicationRole should be selected by default on user creation |
MockApplicationRole |
key(com.atlassian.application.api.ApplicationKey key) |
MockApplicationRole |
key(String id) |
MockApplicationRole |
name(String name) |
MockApplicationRole |
numberOfSeats(int numberOfLicenseSeats) |
MockApplicationRole |
selectedByDefault(boolean selectedByDefault) |
String |
toString() |
MockApplicationRole |
unlimitedSeats() |
ApplicationRole |
withGroups(Iterable<com.atlassian.crowd.embedded.api.Group> groups,
Iterable<com.atlassian.crowd.embedded.api.Group> defaultGroups)
Return a new
ApplicationRole with its groups and default groups set to the passed
values. |
ApplicationRole |
withSelectedByDefault(boolean selectedByDefault)
Returns a new
ApplicationRole with its selected by default settings set to passed value |
public MockApplicationRole()
public MockApplicationRole(com.atlassian.application.api.ApplicationKey key)
public MockApplicationRole(ApplicationRole copy)
public MockApplicationRole key(String id)
public MockApplicationRole key(com.atlassian.application.api.ApplicationKey key)
public MockApplicationRole name(String name)
public MockApplicationRole groups(com.atlassian.crowd.embedded.api.Group... groups)
public MockApplicationRole groupNames(String... groups)
public MockApplicationRole groups(Iterable<com.atlassian.crowd.embedded.api.Group> groups)
public MockApplicationRole groupNames(Iterable<String> groups)
public MockApplicationRole defaultGroups(com.atlassian.crowd.embedded.api.Group... group)
public MockApplicationRole defaultGroupNames(String... names)
public MockApplicationRole defaultGroups(Iterable<com.atlassian.crowd.embedded.api.Group> groups)
public MockApplicationRole defaultGroupNames(Iterable<String> names)
public MockApplicationRole numberOfSeats(int numberOfLicenseSeats)
public MockApplicationRole selectedByDefault(boolean selectedByDefault)
public MockApplicationRole defined(boolean defined)
public MockApplicationRole unlimitedSeats()
@Nonnull public com.atlassian.application.api.ApplicationKey getKey()
ApplicationRoleApplicationKey that uniquely identifies this ApplicationRole.getKey in interface ApplicationRoleApplicationKey that uniquely identifies this ApplicationRole.@Nonnull public String getName()
ApplicationRoleApplicationRole. The name is i18ned for the calling user if possible.getName in interface ApplicationRoleApplicationRole role. The name is i18ned for the calling user if possible.@Nonnull public Set<com.atlassian.crowd.embedded.api.Group> getGroups()
ApplicationRolegetGroups in interface ApplicationRole@Nonnull public Set<com.atlassian.crowd.embedded.api.Group> getDefaultGroups()
ApplicationRolegetDefaultGroups in interface ApplicationRole@Nonnull public ApplicationRole withGroups(@Nonnull Iterable<com.atlassian.crowd.embedded.api.Group> groups, @Nonnull Iterable<com.atlassian.crowd.embedded.api.Group> defaultGroups)
ApplicationRoleApplicationRole with its groups and default groups set to the passed
values.withGroups in interface ApplicationRolegroups - the groups associated with the role.defaultGroups - default groups for the role.ApplicationRole with its groups and default groups set to the passed arguments.public int getNumberOfSeats()
ApplicationRoleApplicationRole issued with the licence.getNumberOfSeats in interface ApplicationRoleApplicationRole issued with the licence.
public boolean isSelectedByDefault()
ApplicationRoleApplicationRole should be selected by default on user creationisSelectedByDefault in interface ApplicationRoletrue when ApplicationRole should be selected by default on user creationpublic boolean isDefined()
ApplicationRoleApplicationRoleDefinition
identified by the ApplicationKey is defined. An ApplicationRole is defined when the JIRA plugin
that defines it is installed.isDefined in interface ApplicationRoletrue if the ApplicationRole is definedpublic boolean isPlatform()
ApplicationRoleisPlatform in interface ApplicationRolepublic ApplicationRole withSelectedByDefault(boolean selectedByDefault)
ApplicationRoleApplicationRole with its selected by default settings set to passed valuewithSelectedByDefault in interface ApplicationRoleselectedByDefault - the new selected by default settingsApplicationRole with its selected by default settings set to passed valuepublic MockApplicationRole copy()
Copyright © 2002-2022 Atlassian. All Rights Reserved.