Package nzilbb.labbcat.model
Class RolePermission
- java.lang.Object
-
- nzilbb.labbcat.model.RolePermission
-
public class RolePermission extends Object
User role permission record.This model hides a wart in the API; it uses
attribute_name
instead of the now-more-correctlayerId
.- Author:
- Robert Fromont robert@fromont.net.nz
-
-
Constructor Summary
Constructors Constructor Description RolePermission()Default constructor.RolePermission(javax.json.JsonObject json)Constructor from JSON.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEntity()Getter forentity: The media entity this permission applies to - a string made up of "t" (transcript), "a" (audio), "v" (video), or "i" (image).StringgetLayerId()Getter forlayerId: ID of the layer for which the label determines access.StringgetRoleId()Getter forroleId: The ID of the role this permission applies to.StringgetValuePattern()Getter forvaluePattern: Regular expression for matching against the layerId label.RolePermissionsetEntity(String newEntity)Setter forentity: The media entity this permission applies to - a string made up of "t" (transcript), "a" (audio), "v" (video), or "i" (image).RolePermissionsetLayerId(String newLayerId)Setter forlayerId: ID of the layer for which the label determines access.RolePermissionsetRoleId(String newRoleId)Setter forroleId: The ID of the role this permission applies to.RolePermissionsetValuePattern(String newValuePattern)Setter forvaluePattern: Regular expression for matching against the layerId label.javax.json.JsonObjecttoJson()Serializes the object to JSON.
-
-
-
Method Detail
-
getRoleId
public String getRoleId()
Getter forroleId: The ID of the role this permission applies to.- Returns:
- The ID of the role this permission applies to.
-
setRoleId
public RolePermission setRoleId(String newRoleId)
Setter forroleId: The ID of the role this permission applies to.- Parameters:
newRoleId- The ID of the role this permission applies to.- Returns:
- A reference to this object, so that setters can be chained.
-
getEntity
public String getEntity()
Getter forentity: The media entity this permission applies to - a string made up of "t" (transcript), "a" (audio), "v" (video), or "i" (image).- Returns:
- The media entity this permission applies to - a string made up of "t" (transcript), "a" (audio), "v" (video), or "i" (image).
-
setEntity
public RolePermission setEntity(String newEntity)
Setter forentity: The media entity this permission applies to - a string made up of "t" (transcript), "a" (audio), "v" (video), or "i" (image).- Parameters:
newEntity- The media entity this permission applies to - a string made up of "t" (transcript), "a" (audio), "v" (video), or "i" (image).- Returns:
- A reference to this object, so that setters can be chained.
-
getLayerId
public String getLayerId()
Getter forlayerId: ID of the layer for which the label determines access. This is either a valid transcript attribute layer ID, or "corpus".- Returns:
- ID of the layer for which the label determines access. This is either a valid transcript attribute layer ID, or "corpus".
-
setLayerId
public RolePermission setLayerId(String newLayerId)
Setter forlayerId: ID of the layer for which the label determines access. This is either a valid transcript attribute layer ID, or "corpus".- Parameters:
newLayerId- ID of the layer for which the label determines access. This is either a valid transcript attribute layer ID, or "corpus".- Returns:
- A reference to this object, so that setters can be chained.
-
getValuePattern
public String getValuePattern()
Getter forvaluePattern: Regular expression for matching against the layerId label. If the regular expression matches the label, access is allowed.- Returns:
- Regular expression for matching against the layerId label. If the regular expression matches the label, access is allowed.
-
setValuePattern
public RolePermission setValuePattern(String newValuePattern)
Setter forvaluePattern: Regular expression for matching against the layerId label. If the regular expression matches the label, access is allowed.- Parameters:
newValuePattern- Regular expression for matching against the layerId label. If the regular expression matches the label, access is allowed.- Returns:
- A reference to this object, so that setters can be chained.
-
toJson
public javax.json.JsonObject toJson()
Serializes the object to JSON.- Returns:
- A JSON serialization of the object.
-
-