org.modeshape.jcr.security

## Class SimplePrincipal

- java.lang.Object
- - org.modeshape.jcr.security.SimplePrincipal

- All Implemented Interfaces:
    Principal

      public final class SimplePrincipal
      extends Object
      implements Principal

  Default local implementation of the principal.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SimplePrincipal` | `EVERYONE`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `String` | `getName()`
    `int` | `hashCode()`
    `static SimplePrincipal` | `newInstance(String name)` Creates new instance of the principal.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.security.Principal

      `toString`

- - ### Field Detail

    - #### EVERYONE

          public static final SimplePrincipal EVERYONE

  - ### Method Detail

    - #### newInstance

          public static SimplePrincipal newInstance(String name)

      Creates new instance of the principal.
      Parameters:
        `name` - the name of the user.
      Returns:
        new user name principal.

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `Principal`

    - #### equals

          public boolean equals(Object other)

      Specified by:
        `equals` in interface `Principal`
      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `Principal`
      Overrides:
        `hashCode` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.