public class MockLicenseRole extends Object implements LicenseRole
Constructor and Description |
---|
MockLicenseRole() |
MockLicenseRole(LicenseRole copy) |
Modifier and Type | Method and Description |
---|---|
MockLicenseRole |
copy() |
boolean |
equals(Object o) |
Set<String> |
getGroups()
Return the set of Group Ids associated with the role.
|
LicenseRoleId |
getId()
Returns the canonical
LicenseRoleId that uniquely identifies this LicenseRole . |
String |
getName()
Return the name of the license role.
|
com.atlassian.fugue.Option<String> |
getPrimaryGroup()
Return the primary group configured for the role.
|
MockLicenseRole |
groups(Iterable<String> groups) |
MockLicenseRole |
groups(String... groups) |
int |
hashCode() |
MockLicenseRole |
id(LicenseRoleId id) |
MockLicenseRole |
id(String id) |
MockLicenseRole |
name(String name) |
MockLicenseRole |
primaryGroup(com.atlassian.fugue.Option<String> group) |
MockLicenseRole |
primaryGroup(String group) |
String |
toString() |
LicenseRole |
withGroups(Iterable<String> groups,
com.atlassian.fugue.Option<String> primaryGroup)
Return a new LicenseRole with its groups and primaryGroup set to the passed arguments.
|
public MockLicenseRole()
public MockLicenseRole(LicenseRole copy)
public MockLicenseRole id(String id)
public MockLicenseRole id(LicenseRoleId id)
public MockLicenseRole name(String name)
public MockLicenseRole groups(String... groups)
public MockLicenseRole groups(Iterable<String> groups)
public MockLicenseRole primaryGroup(String group)
public MockLicenseRole primaryGroup(com.atlassian.fugue.Option<String> group)
@Nonnull public LicenseRoleId getId()
LicenseRole
LicenseRoleId
that uniquely identifies this LicenseRole
.getId
in interface LicenseRole
LicenseRoleId
that uniquely identifies this LicenseRole
.@Nonnull public String getName()
LicenseRole
getName
in interface LicenseRole
@Nonnull public Set<String> getGroups()
LicenseRole
getGroups
in interface LicenseRole
@Nonnull public com.atlassian.fugue.Option<String> getPrimaryGroup()
LicenseRole
Option.none()
may be returned
if no primary is configured.getPrimaryGroup
in interface LicenseRole
@Nonnull public LicenseRole withGroups(@Nonnull Iterable<String> groups, @Nonnull com.atlassian.fugue.Option<String> primaryGroup)
LicenseRole
withGroups
in interface LicenseRole
groups
- the groups associated with the role.primaryGroup
- primary group for the role. A value of Option.none()
can be
passed indicate that there is no primaryGroup for the role.public MockLicenseRole copy()
Copyright © 2002-2015 Atlassian. All Rights Reserved.