private void createAndAddControl( Dsmlv2Container container,
AbstractDsmlMessageDecorator<? extends Message> parent ) throws XmlPullParserException
{
CodecControl<? extends Control> control = null;
XmlPullParser xpp = container.getParser();
// Checking and adding the Control's attributes
String attributeValue;
// TYPE
attributeValue = xpp.getAttributeValue( "", "type" );
if ( attributeValue != null )
{
if ( !Oid.isOid( attributeValue ) )
{
throw new XmlPullParserException( I18n.err( I18n.ERR_03006 ), xpp, null );
}
control = container.getLdapCodecService().newControl( new OpaqueControl( attributeValue ) );
parent.addControl( control );
}
else
{
throw new XmlPullParserException( I18n.err( I18n.ERR_03005 ), xpp, null );
}
// CRITICALITY
attributeValue = xpp.getAttributeValue( "", "criticality" );
if ( attributeValue != null )
{
if ( attributeValue.equals( "true" ) )
{