Package org.emrys.webosgi.core.resource.extension

Examples of org.emrys.webosgi.core.resource.extension.IResourceVisitController


          Bundle contextBundle = curResRoot.getSourceBundle();
          threadScope.get().put(RESPONSE_CUR_BUNDLE, contextBundle);

          // Get the resource visit controller and judge the
          // authority.
          IResourceVisitController controller = curResRoot
              .getVisitControler();

          // Buffer the current Resource Define Root to thread local
          // variant map. Do not
          // need to judge null.
          threadScope.get().put(RESPONSE_CUR_VISIT_CTRL, controller);

          if (controller == null || controller.canRead(req)) {
            // Search the published resource root in a tree
            // construct for the
            // resource presented by the request path. The result
            // will buffered into
            // thread local variants map.
View Full Code Here


    List<BaseResource> reses = r.getResources();
    for (BaseResource res : reses) {
      Object parentVisitController = threadScope.get().get(
          RESPONSE_CUR_VISIT_CTRL);
      try {
        IResourceVisitController visitController = res
            .getVisitControler();
        // Buffer the current Resource Define Root to thread local
        // variant map. If null, not
        // set
        // to null, just use parent Resource Define's Visit Controller.
        if (visitController != null)
          threadScope.get().put(RESPONSE_CUR_VISIT_CTRL,
              visitController);
        HttpServletRequest req = (HttpServletRequest) threadScope.get()
            .get(RESPONSE_REQ);
        if (visitController == null || visitController.canRead(req)) {
          boolean found = visitRes(res, reqPath, null, null, null);
          if (found)
            break;
        }
      } finally {
View Full Code Here

      if ((quickID != null && quickID.length() > 0 && reqPath
          .equals(new Path(res.getQuickID()).toPortableString()))
          || reqPath.equals(newAliasPath)) {

        // check if folder browse allowed???
        IResourceVisitController visitController = (IResourceVisitController) threadScope
            .get().get(RESPONSE_CUR_VISIT_CTRL);
        if (visitController != null
            && !visitController.canBrowseFolder(req)) {
          // Buffer the status marking that a folder be found.
          threadScope.get().put(RESPONSE_IS_FOLDER, Boolean.TRUE);
          return true;
        }
View Full Code Here

    long ifLastModifiedSince = curReq.getDateHeader("If-Modified-Since");
    /*
     * if (ifLastModifiedSince < 0) return true;
     */

    IResourceVisitController curVisitController = (IResourceVisitController) threadScope
        .get().get(RESPONSE_CUR_VISIT_CTRL);
    long lastMidifiedTimeMills = -1;

    if (curVisitController != null)
      lastMidifiedTimeMills = curVisitController
          .getLastModifiedTimeMillis(curReq, localFile);

    if (lastMidifiedTimeMills <= 0)
      lastMidifiedTimeMills = startTimeMillis;

View Full Code Here

TOP

Related Classes of org.emrys.webosgi.core.resource.extension.IResourceVisitController

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.