Package nzilbb.labbcat.model
Class RolePermission
java.lang.Object
nzilbb.labbcat.model.RolePermission
User role permission record.
This model hides a wart in the API; it uses attribute_name
instead of the
now-more-correct layerId
.
- Author:
- Robert Fromont robert@fromont.net.nz
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.RolePermission
(javax.json.JsonObject json) Constructor from JSON. -
Method Summary
Modifier and TypeMethodDescriptionGetter forentity
: The media entity this permission applies to - a string made up of "t" (transcript), "a" (audio), "v" (video), or "i" (image).Getter forlayerId
: ID of the layer for which the label determines access.Getter forroleId
: The ID of the role this permission applies to.Getter forvaluePattern
: Regular expression for matching against the layerId label.Setter forentity
: The media entity this permission applies to - a string made up of "t" (transcript), "a" (audio), "v" (video), or "i" (image).setLayerId
(String newLayerId) Setter forlayerId
: ID of the layer for which the label determines access.Setter forroleId
: The ID of the role this permission applies to.setValuePattern
(String newValuePattern) Setter forvaluePattern
: Regular expression for matching against the layerId label.javax.json.JsonObject
toJson()
Serializes the object to JSON.
-
Constructor Details
-
RolePermission
public RolePermission()Default constructor. -
RolePermission
public RolePermission(javax.json.JsonObject json) Constructor from JSON.- Parameters:
json
- A JSON representation of the object to construct.
-
-
Method Details
-
getRoleId
Getter forroleId
: The ID of the role this permission applies to.- Returns:
- The ID of the role this permission applies to.
-
setRoleId
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
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
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
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
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
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
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.
-