Package org.jboss.metadata.javaee.spec

Examples of org.jboss.metadata.javaee.spec.DescriptionImpl


   public static Descriptions getDescription(String description)
   {
      DescriptionsImpl descriptions = null;
      if(description.length() > 0)
      {
         DescriptionImpl di = new DescriptionImpl();
         di.setDescription(description);
         descriptions = new DescriptionsImpl();
         descriptions.add(di);
      }
      return descriptions;
   }
View Full Code Here


      DescriptionGroupMetaData group = result.getDescriptionGroup();
      assertNotNull(group);
      Descriptions descriptions = group.getDescriptions();
      assertNotNull(descriptions);
     
      DescriptionImpl hello = new DescriptionImpl();
      hello.setDescription("Hello");
      assertEquals(new Description[] { hello }, descriptions.value());
   }
View Full Code Here

      DescriptionGroupMetaData group = result.getDescriptionGroup();
      assertNotNull(group);
      Descriptions descriptions = group.getDescriptions();
      assertNotNull(descriptions);
     
      DescriptionImpl en = new DescriptionImpl();
      en.setDescription("en-ear-desc");
      DescriptionImpl de = new DescriptionImpl();
      de.setDescription("de-ear-desc");
      de.setLanguage("de");
      DescriptionImpl fr = new DescriptionImpl();
      fr.setDescription("fr-ear-desc");
      fr.setLanguage("fr");
     
      Description[] expected = {en, fr, de};
      assertEquals(expected, descriptions.value());

      DisplayNames displayNames = group.getDisplayNames();
View Full Code Here

      DescriptionGroupMetaData group = result.getDescriptionGroup();
      assertNotNull(group);
      Descriptions descriptions = group.getDescriptions();
      assertNotNull(descriptions);
     
      DescriptionImpl en = new DescriptionImpl();
      en.setDescription("en-ear-desc");
      DescriptionImpl de = new DescriptionImpl();
      de.setDescription("de-ear-desc");
      de.setLanguage("de");
      DescriptionImpl fr = new DescriptionImpl();
      fr.setDescription("fr-ear-desc");
      fr.setLanguage("fr");
     
      Description[] expected = {en, fr, de};
      assertEquals(expected, descriptions.value());

      DisplayNames displayNames = group.getDisplayNames();
View Full Code Here

      DescriptionGroupMetaData group = ear.getDescriptionGroup();
      assertNotNull(group);
      Descriptions descriptions = group.getDescriptions();
      assertNotNull(descriptions);
     
      DescriptionImpl den = new DescriptionImpl();
      den.setDescription("en-ear-desc");
      DescriptionImpl dfr = new DescriptionImpl();
      dfr.setLanguage("fr");
      dfr.setDescription("fr-ear-des");
      DescriptionImpl dde = new DescriptionImpl();
      dde.setLanguage("de");
      dde.setDescription("de-ear-des");
      Description[] expected = {den, dfr, dde};
      assertEquals(expected, descriptions.value());
   }
View Full Code Here

      DescriptionGroupMetaData group = result.getDescriptionGroup();
      assertNotNull(group);
      Descriptions descriptions = group.getDescriptions();
      assertNotNull(descriptions);

      DescriptionImpl hello = new DescriptionImpl();
      hello.setDescription("Hello");
      assertEquals(new Description[]
      {hello}, descriptions.value());
   }
View Full Code Here

    }

    protected Descriptions getDescription(String description) {
        DescriptionsImpl descriptions = null;
        if (description.length() > 0) {
            DescriptionImpl di = new DescriptionImpl();
            di.setDescription(description);
            descriptions = new DescriptionsImpl();
            descriptions.add(di);
        }
        return descriptions;
    }
View Full Code Here

            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
View Full Code Here

            DescriptionsImpl descsImpl = new DescriptionsImpl();
            cfgMeta.setDescriptions(descsImpl);
         }
         for (String desc : description)
         {
            DescriptionImpl descImpl = new DescriptionImpl();
            descImpl.setDescription(desc);
            ((DescriptionsImpl)cfgMeta.getDescriptions()).add(descImpl);
         }
      }
     
      String attachedClassName = annotation.getClassName();
View Full Code Here

            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.javaee.spec.DescriptionImpl

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.