Package org.jboss.metadata.rar.spec

Examples of org.jboss.metadata.rar.spec.AuthenticationMechanismMetaData


      }
      if (md.getRa().getOutboundRa().getAuthMechanisms() == null)
      {
         md.getRa().getOutboundRa().setAuthMechanisms(new ArrayList<AuthenticationMechanismMetaData>());
      }
      AuthenticationMechanismMetaData ammd = new AuthenticationMechanismMetaData();
      ammd.setAuthenticationMechanismType(authenticationmechanism.authMechanism());
     
      String credentialInterfaceClass = null;
      if (authenticationmechanism.credentialInterface().equals(CredentialInterface.GenericCredential))
      {
         credentialInterfaceClass = "javax.resource.spi.security.GenericCredential";
      }
      else if (authenticationmechanism.credentialInterface().equals(CredentialInterface.GSSCredential))
      {
         credentialInterfaceClass = "org.ietf.jgss.GSSCredential";
      }
      else if (authenticationmechanism.credentialInterface().equals(CredentialInterface.PasswordCredential))
      {
         credentialInterfaceClass = "javax.resource.spi.security.PasswordCredential";
      }
      ammd.setCredentialInterfaceClass(credentialInterfaceClass);
     
      String[] description = authenticationmechanism.description();
      if (description != null)
      {
         if (ammd.getDescriptions() == null)
         {
            DescriptionsImpl descsImpl = new DescriptionsImpl();
            ammd.setDescriptions(descsImpl);
         }
         for (String desc : description)
         {
            DescriptionImpl descImpl = new DescriptionImpl();
            descImpl.setDescription(desc);
            ((DescriptionsImpl)ammd.getDescriptions()).add(descImpl);
         }
      }
     
      md.getRa().getOutboundRa().getAuthMechanisms().add(ammd);
View Full Code Here

TOP

Related Classes of org.jboss.metadata.rar.spec.AuthenticationMechanismMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.