Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.seam.security
Class RuleBasedIdentity

    java.lang.Object
      org.jboss.seam.core.AbstractMutable
          org.jboss.seam.core.Selector
              org.jboss.seam.security.Identity
                  org.jboss.seam.security.RuleBasedIdentity

All Implemented Interfaces:
  Serializable, Mutable

    @Name(value="org.jboss.seam.security.identity")
    @Scope(value=SESSION)
    @Intercept(value=NEVER)
    @Install(precedence=10,
             classDependencies="org.drools.WorkingMemory")
    @Startup
    public class RuleBasedIdentity

extends Identity

See Also:
  Serialized Form

Field Summary
`static String` | `RULES_COMPONENT_NAME`

Fields inherited from class org.jboss.seam.security.Identity
`ROLES_GROUP`

Constructor Summary
`RuleBasedIdentity()`

Method Summary
`boolean` | `addRole(String role)` Adds a role to the user's subject, and their security context
`void` | `create()`
`org.drools.WorkingMemory` | `getSecurityContext()`
`org.drools.RuleBase` | `getSecurityRules()`
`boolean` | `hasPermission(String name, String action, Object... arg)` Performs a permission check for the specified name and action
`protected void` | `initSecurityContext()`
`protected void` | `postAuthenticate()`
`void` | `removeRole(String role)` Removes a role from the user's subject and their security context
`void` | `setSecurityContext(org.drools.WorkingMemory securityContext)`
`void` | `setSecurityRules(org.drools.RuleBase securityRules)`
`protected void` | `unAuthenticate()` Removes all Role objects from the security context, removes the "Roles" group from the user's subject.

Methods inherited from class org.jboss.seam.security.Identity
`addLoginFailedMessage, addLoginSuccessfulMessage, authenticate, authenticate, checkEntityPermission, checkPermission, checkRestriction, checkRole, evaluateExpression, getAuthenticateMethod, getCookieName, getDefaultCallbackHandler, getJaasConfigName, getLoginContext, getLoginFailedMessage, getLoginFailedMessageKey, getLoginFailedMessageSeverity, getLoginSuccessfulMessage, getLoginSuccessfulMessageKey, getLoginSuccessfulMessageSeverity, getPassword, getPrincipal, getSubject, getUsername, hasRole, instance, isLoggedIn, isRememberMe, login, logout, postRememberMe, preAuthenticate, setAuthenticateMethod, setJaasConfigName, setPassword, setRememberMe, setUsername`

Methods inherited from class org.jboss.seam.core.Selector
`clearCookieValue, getCookie, getCookieMaxAge, getCookieValue, getCookieValueIfEnabled, isCookieEnabled, setCookieEnabled, setCookieMaxAge, setCookieValueIfEnabled`

Methods inherited from class org.jboss.seam.core.AbstractMutable
`clearDirty, setDirty, setDirty`

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

### RuleBasedIdentity

    public RuleBasedIdentity()

Method Detail

### create

    public void create()

  Overrides:
    `create` in class `Identity`

### initSecurityContext

    protected void initSecurityContext()

### postAuthenticate

    protected void postAuthenticate()

  Overrides:
    `postAuthenticate` in class `Identity`

### hasPermission

    public boolean hasPermission(String name,
                                 String action,
                                 Object... arg)

  Performs a permission check for the specified name and action

  Overrides:
    `hasPermission` in class `Identity`
  Parameters:
    `name` - String The permission name
    `action` - String The permission action
    `arg` - Object Optional object parameter used to make a permission decision
  Returns:
    boolean True if the user has the specified permission

### unAuthenticate

    protected void unAuthenticate()

  Description copied from class: `Identity`
  Removes all Role objects from the security context, removes the "Roles" group from the user's subject.

  Overrides:
    `unAuthenticate` in class `Identity`

### addRole

    public boolean addRole(String role)

  Description copied from class: `Identity`
  Adds a role to the user's subject, and their security context

  Overrides:
    `addRole` in class `Identity`
  Parameters:
    `role` - The name of the role to add

### removeRole

    public void removeRole(String role)

  Description copied from class: `Identity`
  Removes a role from the user's subject and their security context

  Overrides:
    `removeRole` in class `Identity`
  Parameters:
    `role` - The name of the role to remove

### getSecurityContext

    public org.drools.WorkingMemory getSecurityContext()

### setSecurityContext

    public void setSecurityContext(org.drools.WorkingMemory securityContext)

### getSecurityRules

    public org.drools.RuleBase getSecurityRules()

### setSecurityRules

    public void setSecurityRules(org.drools.RuleBase securityRules)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD