org.openmobilealliance.schema.sti.v1_0
Enum ResultCode

java.lang.Object
  extended by java.lang.Enum<ResultCode>
      extended by org.openmobilealliance.schema.sti.v1_0.ResultCode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ResultCode>

public enum ResultCode
extends java.lang.Enum<ResultCode>

The list of OMA-defined return codes that are used by Alembik to send back adequate codes of return results within TranscodingResponse (TR) or JobResult (JR) objects.

Each entry contains the code number and type as defined in OMA-STI 1.0 specification.

Since:
1.0-beta1
See Also:
OMAUtils.addReturnResult(TranscodingResponse, ResultCode, String), OMAUtils.addReturnResult(JobResult, ResultCode, String), ReturnResult

Nested Class Summary
static class ResultCode.Type
          The possible types of return codes.
 
Enum Constant Summary
ALL_JOBS_FAILED
          ERROR - 5009: all the transcoding jobs failed.
INSUFFICIENT_PARAMETERS_PROVIDED
          ERROR - 4015: insufficient transcoding parameters provided.
INTERNAL_SERVER_ERROR
          ERROR - 5000: internal server error.
MEDIA_READING_ERROR
          ERROR - 4007: IO problem while reading the specified internal or external resource.
MEDIA_SAVING_ERROR
          ERROR - 4011: IO problem while saving the resource to the specified target location.
NO_PROFILE_SPECIFIED
          ERROR - 4014: neither profileID nor transcodingParams specified.
ONE_OR_MORE_JOBS_FAILED
          WARN - 2001: one or more transcoding jobs failed.
ORIGINAL_CONTENT_RETURNED
          INFO - 1003: no transcoding performed - original content returned.
REQUEST_COMPLETED_SUCCESSFULLY
          INFO - 2000: successful result.
SIZE_LIMIT_NOT_MET
          ERROR - 5007: cannot meet size limit.
TRANSCODING_NOT_POSSIBLE
          ERROR - 5006: unable to perform transcoding.
UNKNOWN_PARAMETER_VALUE
          WARN - 2005: unknown parameter value ignored.
UNSUPPORTED_PARAMETER_VALUE
          WARN - 2003: unsupported parameter ignored, not used by Alembik.
 
Method Summary
 int getCodeId()
           
 ResultCode.Type getType()
           
static ResultCode valueOf(int codeId)
          Returns the enum instance of the given code number.
static ResultCode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ResultCode[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ORIGINAL_CONTENT_RETURNED

public static final ResultCode ORIGINAL_CONTENT_RETURNED

INFO - 1003: no transcoding performed - original content returned.

The content returned by Alembik was not modified during the operation (JR).


REQUEST_COMPLETED_SUCCESSFULLY

public static final ResultCode REQUEST_COMPLETED_SUCCESSFULLY

INFO - 2000: successful result.

A transcoding request or a transcoding job was performed successfully. Some additional info or warning result codes/messages MAY be added to the response (TR/JR).


ONE_OR_MORE_JOBS_FAILED

public static final ResultCode ONE_OR_MORE_JOBS_FAILED

WARN - 2001: one or more transcoding jobs failed.

The operation was successful but some of its transcoding jobs failed, although at least one transcoding job succeeded (TR).


UNSUPPORTED_PARAMETER_VALUE

public static final ResultCode UNSUPPORTED_PARAMETER_VALUE

WARN - 2003: unsupported parameter ignored, not used by Alembik.

A given request parameter which is not supported by Alembik was ignored, but the whole operation or the transcoding job was performed successfully (TR/JR).


UNKNOWN_PARAMETER_VALUE

public static final ResultCode UNKNOWN_PARAMETER_VALUE

WARN - 2005: unknown parameter value ignored.

A given request parameter value which is unknown to Alembik was ignored, transcoding was performed (TR/JR).


MEDIA_READING_ERROR

public static final ResultCode MEDIA_READING_ERROR

ERROR - 4007: IO problem while reading the specified internal or external resource.

A resource referenced in the request has been found but an error occurred while reading it (JR).


MEDIA_SAVING_ERROR

public static final ResultCode MEDIA_SAVING_ERROR

ERROR - 4011: IO problem while saving the resource to the specified target location.

The given target location URI is valid but an IO error occurred while saving the resource (JR).


NO_PROFILE_SPECIFIED

public static final ResultCode NO_PROFILE_SPECIFIED

ERROR - 4014: neither profileID nor transcodingParams specified.

Neither profileID nor transcodingParams were specified in the request, and no default profile was used. No transcoding was performed (JR).


INSUFFICIENT_PARAMETERS_PROVIDED

public static final ResultCode INSUFFICIENT_PARAMETERS_PROVIDED

ERROR - 4015: insufficient transcoding parameters provided.

Some transcoding parameters (either profileID or transcodingParams) were provided, but the information is insufficient (JR).


INTERNAL_SERVER_ERROR

public static final ResultCode INTERNAL_SERVER_ERROR

ERROR - 5000: internal server error.

General error code to represent any error caused internally by Alembik (TR/JR).


TRANSCODING_NOT_POSSIBLE

public static final ResultCode TRANSCODING_NOT_POSSIBLE

ERROR - 5006: unable to perform transcoding.

Alembik was unable to perform the requested transcoding, e.g. the device capabilities/profile show that it only supports image/gif and Alembik does not support this format (JR).


SIZE_LIMIT_NOT_MET

public static final ResultCode SIZE_LIMIT_NOT_MET

ERROR - 5007: cannot meet size limit.

Alembik was unable to meet the requested sizeLimit (JR).


ALL_JOBS_FAILED

public static final ResultCode ALL_JOBS_FAILED

ERROR - 5009: all the transcoding jobs failed.

All the transcoding jobs in the Transcoding Request failed (TR).

Method Detail

values

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

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

valueOf

public static ResultCode valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getCodeId

public int getCodeId()
Returns:
code number

getType

public ResultCode.Type getType()
Returns:
code type

valueOf

public static ResultCode valueOf(int codeId)
Returns the enum instance of the given code number.

Parameters:
codeId - code number looked up
Returns:
matching enum object, if found; otherwise null