Package org.pentaho.reporting.libraries.base.versioning

Examples of org.pentaho.reporting.libraries.base.versioning.ProjectInformation


    }

    try
    {
      // boot dependent libraries ...
      final ProjectInformation info = getProjectInfo();
      if (info != null)
      {
        performBootDependencies(info.getLibraries());
        performBootDependencies(info.getOptionalLibraries());
      }

      performBoot();
      if (LOGGER.isInfoEnabled())
      {
        if (info != null)
        {
          LOGGER.info(info.getName() + ' ' + info.getVersion() + " started.");
        }
        else
        {
          LOGGER.info(getClass() + " started.");
        }
View Full Code Here


      final DependencyInformation child = childs[i];
      if (child instanceof ProjectInformation == false)
      {
        continue;
      }
      final ProjectInformation projectInformation = (ProjectInformation) child;
      final AbstractBoot boot = loadBooter(projectInformation.getBootClass());
      if (boot != null)
      {
        // but we're waiting until the booting is complete ...
        synchronized (boot)
        {
          boot.start();
          while (boot.isBootDone() == false &&
              boot.isBootFailed() == false)
          {
            try
            {
              boot.wait();
            }
            catch (InterruptedException e)
            {
              // ignore it ..
            }
          }

          if (boot.isBootFailed())
          {
            this.bootFailed = boot.getBootFailureReason();
            LOGGER.error("Dependent project failed to boot up: " +
                projectInformation.getBootClass() + " failed to boot: ", this.bootFailed);
            return;
          }
        }
      }
    }
View Full Code Here

    ClassicEngineBoot.getInstance().start();
  }

  public void testIsValidVersion() {
    // Set current version to 3.3.3
    final ProjectInformation projectInfo = Mockito.mock(ProjectInformation.class);
    Mockito.when(projectInfo.getReleaseMajor()).thenReturn("3");
    Mockito.when(projectInfo.getReleaseMinor()).thenReturn("3");
    Mockito.when(projectInfo.getReleaseMilestone()).thenReturn("3");

    final int[] trunk = parseVersionId(ClassicEngineBoot.VERSION_TRUNK);
    Assert.assertEquals( "TRUNK version must be valid", ClassicEngineBoot.VersionValidity.VALID, ClassicEngineBoot.getInstance().isValidVersion( trunk[0], trunk[1], trunk[2], projectInfo ) );

    Assert.assertEquals( "The same version must be valid", ClassicEngineBoot.VersionValidity.VALID, ClassicEngineBoot.getInstance().isValidVersion( 3, 3, 3, projectInfo ) );
View Full Code Here

    Assert.assertEquals( "Newer patch version must be patch invalid", ClassicEngineBoot.VersionValidity.INVALID_PATCH, ClassicEngineBoot.getInstance().isValidVersion( 3, 3, 4, projectInfo ) );
  }

  public void testTrunkIsValid() {
    // Set current version to 3.3.3
    final ProjectInformation projectInfo = Mockito.mock(ProjectInformation.class);
    Mockito.when(projectInfo.getReleaseMajor()).thenReturn("999");
    Mockito.when(projectInfo.getReleaseMinor()).thenReturn("999");
    Mockito.when(projectInfo.getReleaseMilestone()).thenReturn("999");

    final int[] trunk = parseVersionId(ClassicEngineBoot.VERSION_TRUNK);
    Assert.assertEquals( "TRUNK version must be valid", ClassicEngineBoot.VersionValidity.VALID, ClassicEngineBoot.getInstance().isValidVersion( trunk[0], trunk[1], trunk[2], projectInfo ) );

    Assert.assertEquals( "The same version must be valid", ClassicEngineBoot.VersionValidity.VALID, ClassicEngineBoot.getInstance().isValidVersion( 3, 3, 3, projectInfo ) );
View Full Code Here

    addLibrary(LibLoaderInfo.getInstance());
    addLibrary(LibLayoutInfo.getInstance());
    addLibrary(LibFormulaInfo.getInstance());
    addLibrary(LibXmlInfo.getInstance());

    final ProjectInformation pixieLibraryInfo = tryLoadPixieInfo();
    if (pixieLibraryInfo != null)
    {
      addLibrary(pixieLibraryInfo);
    }
    final ProjectInformation libfontsLibraryInfo = tryLoadLibFontInfo();
    if (libfontsLibraryInfo != null)
    {
      addLibrary(libfontsLibraryInfo);
    }
View Full Code Here

    }

    try
    {
      // boot dependent libraries ...
      final ProjectInformation info = getProjectInfo();
      if (info != null)
      {
        performBootDependencies(info.getLibraries());
        performBootDependencies(info.getOptionalLibraries());
      }

      performBoot();
      if (info != null)
      {
        LOGGER.info(info.getName() + ' ' + info.getVersion() + " started.");
      }
      else
      {
        LOGGER.info(getClass() + " started.");
      }
View Full Code Here

      final DependencyInformation child = childs[i];
      if (child instanceof ProjectInformation == false)
      {
        continue;
      }
      final ProjectInformation projectInformation = (ProjectInformation) child;
      final AbstractBoot boot = loadBooter(projectInformation.getBootClass());
      if (boot != null)
      {
        // but we're waiting until the booting is complete ...
        synchronized (boot)
        {
          boot.start();
          while (boot.isBootDone() == false &&
                 boot.isBootFailed() == false)
          {
            try
            {
              boot.wait();
            }
            catch (InterruptedException e)
            {
              // ignore it ..
            }
          }

          if (boot.isBootFailed())
          {
            this.bootFailed = boot.getBootFailureReason();
            LOGGER.error("Dependent project failed to boot up: " +
                projectInformation.getBootClass() + " failed to boot: ", boot.getBootFailureReason());
            return;
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.versioning.ProjectInformation

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.