org.neociclo.odetteftp.protocol.v20
Enum SecurityLevel

java.lang.Object
  extended by java.lang.Enum<SecurityLevel>
      extended by org.neociclo.odetteftp.protocol.v20.SecurityLevel
All Implemented Interfaces:
Serializable, Comparable<SecurityLevel>

public enum SecurityLevel
extends Enum<SecurityLevel>

Enumeration indicating whether the file has been signed and/or encrypted before transmission.

    Value: '00'  No security services
           '01'  Encrypted
           '02'  Signed
           '03'  Encrypted and signed
 

Version:
$Rev: 122 $ $Date: 2009-07-22 08:20:41 -0300 (Wed, 22 Jul 2009) $
Author:
Rafael Marins

Enum Constant Summary
ENCRYPTED
           
ENCRYPTED_AND_SIGNED
           
NO_SECURITY_SERVICES
           
SIGNED
           
 
Method Summary
 int getCode()
          Return the protocol representation of enum.
static SecurityLevel parse(int code)
          Convenient method for parsing the proper SecurityLevel enum given a protocol code.
static SecurityLevel valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SecurityLevel[] 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

NO_SECURITY_SERVICES

public static final SecurityLevel NO_SECURITY_SERVICES

ENCRYPTED

public static final SecurityLevel ENCRYPTED

SIGNED

public static final SecurityLevel SIGNED

ENCRYPTED_AND_SIGNED

public static final SecurityLevel ENCRYPTED_AND_SIGNED
Method Detail

values

public static SecurityLevel[] 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 (SecurityLevel c : SecurityLevel.values())
    System.out.println(c);

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

valueOf

public static SecurityLevel 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

parse

public static SecurityLevel parse(int code)
                           throws OdetteFtpException
Convenient method for parsing the proper SecurityLevel enum given a protocol code.

Parameters:
code - The security level being evaluated
Returns:
SecurityLevel enum that correspond to the given code.
Throws:
OdetteFtpException
CommandNotRecognisedException - Code not recognized

getCode

public int getCode()
Return the protocol representation of enum.

Returns:
int corresponding protocol code.


ACCORD