Package org.jibeframework.core.app.method

Examples of org.jibeframework.core.app.method.RequestParamArgumentResolver


    }
    return node.hasPermission("Delete");
  }

  public void afterPropertiesSet() throws Exception {
    argumentsResolver.registerRequestParamResolver("folderId", new RequestParamArgumentResolver() {
      public void addToArgumentsCache(ArgumentCandidatesCache cache, Object paramValue) {
        if (paramValue != null) {
          CMFolder folder = repositoryService.fetch(CMFolder.class, new NodeRef((String) paramValue));
          cache.add(CMFolder.class, folder);
        }
      }
    });
    argumentsResolver.registerRequestParamResolver("contentId", new RequestParamArgumentResolver() {
      public void addToArgumentsCache(ArgumentCandidatesCache cache, Object paramValue) {
        if (paramValue != null) {
          CMContent content = repositoryService.fetch(CMContent.class, new NodeRef((String) paramValue));
          cache.add(CMContent.class, content);
        }
      }
    });
    argumentsResolver.registerRequestParamResolver("nodeId", new RequestParamArgumentResolver() {
      public void addToArgumentsCache(ArgumentCandidatesCache cache, Object paramValue) {
        if (paramValue != null) {
          CMObject node = repositoryService.fetch(CMObject.class, new NodeRef((String) paramValue));
          cache.add(CMObject.class, node);

        }
      }
    });
    argumentsResolver.registerRequestParamResolver("nodes", new RequestParamArgumentResolver() {
      @SuppressWarnings("unchecked")
      public void addToArgumentsCache(ArgumentCandidatesCache cache, Object paramValue) {
        if (paramValue != null) {
          List<CMObject> nodes = new ArrayList<CMObject>();
          for (String nr : (List<String>) paramValue) {
View Full Code Here

TOP

Related Classes of org.jibeframework.core.app.method.RequestParamArgumentResolver

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.