001/**
002 *
003 * Copyright 2005-2007 Jive Software.
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 *     http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.jivesoftware.smackx.commands;
018
019public enum SpecificErrorCondition {
020
021    /**
022     * The responding JID cannot accept the specified action.
023     */
024    badAction("bad-action"),
025
026    /**
027     * The responding JID does not understand the specified action.
028     */
029    malformedAction("malformed-action"),
030
031    /**
032     * The responding JID cannot accept the specified language/locale.
033     */
034    badLocale("bad-locale"),
035
036    /**
037     * The responding JID cannot accept the specified payload (e.g. the data
038     * form did not provide one or more required fields).
039     */
040    badPayload("bad-payload"),
041
042    /**
043     * The responding JID cannot accept the specified sessionid.
044     */
045    badSessionid("bad-sessionid"),
046
047    /**
048     * The requesting JID specified a sessionid that is no longer active
049     * (either because it was completed, canceled, or timed out).
050     */
051    sessionExpired("session-expired");
052
053    private final String value;
054
055    SpecificErrorCondition(String value) {
056        this.value = value;
057    }
058
059    @Override
060    public String toString() {
061        return value;
062    }
063}