AuthzCredentialGenerator.ClassCode (Apache Geode 1.8.0)
Date: 2018-11-29

org.apache.geode.security.generator

## Class AuthzCredentialGenerator.ClassCode

- java.lang.Object
- - org.apache.geode.security.generator.AuthzCredentialGenerator.ClassCode

- Enclosing class:
    AuthzCredentialGenerator

      public static class AuthzCredentialGenerator.ClassCode
      extends java.lang.Object

  Enumeration for various `AuthzCredentialGenerator` implementations.

  The following schemes are supported as of now:

  - `DummyAuthorization` with `DummyAuthenticator`
  - `XMLAuthorization` with `DummyAuthenticator`
  - `XMLAuthorization` with `LDAPAuthenticator`
  - `XMLAuthorization` with `PKCSAuthenticator`
  - `XMLAuthorization` when using SSL sockets

  To add a new authorization scheme the following needs to be done:

  - Add implementation for `AccessControl`.
  - Choose the authentication schemes that it shall work with from `CredentialGenerator.ClassCode`
  - Add a new enumeration value for the scheme in this class. Notice the size of `VALUES` array and increase that if it is getting overflowed. Note the methods and fields for existing schemes and add for the new one in a similar manner.
  - Add an implementation for `AuthzCredentialGenerator`. Note the `AuthzCredentialGenerator.init(org.apache.geode.security.generator.CredentialGenerator)` method where different authentication schemes can be passed and initialize differently for the authentication schemes that shall be handled.
  - Modify the `AuthzCredentialGenerator.create(org.apache.geode.security.generator.AuthzCredentialGenerator.ClassCode)` method to add creation of an instance of the new implementation for the `ClassCode` enumeration value.

  All dunit tests will automagically start testing the new implementation after this.

  Since:
    GemFire 5.5

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static AuthzCredentialGenerator.ClassCode` | `DUMMY`
    `static AuthzCredentialGenerator.ClassCode` | `XML`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(AuthzCredentialGenerator.ClassCode opCode)` Indicates whether other `ClassCode` is same as this one.
    `boolean` | `equals(java.lang.Object obj)` Indicates whether other object is same as this one.
    `static AuthzCredentialGenerator.ClassCode` | `fromOrdinal(byte ordinal)` Returns the `ClassCode` represented by specified ordinal.
    `static java.util.List` | `getAll()` Returns all the possible values.
    `int` | `hashCode()` Returns a hash code value for this `ClassCode` which is the same as its ordinal.
    `boolean` | `isDummy()`
    `boolean` | `isXml()`
    `static AuthzCredentialGenerator.ClassCode` | `parse(java.lang.String operationName)` Returns the `ClassCode` represented by specified string.
    `byte` | `toOrdinal()` Returns the ordinal for this class code.
    `java.lang.String` | `toString()` Returns a string representation for this class code.

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

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

- - ### Field Detail

    - #### DUMMY

          public static final AuthzCredentialGenerator.ClassCode DUMMY

    - #### XML

          public static final AuthzCredentialGenerator.ClassCode XML

  - ### Method Detail

    - #### isDummy

          public boolean isDummy()

    - #### isXml

          public boolean isXml()

    - #### fromOrdinal

          public static AuthzCredentialGenerator.ClassCode fromOrdinal(byte ordinal)

      Returns the `ClassCode` represented by specified ordinal.

    - #### parse

          public static AuthzCredentialGenerator.ClassCode parse(java.lang.String operationName)

      Returns the `ClassCode` represented by specified string.

    - #### getAll

          public static java.util.List getAll()

      Returns all the possible values.

    - #### toOrdinal

          public byte toOrdinal()

      Returns the ordinal for this class code.
      Returns:
        the ordinal of this class code.

    - #### toString

          public java.lang.String toString()

      Returns a string representation for this class code.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        the name of this class code.

    - #### equals

          public boolean equals(java.lang.Object obj)

      Indicates whether other object is same as this one.
      Overrides:
        `equals` in class `java.lang.Object`
      Returns:
        true if other object is same as this one.

    - #### equals

          public boolean equals(AuthzCredentialGenerator.ClassCode opCode)

      Indicates whether other `ClassCode` is same as this one.
      Returns:
        true if other `ClassCode` is same as this one.

    - #### hashCode

          public int hashCode()

      Returns a hash code value for this `ClassCode` which is the same as its ordinal.
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        the ordinal of this `ClassCode`.