1 16 package org.apache.commons.chain.web.faces; 17 18 19 import java.util.Map ; 20 import javax.faces.context.FacesContext; 21 import org.apache.commons.chain.web.WebContext; 22 23 24 33 34 public class FacesWebContext extends WebContext { 35 36 37 39 40 43 public FacesWebContext() { 44 45 ; 46 47 } 48 49 50 56 public FacesWebContext(FacesContext context) { 57 58 initialize(context); 59 60 } 61 62 63 65 66 70 private FacesContext context = null; 71 72 73 75 76 80 public FacesContext getContext() { 81 82 return (this.context); 83 84 } 85 86 87 93 public void initialize(FacesContext context) { 94 95 this.context = context; 96 97 } 98 99 100 106 public void release() { 107 108 context = null; 109 110 } 111 112 113 114 116 117 public Map getApplicationScope() { 118 119 return (context.getExternalContext().getApplicationMap()); 120 121 } 122 123 124 public Map getHeader() { 125 126 return (context.getExternalContext().getRequestHeaderMap()); 127 128 } 129 130 131 public Map getHeaderValues() { 132 133 return (context.getExternalContext().getRequestHeaderValuesMap()); 134 135 } 136 137 138 public Map getInitParam() { 139 140 return (context.getExternalContext().getInitParameterMap()); 141 142 } 143 144 145 public Map getParam() { 146 147 return (context.getExternalContext().getRequestParameterMap()); 148 149 } 150 151 152 public Map getParamValues() { 153 154 return (context.getExternalContext().getRequestParameterValuesMap()); 155 156 } 157 158 159 public Map getRequestScope() { 160 161 return (context.getExternalContext().getRequestMap()); 162 163 } 164 165 166 public Map getSessionScope() { 167 168 return (context.getExternalContext().getSessionMap()); 169 170 } 171 172 173 174 } 175 | Popular Tags |