1 13 package info.magnolia.cms.core.search; 14 15 import info.magnolia.cms.security.AccessManager; 16 17 import javax.jcr.ItemExistsException; 18 import javax.jcr.ItemNotFoundException; 19 import javax.jcr.Node; 20 import javax.jcr.PathNotFoundException; 21 import javax.jcr.RepositoryException; 22 import javax.jcr.UnsupportedRepositoryOperationException; 23 import javax.jcr.lock.LockException; 24 import javax.jcr.nodetype.ConstraintViolationException; 25 import javax.jcr.version.VersionException; 26 27 28 32 33 public class QueryImpl implements Query { 34 35 private javax.jcr.query.Query query; 36 37 private AccessManager accessManager; 38 39 protected QueryImpl(javax.jcr.query.Query query, AccessManager accessManager) { 40 this.query = query; 41 this.accessManager = accessManager; 42 } 43 44 public QueryResult execute() throws RepositoryException { 45 javax.jcr.query.QueryResult result = this.query.execute(); 46 QueryResultImpl filteredResult = new QueryResultImpl(result, this.accessManager); 47 return filteredResult; 48 } 49 50 public String getStatement() { 51 return this.query.getStatement(); 52 } 53 54 public String getLanguage() { 55 return this.query.getLanguage(); 56 } 57 58 public String getStoredQueryPath() throws ItemNotFoundException, RepositoryException { 59 return this.query.getStoredQueryPath(); 60 } 61 62 public Node storeAsNode(String s) throws ItemExistsException, PathNotFoundException, VersionException, 63 ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException { 64 return this.query.storeAsNode(s); 65 } 66 } 67 | Popular Tags |