Package pt.webdetails.cpf.repository.api

Examples of pt.webdetails.cpf.repository.api.IReadAccess.fetchFile()


        Thread.currentThread().setContextClassLoader(altLoader);
      }
       
        IReadAccess mf = contentAccessFactory.getPluginSystemReader("../mondrian");
        if (mf.fileExists(mondrianPropsFilename)) {
          IBasicFile bf = mf.fetchFile(mondrianPropsFilename);
            MondrianProperties.instance().load(bf.getContents());
            log.debug("Loaded mondrian properties file: " + mondrianPropsFilename);
         
        } else {
          log.debug("Cannot find mondrian properties file: "+  mondrianPropsFilename);
View Full Code Here


    IBasicFile templateResourceFile = null;
    IReadAccess pluginRepoAccess = CdfEngine.getPluginRepositoryReader( "templates/" );

    if ( pluginRepoAccess.fileExists( dashboardTemplate ) ) {
      templateResourceFile = pluginRepoAccess.fetchFile( dashboardTemplate );

    } else if ( systemAccess.fileExists( dashboardTemplate ) ) {
      // then try in system
      templateResourceFile = systemAccess.fetchFile( dashboardTemplate );
    }
View Full Code Here

        dashboardTemplateFile = repoAccess.fetchFile( templatePath );
      } else {
        logger.error( "Access Denied to " + templatePath );
      }
    } else {
      dashboardTemplateFile = systemAccess.fetchFile( CdfConstants.DEFAULT_DASHBOARD_TEMPLATE_HTML );
    }

    return dashboardTemplateFile;
  }
}
View Full Code Here

      for( String path : paths ){

        IReadAccess access = Utils.getAppropriateReadAccess( path );

        if( access != null && access.fileExists( path ) && access.fetchFile( path ).isDirectory() ){
          files.add( access.fetchFile( path ) );
        } else {
          logger.error( "Discarding path '" + path + "': file does not exist or isn't a directory." );
        }
      }
View Full Code Here

      for( String path : paths ){

        IReadAccess access = Utils.getAppropriateReadAccess( path );

        if( access != null && access.fileExists( path ) && access.fetchFile( path ).isDirectory() ){
          files.add( access.fetchFile( path ) );
        } else {
          logger.error( "Discarding path '" + path + "': file does not exist or isn't a directory." );
        }
      }
    }
View Full Code Here

      // * /system/<plugin>/styles - no need to clear start info
      // * styles
      if (finalPath.startsWith("system/" + pluginId + "/"))
        finalPath = finalPath.substring(("system/" + pluginId + "/").length());

      if ( access.fileExists( finalPath ) && access.fetchFile( finalPath ).isDirectory() ) {
        style = new Style( access, finalPath, pluginId );
        styles.add( style );
      }
    }

View Full Code Here

      return null;
    }

    Document wcdfDoc = null;
    try {
      wcdfDoc = Utils.getDocFromFile( readAccess.fetchFile( wcdfFilePath ), null );
      DashboardWcdfDescriptor wcdf = DashboardWcdfDescriptor.fromXml( wcdfDoc );
      wcdf.setPath( wcdfFilePath );
      return wcdf;
    } catch ( DocumentException e ) {
      _logger.error( "DashboardWcdfDescriptor.load(wcdfFilePath)", e );
View Full Code Here

      String msg =
          sourceDashboardBaseMsgFile != null ? sourceDashboardBaseMsgFile.getName() : BASE_GLOBAL_MESSAGE_SET_FILENAME
              + ".properties";

      if ( systemReader.fileExists( msg ) ) {
        targetDashboardBaseMsgFile = systemReader.fetchFile( msg );
      }
    }
    return targetDashboardBaseMsgFile;

  }
View Full Code Here

          CdeEnvironment.getPluginSystemReader( Utils.joinPath( BASE_CACHE_DIR, msgsRelativeDir ) );

      String msg = BASE_GLOBAL_MESSAGE_SET_FILENAME + ".properties";

      if ( systemReader.fileExists( msg ) ) {
        globalMsgCacheFile = systemReader.fetchFile( msg );
      }
    }

    return globalMsgCacheFile;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.