1 63 64 65 package com.jcorporate.expresso.core.registry; 66 67 import com.jcorporate.expresso.core.security.User; 68 69 70 99 public class ExpressoThreadContext { 100 104 private User user; 105 106 109 private String dataContext; 110 111 114 public ExpressoThreadContext() { 115 super(); 116 setDataContext(RequestRegistry.getDataContext()); 117 setUser(RequestRegistry.getUser()); 118 } 119 120 121 126 public void applyToCurrentThread() { 127 new MutableRequestRegistry(getDataContext(), getUser()); 128 } 129 130 135 protected void setUser(User user) { 136 this.user = user; 137 } 138 139 144 protected void setDataContext(String dataContext) { 145 this.dataContext = dataContext; 146 } 147 148 153 public User getUser() { 154 return user; 155 } 156 157 162 public String getDataContext() { 163 return dataContext; 164 } 165 } 166 | Popular Tags |