Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Seam Core JSF2 2.3.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.seam.security.permission
Class RuleBasedPermissionResolver

    java.lang.Object
      org.jboss.seam.security.permission.RuleBasedPermissionResolver

All Implemented Interfaces:
  Serializable, PermissionResolver

    @Name(value="org.jboss.seam.security.ruleBasedPermissionResolver")
    @Scope(value=SESSION)
    @BypassInterceptors
    @Install(precedence=0,
             classDependencies="org.drools.WorkingMemory")
    @Startup
    public class RuleBasedPermissionResolver

extends Object
implements PermissionResolver, Serializable

A permission resolver that uses a Drools rule base to perform permission checks

Author:
  Shane Bryzak
See Also:
  Serialized Form

Field Summary
`static String` | `RULES_COMPONENT_NAME`

Constructor Summary
`RuleBasedPermissionResolver()`

Method Summary
`boolean` | `checkConditionalRole(String roleName, Object target, String action)`
`boolean` | `create()`
`void` | `filterSetByAction(Set<Object> targets, String action)`
`org.drools.StatefulSession` | `getSecurityContext()`
`org.drools.RuleBase` | `getSecurityRules()`
`boolean` | `hasPermission(Object target, String action)` Performs a permission check for the specified name and action
`protected void` | `initSecurityContext()`
`static RuleBasedPermissionResolver` | `instance()`
`void` | `setSecurityContext(org.drools.StatefulSession securityContext)`
`void` | `setSecurityRules(org.drools.RuleBase securityRules)`
`void` | `setUserAccountInSecurityContext()` Post-authentication event observer
`void` | `unAuthenticate()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RULES_COMPONENT_NAME

    public static final String RULES_COMPONENT_NAME

See Also:
  Constant Field Values

Constructor Detail

### RuleBasedPermissionResolver

    public RuleBasedPermissionResolver()

Method Detail

### create

    @Create
    public boolean create()

### initSecurityContext

    protected void initSecurityContext()

### hasPermission

    public boolean hasPermission(Object target,
                                 String action)

  Performs a permission check for the specified name and action

  Specified by:
    `hasPermission` in interface `PermissionResolver`
  Parameters:
    `target` - Object The target of the permission check
    `action` - String The action to be performed on the target
  Returns:
    boolean True if the user has the specified permission

### filterSetByAction

    public void filterSetByAction(Set<Object> targets,
                                  String action)

  Specified by:
    `filterSetByAction` in interface `PermissionResolver`

### checkConditionalRole

    public boolean checkConditionalRole(String roleName,
                                        Object target,
                                        String action)

### unAuthenticate

    @Observer(value="org.jboss.seam.security.loggedOut")
    public void unAuthenticate()

### getSecurityContext

    public org.drools.StatefulSession getSecurityContext()

### setSecurityContext

    public void setSecurityContext(org.drools.StatefulSession securityContext)

### getSecurityRules

    public org.drools.RuleBase getSecurityRules()

### setSecurityRules

    public void setSecurityRules(org.drools.RuleBase securityRules)

### instance

    public static RuleBasedPermissionResolver instance()

### setUserAccountInSecurityContext

    @Observer(value="org.jboss.seam.security.postAuthenticate")
    public void setUserAccountInSecurityContext()

  Post-authentication event observer

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Seam Core JSF2 2.3.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 Seam Framework. All Rights Reserved.