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

## com.infodesire.infobit.security
Class DefaultSecurityProvider

    java.lang.Object
      |
      +--com.infodesire.infobit.security.DefaultSecurityProvider

All Implemented Interfaces:
  SecurityProvider

public class DefaultSecurityProvider
extends java.lang.Object
implements SecurityProvider

default security provider. hardwired user configuration off properties

Version:
  $Revision: 1.2 $
Author:
  konstantin

Field Summary
`static java.lang.String` | `ROLE_PROPERTY_PREFIX` property name prefix specifying user role ( can be used more than once ) good choice would be adding sequencial number
`static java.lang.String` | `USERNAME_PROPERTY` property configuring username of this provider

Constructor Summary
`DefaultSecurityProvider()`

Method Summary
`java.lang.String` | `getName()` configured user name
`boolean` | `hasRole(java.util.Collection roles)` whether provider configured to at least one of given roles
`boolean` | `hasRole(java.lang.String role)` whether provider configured to accept this role
`void` | `init(java.util.Properties properties)` initialize security provider ( user & role set ) via properties.
`boolean` | `isSuperuser()` Gets the Superuser attribute of the DefaultSecurityProvider object

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

Field Detail

### USERNAME_PROPERTY

    public static final java.lang.String USERNAME_PROPERTY

  property configuring username of this provider

  See Also:
    Constant Field Values

### ROLE_PROPERTY_PREFIX

    public static final java.lang.String ROLE_PROPERTY_PREFIX

  property name prefix specifying user role ( can be used more than once ) good choice would be adding sequencial number

  See Also:
    Constant Field Values

Constructor Detail

### DefaultSecurityProvider

    public DefaultSecurityProvider()

Method Detail

### getName

    public java.lang.String getName()

  configured user name

  Specified by:
    `getName` in interface `SecurityProvider`
  Returns:
    The Name value

### isSuperuser

    public boolean isSuperuser()

  Gets the Superuser attribute of the DefaultSecurityProvider object

  Specified by:
    `isSuperuser` in interface `SecurityProvider`
  Returns:
    The Superuser value

### hasRole

    public boolean hasRole(java.lang.String role)

  whether provider configured to accept this role

  Specified by:
    `hasRole` in interface `SecurityProvider`
  Parameters:
    `role` - role name of interest
  Returns:
    acceptance status

### hasRole

    public boolean hasRole(java.util.Collection roles)

  whether provider configured to at least one of given roles

  Specified by:
    `hasRole` in interface `SecurityProvider`
  Parameters:
    `roles` - Description of Parameter
  Returns:
    Description of the Returned Value

### init

    public void init(java.util.Properties properties)

  initialize security provider ( user & role set ) via properties.

  Specified by:
    `init` in interface `SecurityProvider`
  Parameters:
    `properties` - Description of Parameter

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

Copyright © 2003 Information Desire GmbH. All Rights Reserved.