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.apache.turbine.om.security
Class SecurityObject<T extends SecurityEntity>

    java.lang.Object
      org.apache.turbine.om.security.SecurityObject<T>

All Implemented Interfaces:
  Comparable<T>

Direct Known Subclasses:
  TurbineGroup, TurbinePermission, TurbineRole, TurbineUser

    public abstract class SecurityObject<T extends SecurityEntity>

extends Object
implements Comparable<T>

This class represents a generic object used in the Access Control Lists.

Version:
  $Id: SecurityObject.java 1071091 2011-02-15 22:06:55Z tv $
Author:
  Frank Y. Kim, John D. McNally, Brett McLaughlin, Rafal Krzewski

Constructor Summary
`SecurityObject()` Constructs a new SecurityObject
`SecurityObject(String name)` Constructs a new SecurityObject with the specified name.

Method Summary
`int` | `compareTo(T obj)` Used for ordering SecurityObjects.
`Object` | `getAttribute(String name)` Retrieves the value of specific attribute of this object.
`Map<String,Object>` | `getAttributes()` Returns a Map containing this object's attributes.
`int` | `getId()` Unused.
`Integer` | `getIdAsObj()` Unused.
`String` | `getName()` Returns the name of this object.
`void` | `setAttribute(String name, Object value)` Sets the value of specific attribute of this object.
`void` | `setAttributes(Map<String,Object> attributes)` Replaces this object's attributes with the specified Map.
`void` | `setId(int id)` Unused.
`void` | `setName(String name)` Sets the name of this object.
`String` | `toString()` Returns a textual representation of this object, consisted by it's name and attributes.

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

Constructor Detail

### SecurityObject

    public SecurityObject()

  Constructs a new SecurityObject

### SecurityObject

    public SecurityObject(String name)

  Constructs a new SecurityObject with the specified name.

  Parameters:
    `name` - The name of the new object.

Method Detail

### getAttributes

    public Map<String,Object> getAttributes()

  Returns a Map containing this object's attributes.

  Returns:
    the object's attributes.

### setAttributes

    public void setAttributes(Map<String,Object> attributes)

  Replaces this object's attributes with the specified Map.

  Parameters:
    `attributes` - The new attributes of the object.

### getAttribute

    public Object getAttribute(String name)

  Retrieves the value of specific attribute of this object.

  Parameters:
    `name` - the name of the attribute
  Returns:
    the value of the attribute

### setAttribute

    public void setAttribute(String name,
                             Object value)

  Sets the value of specific attribute of this object.

  Parameters:
    `name` - the name of the attribute
    `value` - the value of the attribute

### getName

    public String getName()

  Returns the name of this object.

  Returns:
    The name of the object.

### setName

    public void setName(String name)

  Sets the name of this object.

  Parameters:
    `name` - The name of the object.

### getId

    public int getId()

  Unused. There is an ID column in the database scheme but it doesn't seem to be used.

  Returns:
    0

### getIdAsObj

    public Integer getIdAsObj()

  Unused. There is an ID column in the database scheme but it doesn't seem to be used.

  Returns:
    null

### setId

    public void setId(int id)

  Unused. There is an ID column in the database scheme but it doesn't seem to be used.

  Parameters:
    `id` - The id of the User.

### compareTo

    public int compareTo(T obj)

  Used for ordering SecurityObjects.

  Specified by:
    `compareTo` in interface `Comparable<T extends SecurityEntity>`
  Parameters:
    `obj` - The Object to compare to.
  Returns:
    -1 if the name of the other object is lexically greater than this group, 1 if it is lexically lesser, 0 if they are equal.

### toString

    public String toString()

  Returns a textual representation of this object, consisted by it's name and attributes.

  Overrides:
    `toString` in class `Object`
  Returns:
    a textual representation of this group.

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 © 2000-2011 The Apache Software Foundation. All Rights Reserved.