1 13 package info.magnolia.context; 14 15 import info.magnolia.cms.core.HierarchyManager; 16 import info.magnolia.cms.core.search.QueryManager; 17 import info.magnolia.cms.i18n.Messages; 18 import info.magnolia.cms.security.AccessManager; 19 import info.magnolia.cms.security.User; 20 21 import java.util.Locale ; 22 import java.util.Map ; 23 24 25 32 public interface Context extends org.apache.commons.chain.Context { 33 34 37 public static final int LOCAL_SCOPE = 1; 38 39 42 public static final int SESSION_SCOPE = 2; 43 44 47 public static final int APPLICATION_SCOPE = 3; 48 49 final static public String ATTRIBUTE_REPOSITORY = "repository"; 50 51 final static public String ATTRIBUTE_PATH = "path"; 52 53 final static public String ATTRIBUTE_VERSION = "version"; 54 55 final static public String ATTRIBUTE_VERSION_MAP = "versionMap"; 56 57 final static public String ATTRIBUTE_UUID = "uuid"; 58 59 final static public String ATTRIBUTE_RECURSIVE = "recursive"; 60 61 public static final String ATTRIBUTE_COMMENT = "comment"; 62 63 public static final String ATTRIBUTE_MESSAGE = "msg"; 64 65 public static final String ATTRIBUTE_EXCEPTION = "exception"; 66 67 71 public void setUser(User user); 72 73 78 public User getUser(); 79 80 83 public void setLocale(Locale locale); 84 85 88 public Locale getLocale(); 89 90 95 public HierarchyManager getHierarchyManager(String repositoryId); 96 97 103 public HierarchyManager getHierarchyManager(String repositoryId, String workspaceId); 104 105 110 public AccessManager getAccessManager(String repositoryId); 111 112 118 public AccessManager getAccessManager(String repositoryId, String workspaceId); 119 120 125 public QueryManager getQueryManager(String repositoryId); 126 127 133 public QueryManager getQueryManager(String repositoryId, String workspaceId); 134 135 141 public void setAttribute(String name, Object value, int scope); 142 143 149 public Object getAttribute(String name, int scope); 150 151 157 public Object getAttribute(String name); 158 159 164 public Map getAttributes(int scope); 165 166 171 public void removeAttribute(String name, int scope); 172 173 177 public Map getAttributes(); 178 179 182 public Messages getMessages(); 183 184 188 public Messages getMessages(String basename); 189 190 } 191 | Popular Tags |