Package org.restlet.resource

Examples of org.restlet.resource.Directory


   * @param router
   * @param folder
   */
  void attachMaven2(Context context, Router router, String folder) {
    // Maven 2 resource
    Directory m2 = new Directory(context, config.getArtifactRoot(folder).toURI().toString());
    m2.setListingAllowed(true);
    m2.setDeeplyAccessible(true);
    router.attach("/m2/" + folder, m2);
   
    config.getArtifactRoot(folder).mkdirs();
  }
View Full Code Here


    Redirector redirector = new Redirector(getContext(), target, Redirector.MODE_CLIENT_FOUND);
    router.attach("/", redirector);
    File currentPath = new File(RestServer.class.getProtectionDomain().getCodeSource().getLocation().getPath());
    String htmlPath = "file:///" + currentPath.getParent() + "/html/";
    router.attach("/", redirector);
    router.attach("", new Directory(getContext(), htmlPath));

    return router;
  }
View Full Code Here

TOP

Related Classes of org.restlet.resource.Directory

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.