Package org.jboss.metadata.javaee.spec

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


   public void setDescription(String desc)
   {
      DescriptionGroupMetaData group = getDescriptionGroup();
      if(group == null)
         group = new DescriptionGroupMetaData();
      DescriptionsImpl descriptions = new DescriptionsImpl();
      DescriptionImpl di = new DescriptionImpl();
      di.setDescription(desc);
      descriptions.add(di);
      group.setDescriptions(descriptions);
   }
View Full Code Here


        }
        return metaData;
    }

    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

      return metaData;
   }

   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

  
   protected void assertDescriptions(String suffix, Descriptions descriptions)
   {
      assertNotNull("no descriptions are set", descriptions);
      assertTrue(descriptions instanceof DescriptionsImpl);
      DescriptionsImpl impl = (DescriptionsImpl) descriptions;
      assertEquals(3, impl.size());
      assertDescription("en", suffix, impl);
      assertDescription("fr", suffix, impl);
      assertDescription("de", suffix, impl);
   }
View Full Code Here

   {
      // Override
      SecurityRoleRefsMetaData overrideSecurity = new SecurityRoleRefsMetaData();
      overrideSecurity.setId("override");
      SecurityRoleRefMetaData overrideSecurityRoleRef = new SecurityRoleRefMetaData();
      overrideSecurityRoleRef.setDescriptions(new DescriptionsImpl());
      overrideSecurityRoleRef.setId("overrideId");
      overrideSecurityRoleRef.setRoleLink("overrideLink");
      overrideSecurityRoleRef.setRoleName("overrideRoleName");
      overrideSecurity.add(overrideSecurityRoleRef);
      JBossSessionBeanMetaData override = new JBossSessionBeanMetaData();
      override.setSecurityRoleRefs(overrideSecurity);
     
      // Original
      SecurityRoleRefMetaData originalSecurityRoleRef = new SecurityRoleRefMetaData();
      originalSecurityRoleRef.setDescriptions(new DescriptionsImpl());
      originalSecurityRoleRef.setId("originalId");
      originalSecurityRoleRef.setName("originalName");
      originalSecurityRoleRef.setRoleLink("originalLink");
      originalSecurityRoleRef.setRoleName("originalRoleName");
      SecurityRoleRefsMetaData originalSecurityRoleRefsMetaData = new SecurityRoleRefsMetaData();
View Full Code Here

   public void testClusterConfig()
   {
      // Override
      ClusterConfigMetaData overrideClusterConfig = new ClusterConfigMetaData();
      overrideClusterConfig.setBeanLoadBalancePolicy("overrideBeanLoadBalancePolicy");
      overrideClusterConfig.setDescriptions(new DescriptionsImpl());
      overrideClusterConfig.setHomeLoadBalancePolicy("overrideHomeLoadBalancePolicy");
      overrideClusterConfig.setId("overrideId");
      overrideClusterConfig.setPartitionName("overridePartitionName");
      overrideClusterConfig.setSessionStateManagerJndiName("overrideSessionStateManagerJndiName");
     
      JBossSessionBeanMetaData override = new JBossSessionBeanMetaData();
      override.setClusterConfig(overrideClusterConfig);
      override.setClustered(false);
      override.setName("override");
     
      // Original
      ClusterConfigMetaData originalClusterConfig = new ClusterConfigMetaData();
      originalClusterConfig.setBeanLoadBalancePolicy("originalBeanLoadBalancePolicy");
      originalClusterConfig.setDescriptions(new DescriptionsImpl());
      originalClusterConfig.setHomeLoadBalancePolicy("originalHomeLoadBalancePolicy");
      originalClusterConfig.setId("originalId");
      originalClusterConfig.setPartitionName("originalPartitionName");
      originalClusterConfig.setSessionStateManagerJndiName("originalSessionStateManagerJndiName");
     
View Full Code Here

  
   public void testEjbTimeout()
   {
      // Override
      SecurityIdentityMetaData overrideEjbTimeout = new SecurityIdentityMetaData();
      overrideEjbTimeout.setDescriptions(new DescriptionsImpl());
      overrideEjbTimeout.setRunAsPrincipal("overrideRunAsPrincipal");
     
      RunAsMetaData overrideRunAs = new RunAsMetaData();
      overrideRunAs.setDescriptions(new DescriptionsImpl());
      overrideRunAs.setRoleName("overrideRoleName");
      overrideRunAs.setId("overrideId");
     
      EmptyMetaData overrideEmpty = new EmptyMetaData();
      overrideEmpty.setId("overrideId");
     
      overrideEjbTimeout.setRunAs(overrideRunAs);
      overrideEjbTimeout.setUseCallerIdentity(overrideEmpty);
      JBossSessionBeanMetaData override = new JBossSessionBeanMetaData();
      override.setEjbTimeoutIdentity(overrideEjbTimeout);
      override.setName("overrideName");
     
      // Original
      SecurityIdentityMetaData originalEjbTimeout = new SecurityIdentityMetaData();
      originalEjbTimeout.setRunAsPrincipal("originalRunAsPrincipal");
     
      RunAsMetaData originalRunAs = new RunAsMetaData();
      originalRunAs.setDescriptions(new DescriptionsImpl());
      originalRunAs.setRoleName("originalRoleName");
      originalRunAs.setId("originalId");
     
      EmptyMetaData originalEmpty = new EmptyMetaData();
      originalEmpty.setId("originalId");
View Full Code Here

        }
        return metaData;
    }

    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

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

      String[] description = configProperty.description();
      if (description != null)
      {
         if (cfgMeta.getDescriptions() == null)
         {
            DescriptionsImpl descsImpl = new DescriptionsImpl();
            cfgMeta.setDescriptions(descsImpl);
         }
         for (String desc : description)
         {
            DescriptionImpl descImpl = new DescriptionImpl();
View Full Code Here

TOP

Related Classes of org.jboss.metadata.javaee.spec.DescriptionsImpl

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.