Package org.jboss.forge.furnace.versions

Examples of org.jboss.forge.furnace.versions.SingleVersion


   }

   @Override
   public Version getSpecVersion()
   {
      return new SingleVersion("3.0");
   }
View Full Code Here


   }

   @Override
   public Version getSpecVersion()
   {
      return new SingleVersion("2.0");
   }
View Full Code Here

   @Test
   public void testSetValueInSelectManyForInterface()
   {
      UISelectMany<Version> versions = inputFactory.createSelectMany("versions", Version.class);
      List<Version> versionList = Arrays.<Version> asList(new SingleVersion("1.0.0"), new SingleVersion("2.0.0"));
      versions.setValueChoices(versionList);
      InputComponents.setValueFor(converterFactory, versions, Arrays.asList("1.0.0", "2.0.0"));
      Iterator<Version> value = versions.getValue().iterator();
      Assert.assertThat(value.hasNext(), is(true));
      Assert.assertThat(value.next(), is(sameInstance(versionList.get(0))));
View Full Code Here

         throw new IllegalArgumentException("Version cannot be empty.");

      AddonId id = new AddonId();

      id.name = name;
      id.version = new SingleVersion(version);
      if (apiVersion == null || apiVersion.trim().isEmpty())
         id.apiVersion = EmptyVersion.getInstance();
      else
         id.apiVersion = new SingleVersion(apiVersion);

      return id;

   }
View Full Code Here

   @SuppressWarnings("rawtypes")
   public PersistenceUnitCommon configure(PersistenceUnitCommon unit, JPADataSource ds, Project project)
   {
      unit.excludeUnlistedClasses(Boolean.FALSE);
      PersistenceCommonDescriptor descriptor = (PersistenceCommonDescriptor) unit.up();
      if (new SingleVersion(descriptor.getVersion()).compareTo(new SingleVersion("2.1")) >= 0)
      {
         PropertiesCommon properties = unit.getOrCreateProperties();
         properties.createProperty().name("javax.persistence.schema-generation.database.action").value("drop-and-create");
         properties.createProperty().name("javax.persistence.schema-generation.scripts.action").value("drop-and-create");
         String createDdlFileName = project == null ? "create.ddl" : getProjectName(project) + "Create.ddl";
View Full Code Here

   {
      Coordinate c = CoordinateBuilder.create().setGroupId("org.jboss.forge.furnace").setArtifactId("furnace");
      List<Version> versions = new ArrayList<Version>();
      for (Coordinate versionCoord : dependencyResolver.resolveVersions(DependencyQueryBuilder.create(c)))
      {
         versions.add(new SingleVersion(versionCoord.getVersion()));
      }
      forgeVersion.setValueChoices(versions);
      forgeVersion.setDefaultValue(forge.getVersion());
   }
View Full Code Here

   }

   @Override
   public Version getVersion()
   {
      return AddonRepositoryImpl.getRuntimeAPIVersion() == null ? null : new SingleVersion(
               AddonRepositoryImpl.getRuntimeAPIVersion());
   }
View Full Code Here

               for (Node child : children)
               {
                  if (child != null)
                  {
                     if ((addon.getApiVersion() == null)
                              || Versions.areEqual(new SingleVersion(child.getAttribute(ATTR_API_VERSION)),
                                       addon.getApiVersion()))
                     {
                        if ((addon.getVersion() == null)
                                 || Versions.areEqual(new SingleVersion(child.getAttribute(ATTR_VERSION)),
                                          addon.getVersion()))
                        {
                           return AddonId.from(child.getAttribute(ATTR_NAME),
                                    child.getAttribute(ATTR_VERSION),
                                    child.getAttribute(ATTR_API_VERSION));
View Full Code Here

            result = new ArrayList<AddonId>();
            for (AddonId entry : list)
            {
               if (version == null || entry.getApiVersion() == null
                        || Versions.isApiCompatible(new SingleVersion(version), entry.getApiVersion()))
               {
                  result.add(entry);
               }
            }
            return result;
View Full Code Here

                  AddonId selected = null;
                  for (int i = versions.length - 1; selected == null && i >= 0; i--)
                  {
                     String apiVersion = resolver.resolveAPIVersion(versions[i]).get();
                     if (apiVersion != null
                              && Versions.isApiCompatible(runtimeAPIVersion, new SingleVersion(apiVersion)))
                     {
                        selected = versions[i];
                     }
                  }
                  if (selected == null)
View Full Code Here

TOP

Related Classes of org.jboss.forge.furnace.versions.SingleVersion

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.