com.sonyericsson.hudson.plugins.metadata.cli
Enum CliUtils.Status

java.lang.Object
  extended by java.lang.Enum<CliUtils.Status>
      extended by com.sonyericsson.hudson.plugins.metadata.cli.CliUtils.Status
All Implemented Interfaces:
Serializable, Comparable<CliUtils.Status>
Enclosing class:
CliUtils

public static enum CliUtils.Status
extends Enum<CliUtils.Status>

Status codes to be returned from the cli commands.


Enum Constant Summary
ERR_BAD_CMD
          Commandline status code indicating illegal commandline argument combinations.
ERR_BAD_DATA
          Commandline status code indicating a JsonUtils.ParseException.
ERR_NO_ITEM
          Commandline status code indicating CliUtils.NoItemException.
ERR_NO_METADATA
          Commandline status code indicating CliUtils.NoMetadataException.
WARN_NO_SAVE
          Commandline status indicating that the metadata could not be saved to disk.
 
Method Summary
 int code()
          The error code to return from the command.
 int httpStatus()
          The HTTP status that should be set in the HTTP response if any.
static CliUtils.Status valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CliUtils.Status[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ERR_NO_ITEM

public static final CliUtils.Status ERR_NO_ITEM
Commandline status code indicating CliUtils.NoItemException. (-1)


ERR_NO_METADATA

public static final CliUtils.Status ERR_NO_METADATA
Commandline status code indicating CliUtils.NoMetadataException. (-2)


ERR_BAD_CMD

public static final CliUtils.Status ERR_BAD_CMD
Commandline status code indicating illegal commandline argument combinations. (1)


ERR_BAD_DATA

public static final CliUtils.Status ERR_BAD_DATA
Commandline status code indicating a JsonUtils.ParseException. (2)


WARN_NO_SAVE

public static final CliUtils.Status WARN_NO_SAVE
Commandline status indicating that the metadata could not be saved to disk.

Method Detail

values

public static CliUtils.Status[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CliUtils.Status c : CliUtils.Status.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CliUtils.Status valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

code

public int code()
The error code to return from the command.

Returns:
the error code.

httpStatus

public int httpStatus()
The HTTP status that should be set in the HTTP response if any.

Returns:
the status code.


Copyright © 2004-2013. All Rights Reserved.