001 package org.omg.Security;
002 /**
003 * Generated from IDL enum "QOP".
004 *
005 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
006 * @version generated at Sep 6, 2011 5:12:29 AM
007 */
008
009 public final class QOP
010 implements org.omg.CORBA.portable.IDLEntity
011 {
012 private int value = -1;
013 public static final int _SecQOPNoProtection = 0;
014 public static final QOP SecQOPNoProtection = new QOP(_SecQOPNoProtection);
015 public static final int _SecQOPIntegrity = 1;
016 public static final QOP SecQOPIntegrity = new QOP(_SecQOPIntegrity);
017 public static final int _SecQOPConfidentiality = 2;
018 public static final QOP SecQOPConfidentiality = new QOP(_SecQOPConfidentiality);
019 public static final int _SecQOPIntegrityAndConfidentiality = 3;
020 public static final QOP SecQOPIntegrityAndConfidentiality = new QOP(_SecQOPIntegrityAndConfidentiality);
021 public int value()
022 {
023 return value;
024 }
025 public static QOP from_int(int value)
026 {
027 switch (value) {
028 case _SecQOPNoProtection: return SecQOPNoProtection;
029 case _SecQOPIntegrity: return SecQOPIntegrity;
030 case _SecQOPConfidentiality: return SecQOPConfidentiality;
031 case _SecQOPIntegrityAndConfidentiality: return SecQOPIntegrityAndConfidentiality;
032 default: throw new org.omg.CORBA.BAD_PARAM();
033 }
034 }
035 public String toString()
036 {
037 switch (value) {
038 case _SecQOPNoProtection: return "SecQOPNoProtection";
039 case _SecQOPIntegrity: return "SecQOPIntegrity";
040 case _SecQOPConfidentiality: return "SecQOPConfidentiality";
041 case _SecQOPIntegrityAndConfidentiality: return "SecQOPIntegrityAndConfidentiality";
042 default: throw new org.omg.CORBA.BAD_PARAM();
043 }
044 }
045 protected QOP(int i)
046 {
047 value = i;
048 }
049 java.lang.Object readResolve()
050 throws java.io.ObjectStreamException
051 {
052 return from_int(value());
053 }
054 }