001    package org.omg.Security;
002    
003    
004    /**
005    * org/omg/Security/SecAttributeHelper.java .
006    * Generated by the IDL-to-Java compiler (portable), version "3.2"
007    * from /builddir/build/BUILD/geronimo-specs-1.6/geronimo-spec-corba/src/main/idl/Security.idl
008    * Saturday, September 22, 2012 10:56:39 AM CEST
009    */
010    
011    abstract public class SecAttributeHelper
012    {
013      private static String  _id = "IDL:omg.org/Security/SecAttribute:1.0";
014    
015      public static void insert (org.omg.CORBA.Any a, org.omg.Security.SecAttribute that)
016      {
017        org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
018        a.type (type ());
019        write (out, that);
020        a.read_value (out.create_input_stream (), type ());
021      }
022    
023      public static org.omg.Security.SecAttribute extract (org.omg.CORBA.Any a)
024      {
025        return read (a.create_input_stream ());
026      }
027    
028      private static org.omg.CORBA.TypeCode __typeCode = null;
029      private static boolean __active = false;
030      synchronized public static org.omg.CORBA.TypeCode type ()
031      {
032        if (__typeCode == null)
033        {
034          synchronized (org.omg.CORBA.TypeCode.class)
035          {
036            if (__typeCode == null)
037            {
038              if (__active)
039              {
040                return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
041              }
042              __active = true;
043              org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [3];
044              org.omg.CORBA.TypeCode _tcOf_members0 = null;
045              _tcOf_members0 = org.omg.Security.AttributeTypeHelper.type ();
046              _members0[0] = new org.omg.CORBA.StructMember (
047                "attribute_type",
048                _tcOf_members0,
049                null);
050              _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet);
051              _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
052              _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.Security.OIDHelper.id (), "OID", _tcOf_members0);
053              _members0[1] = new org.omg.CORBA.StructMember (
054                "defining_authority",
055                _tcOf_members0,
056                null);
057              _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet);
058              _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0);
059              _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.Security.OpaqueHelper.id (), "Opaque", _tcOf_members0);
060              _members0[2] = new org.omg.CORBA.StructMember (
061                "value",
062                _tcOf_members0,
063                null);
064              __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.Security.SecAttributeHelper.id (), "SecAttribute", _members0);
065              __active = false;
066            }
067          }
068        }
069        return __typeCode;
070      }
071    
072      public static String id ()
073      {
074        return _id;
075      }
076    
077      public static org.omg.Security.SecAttribute read (org.omg.CORBA.portable.InputStream istream)
078      {
079        org.omg.Security.SecAttribute value = new org.omg.Security.SecAttribute ();
080        value.attribute_type = org.omg.Security.AttributeTypeHelper.read (istream);
081        value.defining_authority = org.omg.Security.OIDHelper.read (istream);
082        value.value = org.omg.Security.OpaqueHelper.read (istream);
083        return value;
084      }
085    
086      public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.Security.SecAttribute value)
087      {
088        org.omg.Security.AttributeTypeHelper.write (ostream, value.attribute_type);
089        org.omg.Security.OIDHelper.write (ostream, value.defining_authority);
090        org.omg.Security.OpaqueHelper.write (ostream, value.value);
091      }
092    
093    }