Package lumis.content.workflow
Class WorkflowPermission
- java.lang.Object
-
- lumis.content.workflow.WorkflowPermission
-
@StableMinor(version="14.2", sinceVersion="4.0") public class WorkflowPermission extends Object
A workflow permission, that associates a principal with a role for a given service instance.- Since:
- 4.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Field Summary
Fields Modifier and Type Field Description static int
PERMISSION_TYPE_ALLOW
Constant to indicate the type of the permission is to allow the principal to be granted the role.static int
PERMISSION_TYPE_DENY
Constant to indicate the type of the permission is to deny the principal to be granted the role.
-
Constructor Summary
Constructors Constructor Description WorkflowPermission()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deserialize(Node workflowPermissionNode)
Deserializes this permission's attributes from the given node.String
getPrincipalId()
Returns the identifier of the principal this permission instance is granting a role.String
getRole()
Returns the role this permission instance is granting.String
getServiceInstanceId()
Returns the identifier of the service instance this permission applies to.int
getType()
Returns the type of this permission.String
getWorkflowId()
Returns the identifier of the workflow this permission applies to.void
serialize(OutputStream stream)
Serializes this permission through the given stream.void
setPrincipalId(String principalId)
Sets the identifier of the principal this permission instance is granting a role.void
setRole(String role)
Sets the role this permission instance is granting.void
setServiceInstanceId(String serviceInstanceId)
Sets the identifier of the service instance this permission applies to.void
setType(int type)
Sets the type of this permission.void
setWorkflowId(String workflowId)
Sets the workflow this permission applies to.
-
-
-
Field Detail
-
PERMISSION_TYPE_ALLOW
public static final int PERMISSION_TYPE_ALLOW
Constant to indicate the type of the permission is to allow the principal to be granted the role.- See Also:
- Constant Field Values
-
PERMISSION_TYPE_DENY
public static final int PERMISSION_TYPE_DENY
Constant to indicate the type of the permission is to deny the principal to be granted the role.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPrincipalId
public String getPrincipalId()
Returns the identifier of the principal this permission instance is granting a role.- Returns:
- the principal identifier.
-
setPrincipalId
public void setPrincipalId(String principalId)
Sets the identifier of the principal this permission instance is granting a role.- Parameters:
principalId
- the value to set.
-
getRole
public String getRole()
Returns the role this permission instance is granting.- Returns:
- the role identifier.
-
setRole
public void setRole(String role)
Sets the role this permission instance is granting.- Parameters:
role
- the role identifier.
-
getServiceInstanceId
public String getServiceInstanceId()
Returns the identifier of the service instance this permission applies to.- Returns:
- the service instance identifier.
-
setServiceInstanceId
public void setServiceInstanceId(String serviceInstanceId)
Sets the identifier of the service instance this permission applies to.- Parameters:
serviceInstanceId
- the service instance identifier.
-
getWorkflowId
public String getWorkflowId()
Returns the identifier of the workflow this permission applies to.- Returns:
- the identifier of the workflow this permission applies to.
-
setWorkflowId
public void setWorkflowId(String workflowId)
Sets the workflow this permission applies to.- Parameters:
workflowId
- the workflow's identifier.
-
getType
public int getType()
Returns the type of this permission.- Returns:
- the type of this permission. One of the PERMISSION_TYPE_* constants in this class.
-
setType
public void setType(int type)
Sets the type of this permission.- Parameters:
type
- the type to set. One of the PERMISSION_TYPE_* constants in this class.
-
serialize
public void serialize(OutputStream stream) throws IOException
Serializes this permission through the given stream.- Parameters:
stream
- the stream.- Throws:
IOException
- if an I/O exception occurs while streaming.
-
deserialize
public void deserialize(Node workflowPermissionNode) throws PortalException
Deserializes this permission's attributes from the given node.- Parameters:
workflowPermissionNode
- the node.- Throws:
PortalException
-
-