public class OwnershipDescription extends Object
| Modifier and Type | Field and Description |
|---|---|
static OwnershipDescription |
DISABLED_DESCR
Disabled description, which means that ownership is disabled
|
| Constructor and Description |
|---|
OwnershipDescription(boolean ownershipEnabled,
String primaryOwnerId)
Deprecated.
Use constructor with co-owners specification
|
OwnershipDescription(boolean ownershipEnabled,
String primaryOwnerId,
Collection<String> coownersIds)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getCoownersIds()
Gets list of coowners.
|
hudson.model.User |
getPrimaryOwner()
Get primary owner.
|
String |
getPrimaryOwnerId()
Gets id of primary owner.
|
boolean |
hasPrimaryOwner() |
static boolean |
isEnabled(OwnershipDescription descr)
Check if ownership is enabled.
|
boolean |
isOwner(hudson.model.User user,
boolean acceptCoowners)
Check if User is owner.
|
boolean |
isOwnershipEnabled()
Check if ownership is enabled.
|
boolean |
isPrimaryOwner(hudson.model.User user) |
static OwnershipDescription |
Parse(net.sf.json.JSONObject formData,
String blockName) |
String |
toString() |
public static final OwnershipDescription DISABLED_DESCR
public OwnershipDescription(boolean ownershipEnabled,
String primaryOwnerId)
primaryOwnerId - userId of primary ownerpublic OwnershipDescription(boolean ownershipEnabled,
String primaryOwnerId,
Collection<String> coownersIds)
primaryOwnerId - userId of primary ownercoownersIds - userIds of secondary ownerspublic boolean isOwnershipEnabled()
public String getPrimaryOwnerId()
public hudson.model.User getPrimaryOwner()
public Set<String> getCoownersIds()
public static OwnershipDescription Parse(net.sf.json.JSONObject formData, String blockName)
public boolean isOwner(hudson.model.User user,
boolean acceptCoowners)
user - User to be checkedacceptCoowners - Check if user belongs to coownerspublic boolean hasPrimaryOwner()
public boolean isPrimaryOwner(hudson.model.User user)
public static boolean isEnabled(OwnershipDescription descr)
descr - Ownership description (can be null)Copyright © 2004-2013. All Rights Reserved.