lumis.content.workflow
Class WorkflowPermission

Package class diagram package WorkflowPermission
java.lang.Object
  extended by lumis.content.workflow.WorkflowPermission

@StableMinor(version="4.1",
             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

Field Summary
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
WorkflowPermission()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

WorkflowPermission

public WorkflowPermission()
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


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.