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()
ApplicationRole
ApplicationKey
that uniquely identifies this ApplicationRole
.getKey
in interface ApplicationRole
ApplicationKey
that uniquely identifies this ApplicationRole
.@Nonnull public String getName()
ApplicationRole
ApplicationRole
. The name is i18ned for the calling user if possible.getName
in interface ApplicationRole
ApplicationRole
role. The name is i18ned for the calling user if possible.@Nonnull public Set<com.atlassian.crowd.embedded.api.Group> getGroups()
ApplicationRole
getGroups
in interface ApplicationRole
@Nonnull public Set<com.atlassian.crowd.embedded.api.Group> getDefaultGroups()
ApplicationRole
getDefaultGroups
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)
ApplicationRole
ApplicationRole
with its groups and default groups set to the passed
values.withGroups
in interface ApplicationRole
groups
- 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()
ApplicationRole
ApplicationRole
issued with the licence.getNumberOfSeats
in interface ApplicationRole
ApplicationRole
issued with the licence.
public boolean isSelectedByDefault()
ApplicationRole
ApplicationRole
should be selected by default on user creationisSelectedByDefault
in interface ApplicationRole
true
when ApplicationRole
should be selected by default on user creationpublic boolean isDefined()
ApplicationRole
ApplicationRoleDefinition
identified by the ApplicationKey
is defined. An ApplicationRole
is defined when the JIRA plugin
that defines it is installed.isDefined
in interface ApplicationRole
true
if the ApplicationRole
is definedpublic boolean isPlatform()
ApplicationRole
isPlatform
in interface ApplicationRole
public ApplicationRole withSelectedByDefault(boolean selectedByDefault)
ApplicationRole
ApplicationRole
with its selected by default settings set to passed valuewithSelectedByDefault
in interface ApplicationRole
selectedByDefault
- the new selected by default settingsApplicationRole
with its selected by default settings set to passed valuepublic MockApplicationRole copy()
Copyright © 2002-2018 Atlassian. All Rights Reserved.