code: @Override
      public RequestCtx handleRequest(HttpServletRequest request,
                                      HttpServletResponse response)
              throws IOException, ServletException {
          if (logger.isDebugEnabled()) {
              logger.debug("{}/handleRequest!", this.getClass().getName());
          }
  
          String state = request.getParameter("state");
          String ownerId = request.getParameter("ownerId");
  
          RequestCtx req = null;
          Map<URI, AttributeValue> actions = new HashMap<URI, AttributeValue>();
          Map<URI, AttributeValue> resAttr;
          try {
              String[] parts = getPathParts(request);
              resAttr = ResourceAttributes.getResources(parts);
              if (state != null && !state.isEmpty()) {
                  resAttr.put(Constants.OBJECT.STATE.getURI(),
                              new StringAttribute(state));
              }
              if (ownerId != null && !ownerId.isEmpty()) {
                  resAttr.put(Constants.OBJECT.OWNER.getURI(),
                              new StringAttribute(state));
              }
  
              if (state != null && state.equals("A")) {
                  actions.put(Constants.ACTION.ID.getURI(),
                              new StringAttribute("publish"));
              } else if (state != null && state.equals("I")) {
                  actions.put(Constants.ACTION.ID.getURI(),
                              new StringAttribute("unpublish"));
              } else {
                  actions.put(Constants.ACTION.ID.getURI(),
                              Constants.ACTION.MODIFY_OBJECT
                                      .getStringAttribute());
              }
              actions.put(Constants.ACTION.API.getURI(),
                          Constants.ACTION.APIM.getStringAttribute());
  
              req =
                      getContextHandler().buildRequest(getSubjects(request),
                                                       actions,
                                                       resAttr,
                                                       getEnvironment(request));
  
              LogUtil.statLog(request.getRemoteUser(),
                              Constants.ACTION.MODIFY_OBJECT.uri,
                              parts[1],
                              null);
          } catch (Exception e) {
              logger.error(e.getMessage(), e);
              throw new ServletException(e.getMessage(), e);
          }
  
          return req;
      }
docs: /*
  (non-Javadoc)
  @see
  org.fcrepo.server.security.xacml.pep.rest.filters.RESTFilter#handleRequest(javax.servlet
  .http.HttpServletRequest, javax.servlet.http.HttpServletResponse)