Package org.wymiwyg.commons.util.dirbrowser

Examples of org.wymiwyg.commons.util.dirbrowser.PathNode


  }

  @GET
  @Path("{path:.+}")
  public PathNode getStaticFile(@PathParam("path") String path) {
    final PathNode node = fileServer.getNode(path);
    return node;
  }
View Full Code Here


   *
   * @param context The bundle context of the bundle containing the path.
   * @param path the path where the file are to be exposed
   */
  public void configure(BundleContext context, String path) {
    PathNode pathNode;
    Bundle bundle = context.getBundle();
    URL resourceDir = getClass().getResource(path);
    pathNode = new BundlePathNode(bundle, resourceDir.getPath());
    configure(pathNode);
  }
View Full Code Here

    System.setSecurityManager(new SecurityManager());
    felixInstance = new Felix(configProps);
    System.out.println("starting felix");
    felixInstance.start();
    final String revertParam = arguments.getRevertParam();
    final PathNode bundlesRoot = PathNodeFactory.getPathNode(Main.class.getResource("/bundles"));
    final BundleContext bundleContext = felixInstance.getBundleContext();
    installBundlesForStartLevels(bundleContext, bundlesRoot, revertParam);
  }
View Full Code Here

    byte startLevel = 0;
    for (String startLevelPath : startLevelePaths) {
      startLevel = Byte.parseByte(
          startLevelPath.substring(startlevelpathprefix.length(),
          startLevelPath.length() - 1));
      final PathNode startLevelPathNode = bundlesRoot.getSubPath(startLevelPath);
      Set<MavenArtifactDesc> artDescs = getArtDescsFrom(startLevelPathNode);
      if (revertParam != null) {
        artDescs = getRevertArtifacts(revertParam, artDescs, installedBundles);
      }
      if (!alreadyInstalled(artDescs, installedBundles) || revertParam != null) {
View Full Code Here

  }

  private List<PathNode> getJarPaths(PathNode pathNode) {
    List<PathNode> result = new ArrayList<PathNode>();
    for (String childName : pathNode.list()) {
      PathNode childNode = pathNode.getSubPath(childName);
      if ((!childNode.isDirectory()) && (childName.endsWith(".jar"))) {
        result.add(childNode);
      } else {
        for (PathNode subPath : getJarPaths(childNode)) {
          result.add(subPath);
        }
View Full Code Here

   * @param componentContext
   */
  protected void activate(ComponentContext context) {
    Bundle bundle = context.getBundleContext().getBundle();
    URL resourceDir = getClass().getResource("staticweb");
    PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
    logger.debug("Initializing file server for {} ({})", resourceDir,
        resourceDir.getFile());
    fileServer = new FileServer(pathNode);
  }
View Full Code Here

   * @return {@link PathNode}
   */
  @GET
  @Path("{path:.+}")
  public PathNode getStaticFile(@PathParam("path") String path) {
    final PathNode node = fileServer.getNode(path);
    logger.debug("Serving static {}", node);
    try {
      logger.debug("Inputstream {}", node.getInputStream());
    } catch (IOException ex) {
      logger.error("Reading static file {}", ex);
    }
    return node;
  }
View Full Code Here

  protected void activate(ComponentContext context) throws IOException,
      URISyntaxException {
    Bundle bundle = context.getBundleContext().getBundle();
    URL resourceDir = getClass().getResource("staticweb");
    PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());

    logger.debug("Initializing file server for {} ({})", resourceDir,
        resourceDir.getFile());

    fileServer = new FileServer(pathNode);
View Full Code Here

   * @param componentContext
   */
  protected void activate(ComponentContext context) {
    Bundle bundle = context.getBundleContext().getBundle();
    URL resourceDir = getClass().getResource("staticweb");
    PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
    logger.debug("Initializing file server for {} ({})", resourceDir,
        resourceDir.getFile());
    fileServer = new FileServer(pathNode);
  }
View Full Code Here

   * @return {@link PathNode}
   */
  @GET
  @Path("{path:.+}")
  public PathNode getStaticFile(@PathParam("path") String path) {
    final PathNode node = fileServer.getNode(path);
    return node;
  }
View Full Code Here

TOP

Related Classes of org.wymiwyg.commons.util.dirbrowser.PathNode

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.