Package tigase.auth.adhoc

## Class AbstractCredentialsCommand

- java.lang.Object
- - tigase.auth.adhoc.AbstractCredentialsCommand

- All Implemented Interfaces:
    `AdHocCommand`
  Direct Known Subclasses:
    `AddUserCredentials`, `DeleteUserCredentials`, `ShowUserCredentials`

      public abstract class AbstractCredentialsCommand
      extends java.lang.Object
      implements AdHocCommand

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected AuthRepository` | `authRepository` |
    `protected static java.lang.String` | `FIELD_CREDENTIAL_ID` |
    `protected static java.lang.String` | `FIELD_JID` |
    `protected static java.lang.String` | `FIELD_PASSWORD` |
    `protected static java.lang.String` | `FIELD_USERNAME` | Deprecated.
    `protected java.util.logging.Logger` | `log` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractCredentialsCommand()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `checkIfCanModifyJID​(AdhHocRequest request, BareJID jidToModify)` |
    `void` | `execute​(AdhHocRequest request, AdHocResponse response)` |
    `boolean` | `isAllowedFor​(JID jid)` |
    `protected abstract void` | `processForm​(Form form, AdhHocRequest request, AdHocResponse response)` |
    `protected abstract void` | `processNoForm​(AdhHocRequest request, AdHocResponse response)` |

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

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

    - ### Methods inherited from interface tigase.component.adhoc.AdHocCommand

      `execute, getGroup, getName, getNode`

- - ### Field Detail

    - #### FIELD_JID

          protected static final java.lang.String FIELD_JID

      See Also:
        Constant Field Values

    - #### FIELD_CREDENTIAL_ID

          protected static final java.lang.String FIELD_CREDENTIAL_ID

      See Also:
        Constant Field Values

    - #### FIELD_USERNAME

          @Deprecated
          protected static final java.lang.String FIELD_USERNAME

      Deprecated.
      See Also:
        Constant Field Values

    - #### FIELD_PASSWORD

          protected static final java.lang.String FIELD_PASSWORD

      See Also:
        Constant Field Values

    - #### log

          protected final java.util.logging.Logger log

    - #### authRepository

          @Inject
          protected AuthRepository authRepository

  - ### Constructor Detail

    - #### AbstractCredentialsCommand

          public AbstractCredentialsCommand()

  - ### Method Detail

    - #### checkIfCanModifyJID

          protected void checkIfCanModifyJID​(AdhHocRequest request,
                                             BareJID jidToModify)
                                      throws AdHocCommandException

      Throws:
        `AdHocCommandException`

    - #### execute

          public void execute​(AdhHocRequest request,
                              AdHocResponse response)
                       throws AdHocCommandException

      Specified by:
        `execute` in interface `AdHocCommand`
      Throws:
        `AdHocCommandException`

    - #### isAllowedFor

          public boolean isAllowedFor​(JID jid)

      Specified by:
        `isAllowedFor` in interface `AdHocCommand`

    - #### processForm

          protected abstract void processForm​(Form form,
                                              AdhHocRequest request,
                                              AdHocResponse response)
                                       throws TigaseDBException,
                                              AdHocCommandException

      Throws:
        `TigaseDBException`
        `AdHocCommandException`

    - #### processNoForm

          protected abstract void processNoForm​(AdhHocRequest request,
                                                AdHocResponse response)
                                         throws TigaseDBException

      Throws:
        `TigaseDBException`