Package org.jboss.metadata.rar.spec

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


   private ConnectorMetaData attachConnector(ConnectorMetaData md, String raClass, Connector c)
      throws Exception
   {
      // Class definition
      if (md.getRa() == null)
         md.setRa(new ResourceAdapterMetaData());

      md.getRa().setRaClass(raClass);

      // AuthenticationMechanism
      AuthenticationMechanism[] authMechanisms = c.authMechanisms();
      if (authMechanisms != null)
      {
         for (AuthenticationMechanism authMechanism : authMechanisms)
         {
            attachAuthenticationMechanism(md, authMechanism);
         }
      }

      DescriptionGroupMetaData descGroup = new DescriptionGroupMetaData();
      md.setDescriptionGroup(descGroup);
     
      // Description
      String[] description = c.description();
      if (description != null)
      {
         if (descGroup.getDescriptions() == null)
         {
            DescriptionsImpl descsImpl = new DescriptionsImpl();
            descGroup.setDescriptions(descsImpl);
         }
         for (String desc : description)
         {
            DescriptionImpl descImpl = new DescriptionImpl();
            descImpl.setDescription(desc);
            ((DescriptionsImpl)descGroup.getDescriptions()).add(descImpl);
         }
      }

      // Display name
      String[] displayName = c.displayName();
      if (displayName != null)
      {
         if (descGroup.getDisplayNames() == null)
         {
            DisplayNamesImpl dnsImpl = new DisplayNamesImpl();
            descGroup.setDisplayNames(dnsImpl);
         }
         for (String dn : displayName)
         {
            DisplayNameImpl dnImpl = new DisplayNameImpl();
            dnImpl.setDisplayName(dn);
            ((DisplayNamesImpl)descGroup.getDisplayNames()).add(dnImpl);
         }
      }

      // EIS type
      String eisType = c.eisType();
      if (eisType != null)
      {
         if (md.getEISType() == null)
            md.setEISType(eisType);
      }

      // Large icon
      String[] largeIcon = c.largeIcon();
      if (largeIcon != null)
      {
         if (descGroup.getIcons() == null)
         {
            IconsImpl icsImpl = new IconsImpl();
            descGroup.setIcons(icsImpl);
         }
         for (String large : largeIcon)
         {
            IconImpl icImpl = new IconImpl();
            icImpl.setLargeIcon(large);
            ((IconsImpl)descGroup.getIcons()).add(icImpl);
         }
      }

      // License description
      String[] licenseDescription = c.licenseDescription();
      if (licenseDescription != null)
      {
         if (md.getLicense() == null)
            md.setLicense(new LicenseMetaData());

         if (md.getLicense().getDescriptions() == null)
         {
            DescriptionsImpl descsImpl = new DescriptionsImpl();
            md.getLicense().setDescriptions(descsImpl);
         }
         for (String desc : licenseDescription)
         {
            DescriptionImpl descImpl = new DescriptionImpl();
            descImpl.setDescription(desc);
            ((DescriptionsImpl)md.getLicense().getDescriptions()).add(descImpl);
         }
      }

      // License required
      boolean licenseRequired = c.licenseRequired();
      if (md.getLicense() == null)
         md.setLicense(new LicenseMetaData());
      md.getLicense().setRequired(licenseRequired);

      // Reauthentication support
      boolean reauthenticationSupport = c.reauthenticationSupport();
      if (md.getRa() != null && md.getRa().getOutboundRa() != null)
      {
         md.getRa().getOutboundRa().setReAuthSupport(reauthenticationSupport);
      }

      // RequiredWorkContext
      Class<? extends WorkContext>[] requiredWorkContexts = c.requiredWorkContexts();
      if (requiredWorkContexts != null)
      {
         for (Class<? extends WorkContext> requiredWorkContext : requiredWorkContexts)
         {
            if (md instanceof JCA16Base)
            {
               JCA16Base jmd = (JCA16Base)md;
               if (jmd.getRequiredWorkContexts() == null)
                  jmd.setRequiredWorkContexts(new ArrayList<String>());

               if (!jmd.getRequiredWorkContexts().contains(requiredWorkContext.getName()))
               {
                  if (trace)
                     log.trace("RequiredWorkContext=" + requiredWorkContext.getName());

                  jmd.getRequiredWorkContexts().add(requiredWorkContext.getName());
               }
            }
         }
      }

      // Security permission
      SecurityPermission[] securityPermissions = c.securityPermissions();
      if (securityPermissions != null)
      {
         if (md.getRa() == null)
            md.setRa(new ResourceAdapterMetaData());

         if (md.getRa().getSecurityPermissions() == null)
            md.getRa().setSecurityPermissions(new ArrayList<SecurityPermissionMetaData>());

         for (SecurityPermission securityPermission : securityPermissions)
View Full Code Here


      if (hasInterface(attachedClass, "javax.resource.spi.ResourceAdapter"))
      {
         if (md.getRa() == null)
         {
            md.setRa(new ResourceAdapterMetaData());
         }
         if (md.getRa().getConfigProperty() == null)
         {
            md.getRa().setConfigProperty(new ArrayList<ConfigPropertyMetaData>());
         }
View Full Code Here

                                                                  AuthenticationMechanism authenticationmechanism)
      throws Exception
   {
      if (md.getRa() == null)
      {
         md.setRa(new ResourceAdapterMetaData());
      }
      if (md.getRa().getOutboundRa() == null)
      {
         md.getRa().setOutboundRa(new OutboundRaMetaData());
      }
View Full Code Here

    */
   private void createMessageListeners(ConnectorMetaData md) throws Exception
   {
      if (md.getRa() == null)
      {
         md.setRa(new ResourceAdapterMetaData());
      }
      if (md.getRa().getInboundRa() == null)
      {
         md.getRa().setInboundRa(new InboundRaMetaData());
      }
View Full Code Here

    */
   private void createAdminObject(ConnectorMetaData md) throws Exception
   {
      if (md.getRa() == null)
      {
         md.setRa(new ResourceAdapterMetaData());
      }
      if (md.getRa().getAdminObjects() == null)
      {
         md.getRa().setAdminObjects(new ArrayList<AdminObjectMetaData>());
      }
View Full Code Here

    */
   private void createConDefs(ConnectorMetaData md) throws Exception
   {
      if (md.getRa() == null)
      {
         md.setRa(new ResourceAdapterMetaData());
      }
      if (md.getRa().getOutboundRa() == null)
      {
         md.getRa().setOutboundRa(new OutboundRaMetaData());
      }
View Full Code Here

TOP

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

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.