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 Object implements AdHocCommand
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthRepositoryauthRepositoryprotected static StringFIELD_CREDENTIAL_IDprotected static StringFIELD_JIDprotected static StringFIELD_PASSWORDprotected static StringFIELD_USERNAMEDeprecated.protected Loggerlog
-
Constructor Summary
Constructors Constructor Description AbstractCredentialsCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckIfCanModifyJID(AdhHocRequest request, BareJID jidToModify)voidexecute(AdhHocRequest request, AdHocResponse response)booleanisAllowedFor(JID jid)protected abstract voidprocessForm(Form form, AdhHocRequest request, AdHocResponse response)protected abstract voidprocessNoForm(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 String FIELD_JID
- See Also:
- Constant Field Values
-
FIELD_CREDENTIAL_ID
protected static final String FIELD_CREDENTIAL_ID
- See Also:
- Constant Field Values
-
FIELD_USERNAME
@Deprecated protected static final String FIELD_USERNAME
Deprecated.- See Also:
- Constant Field Values
-
FIELD_PASSWORD
protected static final String FIELD_PASSWORD
- See Also:
- Constant Field Values
-
log
protected final Logger log
-
authRepository
@Inject protected AuthRepository authRepository
-
-
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:
executein interfaceAdHocCommand- Throws:
AdHocCommandException
-
isAllowedFor
public boolean isAllowedFor(JID jid)
- Specified by:
isAllowedForin interfaceAdHocCommand
-
processForm
protected abstract void processForm(Form form, AdhHocRequest request, AdHocResponse response) throws TigaseDBException, AdHocCommandException
-
processNoForm
protected abstract void processNoForm(AdhHocRequest request, AdHocResponse response) throws TigaseDBException
- Throws:
TigaseDBException
-
-