protected Security parseSecuritySettings(XMLStreamReader reader) throws XMLStreamException, ParserException,
      ValidateException
   {

      String securityDomain = null;

      Map<String, String> expressions = new HashMap<String, String>();

      while (reader.hasNext())
      {
         switch (reader.nextTag())
         {
            case END_ELEMENT : {
               switch (reader.getLocalName())
               {
                  case CommonXML.ELEMENT_SECURITY :
                     return new SecurityImpl(securityDomain,
                             !expressions.isEmpty() ? expressions : null);
                  case CommonXML.ELEMENT_SECURITY_DOMAIN :
                     break;
                  default :
                     throw new ParserException(bundle.unexpectedEndTag(reader.getLocalName()));
               }
            }
            case START_ELEMENT : {
               switch (reader.getLocalName())
               {

                  case CommonXML.ELEMENT_SECURITY_DOMAIN : {
                     securityDomain = elementAsString(reader, CommonXML.ELEMENT_SECURITY_DOMAIN, expressions);
                     break;
                  }
                  default :
                     throw new ParserException(bundle.unexpectedElement(reader.getLocalName()));
               }
               break;
            }
         }
      }
      throw new ParserException(bundle.unexpectedEndOfDocument());
   }
protected Security parseSecuritySettings ( XMLStreamReader reader ) throws XMLStreamException , ParserException , ValidateException { String securityDomain = null ; Map < String , String > expressions = new HashMap < String , String > ( ) ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { switch ( reader . getLocalName ( ) ) { case CommonXML . ELEMENT_SECURITY : return new SecurityImpl ( securityDomain , ! expressions . isEmpty ( ) ? expressions : null ) ; case CommonXML . ELEMENT_SECURITY_DOMAIN : break ; default : throw new ParserException ( bundle . unexpectedEndTag ( reader . getLocalName ( ) ) ) ; } } case START_ELEMENT : { switch ( reader . getLocalName ( ) ) { case CommonXML . ELEMENT_SECURITY_DOMAIN : { securityDomain = elementAsString ( reader , CommonXML . ELEMENT_SECURITY_DOMAIN , expressions ) ; break ; } default : throw new ParserException ( bundle . unexpectedElement ( reader . getLocalName ( ) ) ) ; } break ; } } } throw new ParserException ( bundle . unexpectedEndOfDocument ( ) ) ; }
parse a {@link Security} element

@param reader reader
@return a {@link Security} object
@throws XMLStreamException XMLStreamException
@throws ParserException ParserException
@throws ValidateException ValidateException