Class EntityPermissionChecker


  • public class EntityPermissionChecker
    extends java.lang.Object
    EntityPermissionChecker Class Services for granting operation permissions on Content entities in a data-driven manner.
    • Constructor Detail

      • EntityPermissionChecker

        public EntityPermissionChecker​(org.w3c.dom.Element element)
    • Method Detail

      • runPermissionCheck

        public boolean runPermissionCheck​(java.util.Map<java.lang.String,​?> context)
      • checkPermission

        public static java.util.Map<java.lang.String,​java.lang.Object> checkPermission​(GenericValue content,
                                                                                             java.lang.String statusId,
                                                                                             GenericValue userLogin,
                                                                                             java.util.List<java.lang.String> passedPurposes,
                                                                                             java.util.List<java.lang.String> targetOperations,
                                                                                             java.util.List<java.lang.String> passedRoles,
                                                                                             Delegator delegator,
                                                                                             Security security,
                                                                                             java.lang.String entityAction)
      • checkPermission

        public static java.util.Map<java.lang.String,​java.lang.Object> checkPermission​(GenericValue content,
                                                                                             java.lang.String statusId,
                                                                                             GenericValue userLogin,
                                                                                             java.util.List<java.lang.String> passedPurposes,
                                                                                             java.util.List<java.lang.String> targetOperations,
                                                                                             java.util.List<java.lang.String> passedRoles,
                                                                                             Delegator delegator,
                                                                                             Security security,
                                                                                             java.lang.String entityAction,
                                                                                             java.lang.String privilegeEnumId,
                                                                                             java.lang.String quickCheckContentId)
      • checkPermission

        public static java.util.Map<java.lang.String,​java.lang.Object> checkPermission​(GenericValue content,
                                                                                             java.util.List<java.lang.String> statusList,
                                                                                             GenericValue userLogin,
                                                                                             java.util.List<java.lang.String> passedPurposes,
                                                                                             java.util.List<java.lang.String> targetOperations,
                                                                                             java.util.List<java.lang.String> passedRoles,
                                                                                             Delegator delegator,
                                                                                             Security security,
                                                                                             java.lang.String entityAction,
                                                                                             java.lang.String privilegeEnumId)
      • checkPermission

        public static java.util.Map<java.lang.String,​java.lang.Object> checkPermission​(GenericValue content,
                                                                                             java.util.List<java.lang.String> statusList,
                                                                                             GenericValue userLogin,
                                                                                             java.util.List<java.lang.String> passedPurposes,
                                                                                             java.util.List<java.lang.String> targetOperations,
                                                                                             java.util.List<java.lang.String> passedRoles,
                                                                                             Delegator delegator,
                                                                                             Security security,
                                                                                             java.lang.String entityAction,
                                                                                             java.lang.String privilegeEnumId,
                                                                                             java.lang.String quickCheckContentId)
      • checkPermissionMethod

        public static boolean checkPermissionMethod​(Delegator delegator,
                                                    GenericValue userLogin,
                                                    java.util.List<java.lang.String> targetOperationList,
                                                    java.lang.String entityName,
                                                    java.util.List<? extends java.lang.Object> entityIdList,
                                                    java.util.List<java.lang.String> purposeList,
                                                    java.util.List<java.lang.String> roleList,
                                                    java.lang.String privilegeEnumId)
                                             throws GenericEntityException
        Throws:
        GenericEntityException
      • checkHasRoleOperations

        public static boolean checkHasRoleOperations​(java.lang.String partyId,
                                                     java.util.List<java.lang.String> targetOperations,
                                                     Delegator delegator)
      • hasMatch

        public static boolean hasMatch​(java.lang.String entityName,
                                       java.util.List<GenericValue> targetOperations,
                                       java.util.List<java.lang.String> roles,
                                       boolean hasPurposeOp,
                                       java.util.List<java.lang.String> purposes,
                                       boolean hasStatusOp,
                                       java.lang.String targStatusId)
      • getRelatedPurposes

        public static java.util.List<java.lang.String> getRelatedPurposes​(GenericValue entity,
                                                                          java.util.List<java.lang.String> passedPurposes)
        getRelatedPurposes
      • isGroupMember

        public static boolean isGroupMember​(java.util.Map<java.lang.String,​?> partyRelationshipValues,
                                            Delegator delegator)
        Tests to see if the user belongs to a group
      • getUserRolesFromList

        public static java.util.List<java.lang.String> getUserRolesFromList​(Delegator delegator,
                                                                            java.util.List<java.lang.String> idList,
                                                                            java.lang.String partyId,
                                                                            java.lang.String entityIdFieldName,
                                                                            java.lang.String partyIdFieldName,
                                                                            java.lang.String roleTypeIdFieldName,
                                                                            java.lang.String entityName)
                                                                     throws GenericEntityException
        Throws:
        GenericEntityException