lumis.upgrade.custom.build_6_2_0_120625
Class UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission

Package class diagram package UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission
java.lang.Object
  extended by lumis.upgrade.custom.build_6_2_0_120625.UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission
All Implemented Interfaces:
IStepHandler

public class UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission
extends Object
implements IStepHandler

An upgrade step to update the access control entries, inserting the new global edit service instance content permission.

Since:
7.0.0

Nested Class Summary
static class UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission.ServiceResume
          Resumed service data.
 
Constructor Summary
UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission()
           
 
Method Summary
 Node executeStep(SessionConfig sessionConfig, Node stepNode, ITransaction transaction)
          Executes a step in the upgrade process.
static boolean getValueOfAllowEditServiceInstanceContentPermission(UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission.ServiceResume serviceResume, int allowPermissions, int denyPermissions, int permissionsOnWorkflow, boolean hasWorkflowEnabled)
          Returns true if the edit service instance content should be turn on otherwise returns false for the current ACE.
static boolean hasPermission(Integer allowPermissions, Integer denyPermissions, Integer permissionToVerify)
          Returns true if the custom edit content permission has 1 as value otherwise returns false.
static Integer normalizePermissions(Integer originalPermission, Integer newPermissionPosition, boolean permissionValue)
          Returns the normalized permission, insert a new bit on new permission position with the permission value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission

public UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission()
Method Detail

executeStep

public Node executeStep(SessionConfig sessionConfig,
                        Node stepNode,
                        ITransaction transaction)
                 throws PortalException
Description copied from interface: IStepHandler
Executes a step in the upgrade process.

Specified by:
executeStep in interface IStepHandler
Parameters:
sessionConfig - the user session information.
stepNode - the xml step definition node.
transaction - the transaction for persistence access.
Returns:
the response xml node.
Throws:
PortalException - if it was not possible to execute the step.

getValueOfAllowEditServiceInstanceContentPermission

public static boolean getValueOfAllowEditServiceInstanceContentPermission(UpdateAccessControlEntriesToAddEditServiceInstanceContentPermission.ServiceResume serviceResume,
                                                                          int allowPermissions,
                                                                          int denyPermissions,
                                                                          int permissionsOnWorkflow,
                                                                          boolean hasWorkflowEnabled)
                                                                   throws PortalObjectNotFoundException
Returns true if the edit service instance content should be turn on otherwise returns false for the current ACE.

Parameters:
serviceResume - a resume of service, must be null if the service should not be verified.
allowPermissions - allow permissions.
denyPermissions - deny permissions.
permissionsOnWorkflow - number of permissions on workflow.
hasWorkflowEnabled - true if the service instance of ACE has workflow enabled.
Returns:
true if the edit service instance content should be turn on otherwise returns false for the current ACE.
Throws:
PortalObjectNotFoundException - if some information extracted of service resume is not found.
Since:
7.0.0

hasPermission

public static boolean hasPermission(Integer allowPermissions,
                                    Integer denyPermissions,
                                    Integer permissionToVerify)
Returns true if the custom edit content permission has 1 as value otherwise returns false.

Parameters:
userPermissions - the permission to be verified.
indexOfCustomEditContentPermission - the index of the custom edit content permission.
Returns:
true if the custom edit content permission has 1 as value otherwise returns false.
Since:
7.0.0

normalizePermissions

public static Integer normalizePermissions(Integer originalPermission,
                                           Integer newPermissionPosition,
                                           boolean permissionValue)
Returns the normalized permission, insert a new bit on new permission position with the permission value.

Parameters:
originalPermission - the permission to be normalized.
newPermissionPosition - the new permission position.
permissionValue - the value of the new permission.
Returns:
the normalized permission, insert a new bit on new permission position with the permission value.
Since:
7.0.0


Lumisportal  7.0.0.121130 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.