Package org.pentaho.reporting.libraries.repository

Examples of org.pentaho.reporting.libraries.repository.Repository


  }

  public String rewrite(final ContentEntity sourceDocument, final ContentEntity dataEntity)
      throws URLRewriteException
  {
    final Repository dataRepository = dataEntity.getRepository();
    if (dataRepository instanceof UrlRepository == false)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataRepository is no URL-Repository.");
    }

    final UrlRepository dataUrlRepo = (UrlRepository) dataRepository;
    final String dataPath = buildPath(dataEntity);
    final URL dataItemUrl;
    try
    {
      dataItemUrl = new URL(dataUrlRepo.getURL(), dataPath);
    }
    catch (MalformedURLException e)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataEntity has no valid URL.");
    }

    final Repository documentRepository = sourceDocument.getRepository();
    if (documentRepository instanceof UrlRepository == false)
    {
      // If at least the data entity has an URL, we can always fall back
      // to an global URL..
      return dataItemUrl.toExternalForm();
View Full Code Here


      {
        return (new SingleRepositoryURLRewriter());
      }
      else
      {
        final Repository bulkRepository = bulkLocation.getRepository();
        final Repository bodyRepository = getBodyContentLocation().getRepository();
        if (bulkRepository == bodyRepository)
        {
          return (new SingleRepositoryURLRewriter());
        }
        else if (bulkRepository instanceof UrlRepository &&
View Full Code Here

    {
      throw new ContentNotRecognizedException("No valid handler for the given content.");
    }

    final RepositoryResourceBundleData bdata = (RepositoryResourceBundleData) data;
    final Repository repository = bdata.getRepository();
    try
    {
      final StaticDocumentBundle bundle = new StaticDocumentBundle(repository, manager, bdata.getBundleKey());
      return new SimpleResource(data.getKey(), bundle, getFactoryType(), data.getVersion(manager));
    }
View Full Code Here

    if ("true".equals(LibDocBundleBoot.getInstance().getGlobalConfig().getConfigProperty
        ("org.pentaho.reporting.libraries.docbundle.bundleloader.memory.StrictKeyCheck", "true")))
    {
      try
      {
        final Repository repository = (Repository) parent.getFactoryParameters().get(new FactoryParameterKey("repository"));
        if (RepositoryUtilities.isExistsEntity(repository, RepositoryUtilities.split(path, "/")) == false)
        {
          throw new ResourceKeyCreationException("The key does not exist: " + path);
        }
      }
View Full Code Here

  }

  public String rewrite(final ContentEntity sourceDocument, final ContentEntity dataEntity)
      throws URLRewriteException
  {
    final Repository dataRepository = dataEntity.getRepository();
    if (dataRepository instanceof UrlRepository == false)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataRepository is no URL-Repository.");
    }

    final UrlRepository dataUrlRepo = (UrlRepository) dataRepository;
    final String dataPath = buildPath(dataEntity);
    final URL dataItemUrl;
    try
    {
      dataItemUrl = new URL(dataUrlRepo.getURL(), dataPath);
    }
    catch (MalformedURLException e)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataEntity has no valid URL.");
    }

    final Repository documentRepository = sourceDocument.getRepository();
    if (documentRepository instanceof UrlRepository == false)
    {
      // If at least the data entity has an URL, we can always fall back
      // to an global URL..
      return dataItemUrl.toExternalForm();
View Full Code Here

      {
        return (new SingleRepositoryURLRewriter());
      }
      else
      {
        final Repository bulkRepository = bulkLocation.getRepository();
        final Repository bodyRepository = getBodyContentLocation().getRepository();
        if (bulkRepository == bodyRepository)
        {
          return (new SingleRepositoryURLRewriter());
        }
        else if (bulkRepository instanceof UrlRepository &&
View Full Code Here

  }

  public String rewrite(final ContentEntity sourceDocument, final ContentEntity dataEntity)
      throws URLRewriteException
  {
    final Repository dataRepository = dataEntity.getRepository();
    if (dataRepository instanceof UrlRepository == false)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataRepository is no URL-Repository.");
    }

    final UrlRepository dataUrlRepo = (UrlRepository) dataRepository;
    final String dataPath = buildPath(dataEntity);
    final URL dataItemUrl;
    try
    {
      dataItemUrl = new URL(dataUrlRepo.getURL(), dataPath);
    }
    catch (MalformedURLException e)
    {
      // cannot proceed ..
      throw new URLRewriteException("DataEntity has no valid URL.");
    }

    final Repository documentRepository = sourceDocument.getRepository();
    if (documentRepository instanceof UrlRepository == false)
    {
      // If at least the data entity has an URL, we can always fall back
      // to an global URL..
      return dataItemUrl.toExternalForm();
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.repository.Repository

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.