public void disableAccount(String username, Date startTime, Date endTime) throws UnsupportedOperationException {
        if (provider.isReadOnly()) {
            throw new UnsupportedOperationException();
        }
        LockOutFlag flag = new LockOutFlag(username, startTime, endTime);
        provider.setDisabledStatus(flag);
        if (!provider.shouldNotBeCached()) {
            // Add lockout data to cache.
            lockOutCache.put(username, flag);
        }
        // Fire event.
        LockOutEventDispatcher.accountLocked(flag);
    }
Sets an account to disabled, starting at an optional time and ending at an optional time.
If either times are set to null, the lockout is considered "forever" in that direction.
For example, if you had a start time of 2 hours from now, and a null end time, then the account
would be locked out in two hours, and never unlocked until someone manually unlcoked the account.

@param username User whose account will be disabled.
@param startTime When to start the lockout, or null if immediately.
@param endTime When to end the lockout, or null if forever.
@throws UnsupportedOperationException if the provider is readonly.
xmppserver/src/main/java/org/jivesoftware/openfire/lockout/LockOutManager.java