org.apache.geode.security.generator

## Class CredentialGenerator.ClassCode

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

- Enclosing class:
    CredentialGenerator

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

  Enumeration for various `CredentialGenerator` implementations.

  The following schemes are supported as of now: `DummyAuthenticator`, `LdapUserAuthenticator`, `PKCSAuthenticator`. In addition SSL socket mode with mutual authentication is also supported.

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

  - Add implementations for `AuthInitialize` and `Authenticator` classes for clients/peers.
  - 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 `CredentialGenerator`.
  - Modify the CredentialGenerator.Factory#create [no such Factory exists] method to add creation of an instance of the new implementation for the `ClassCode` enumeration value.

  All security 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 CredentialGenerator.ClassCode` | `DUMMY`
    `static CredentialGenerator.ClassCode` | `LDAP`
    `static CredentialGenerator.ClassCode` | `PKCS`
    `static CredentialGenerator.ClassCode` | `SSL`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(CredentialGenerator.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 CredentialGenerator.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` | `isLDAP()`
    `boolean` | `isPKCS()`
    `boolean` | `isSSL()`
    `static CredentialGenerator.ClassCode` | `parse(java.lang.String operationName)` Returns the `ClassCode` represented by specified string.
    `byte` | `toOrdinal()` Returns the ordinal for this operation code.
    `java.lang.String` | `toString()` Returns a string representation for this operation.

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

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

- - ### Field Detail

    - #### DUMMY

          public static final CredentialGenerator.ClassCode DUMMY

    - #### LDAP

          public static final CredentialGenerator.ClassCode LDAP

    - #### PKCS

          public static final CredentialGenerator.ClassCode PKCS

    - #### SSL

          public static final CredentialGenerator.ClassCode SSL

  - ### Method Detail

    - #### isDummy

          public boolean isDummy()

    - #### isLDAP

          public boolean isLDAP()

    - #### isPKCS

          public boolean isPKCS()

    - #### isSSL

          public boolean isSSL()

    - #### fromOrdinal

          public static CredentialGenerator.ClassCode fromOrdinal(byte ordinal)

      Returns the `ClassCode` represented by specified ordinal.

    - #### parse

          public static CredentialGenerator.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 operation code.
      Returns:
        the ordinal of this operation.

    - #### toString

          public java.lang.String toString()

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

    - #### 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(CredentialGenerator.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 operation.