Package lumis.content.workflow
Class WorkflowPermission
- java.lang.Object
-
- lumis.content.workflow.WorkflowPermission
-
@StableMinor(version="17.0", sinceVersion="4.0") public class WorkflowPermission extends java.lang.Object
A workflow permission, that associates a principal with a role for a given service instance.- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
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(org.w3c.dom.Node workflowPermissionNode)
Deserializes this permission's attributes from the given node.java.lang.String
getPrincipalId()
Returns the identifier of the principal this permission instance is granting a role.java.lang.String
getRole()
Returns the role this permission instance is granting.java.lang.String
getServiceInstanceId()
Returns the identifier of the service instance this permission applies to.int
getType()
Returns the type of this permission.java.lang.String
getWorkflowId()
Returns the identifier of the workflow this permission applies to.void
serialize(java.io.OutputStream stream)
Serializes this permission through the given stream.void
setPrincipalId(java.lang.String principalId)
Sets the identifier of the principal this permission instance is granting a role.void
setRole(java.lang.String role)
Sets the role this permission instance is granting.void
setServiceInstanceId(java.lang.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(java.lang.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 java.lang.String getPrincipalId()
Returns the identifier of the principal this permission instance is granting a role.- Returns:
- the principal identifier.
-
setPrincipalId
public void setPrincipalId(java.lang.String principalId)
Sets the identifier of the principal this permission instance is granting a role.- Parameters:
principalId
- the value to set.
-
getRole
public java.lang.String getRole()
Returns the role this permission instance is granting.- Returns:
- the role identifier.
-
setRole
public void setRole(java.lang.String role)
Sets the role this permission instance is granting.- Parameters:
role
- the role identifier.
-
getServiceInstanceId
public java.lang.String getServiceInstanceId()
Returns the identifier of the service instance this permission applies to.- Returns:
- the service instance identifier.
-
setServiceInstanceId
public void setServiceInstanceId(java.lang.String serviceInstanceId)
Sets the identifier of the service instance this permission applies to.- Parameters:
serviceInstanceId
- the service instance identifier.
-
getWorkflowId
public java.lang.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(java.lang.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(java.io.OutputStream stream) throws java.io.IOException
Serializes this permission through the given stream.- Parameters:
stream
- the stream.- Throws:
java.io.IOException
- if an I/O exception occurs while streaming.
-
deserialize
public void deserialize(org.w3c.dom.Node workflowPermissionNode) throws PortalException
Deserializes this permission's attributes from the given node.- Parameters:
workflowPermissionNode
- the node.- Throws:
PortalException
-
-