Ejemplo n.º 1
0
  /**
   * @param elements
   * @param request
   * @param response
   * @return
   * @throws JCRNodeFactoryServiceException
   * @throws RepositoryException
   * @throws IOException
   * @throws UnsupportedEncodingException
   */
  private Map<String, Object> doPatchShared(
      String[] elements, HttpServletRequest request, HttpServletResponse response)
      throws RepositoryException, JCRNodeFactoryServiceException, UnsupportedEncodingException,
          IOException {

    String path = "/" + StringUtils.join(elements, "/", 2, elements.length);
    path = PathUtils.normalizePath(path);
    return saveProperties(path, new MapParams(request));
  }
Ejemplo n.º 2
0
  /**
   * @param elements
   * @param request
   * @param response
   * @return
   * @throws IOException
   * @throws JCRNodeFactoryServiceException
   * @throws RepositoryException
   * @throws UnsupportedEncodingException
   */
  private Map<String, Object> doPatchPrivate(
      String[] elements, HttpServletRequest request, HttpServletResponse response)
      throws UnsupportedEncodingException, RepositoryException, JCRNodeFactoryServiceException,
          IOException {

    String user = request.getRemoteUser();

    String path = StringUtils.join(elements, "/", 2, elements.length);
    path = userFactoryService.getUserSharedPrivatePath(user) + path;
    path = PathUtils.normalizePath(path);
    return saveProperties(path, new MapParams(request));
  }