1 13 package info.magnolia.context; 14 15 import java.util.Map ; 16 17 import info.magnolia.cms.core.HierarchyManager; 18 import info.magnolia.cms.core.search.QueryManager; 19 import info.magnolia.cms.security.AccessManager; 20 import info.magnolia.cms.security.User; 21 22 23 29 public class SimpleContext extends AbstractMapBasedContext { 30 31 34 private Context ctx; 35 36 39 public SimpleContext() { 40 this(MgnlContext.getInstance()); 41 } 42 43 46 public SimpleContext(Map map) { 47 super(map); 48 this.ctx = MgnlContext.getInstance(); 49 } 50 51 52 55 public SimpleContext(Context ctx) { 56 this.ctx = ctx; 57 } 58 59 62 public AccessManager getAccessManager(String repositoryId, String workspaceId) { 63 return this.ctx.getAccessManager(repositoryId, workspaceId); 64 } 65 66 69 public HierarchyManager getHierarchyManager(String repositoryId, String workspaceId) { 70 return this.ctx.getHierarchyManager(repositoryId, workspaceId); 71 } 72 73 76 public User getUser() { 77 return this.ctx.getUser(); 78 } 79 80 83 public QueryManager getQueryManager(String repositoryId, String workspaceId) { 84 return this.ctx.getQueryManager(repositoryId, workspaceId); 85 } 86 87 } 88 | Popular Tags |