Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.security
Class PrincipalImpl

    java.lang.Object
      |
      +--com.compoze.security.PrincipalImpl

All Implemented Interfaces:
  java.security.Principal, java.io.Serializable

Direct Known Subclasses:
  Group, User

public abstract class PrincipalImpl
extends java.lang.Object
implements java.security.Principal, java.io.Serializable

This class represents a base implementation of a principal. A principal can be used to represent an entity such as a user or a group.

See Also:
  Serialized Form

Constructor Summary
`protected` | `PrincipalImpl()` Constructor.
`protected` | `PrincipalImpl(java.lang.String sName)` Constructor.

Method Summary
`boolean` | `equals(java.lang.Object obj)` Compares this principal to the specified object.
`java.lang.String` | `getName()` Gets the unique name of the principal.
`static PrincipalImpl` | `getPrincipal(java.lang.String sClassImpl, java.lang.String sPrincipalName)` Gets the principal based on the principal implementation class and the principal name.
`void` | `setName(java.lang.String sName)` Sets the unique name of the principal.
`java.lang.String` | `toString()` Returns a string representation of this principal.

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

Methods inherited from interface java.security.Principal
`hashCode`

Constructor Detail

### PrincipalImpl

    protected PrincipalImpl()

  Constructor.

### PrincipalImpl

    protected PrincipalImpl(java.lang.String sName)

  Constructor.
  Parameters:
    `sName` - the unique name of the principal (may not be `null`)

Method Detail

### getName

    public java.lang.String getName()

  Gets the unique name of the principal.
  Specified by:
    `getName` in interface `java.security.Principal`
  Returns:
    the unique name of the principal

### setName

    public void setName(java.lang.String sName)

  Sets the unique name of the principal.
  Parameters:
    `sName` - the unique name of the principal (may not be `null`)

### equals

    public boolean equals(java.lang.Object obj)

  Compares this principal to the specified object.
  Specified by:
    `equals` in interface `java.security.Principal`
  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - principal to compare with
  Returns:
    `true` if the principal passed in is the same as that encapsulated by this principal; `false` otherwise

### toString

    public java.lang.String toString()

  Returns a string representation of this principal.
  Specified by:
    `toString` in interface `java.security.Principal`
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the string representation of this principal

### getPrincipal

    public static PrincipalImpl getPrincipal(java.lang.String sClassImpl,
                                             java.lang.String sPrincipalName)
                                      throws java.lang.ClassNotFoundException,
                                             java.lang.InstantiationException,
                                             java.lang.IllegalAccessException

  Gets the principal based on the principal implementation class and the principal name.
  Parameters:
    `sClassImpl` - the fully qualified class name of the principal implementation
    `sPrincipalName` - the name of the principal
  Returns:
    the principal implementaion
  Throws:
    `java.lang.ClassNotFoundException` - occurs if the implementation class could not be found
    `java.lang.InstantiationException` - occurs if the implementation class could not be instantiated
    `java.lang.IllegalAccessException` - occurs if the class is not accessible

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.