public class GlueWebContext extends GlueDefaultContext
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
GlueContext.ContentType, GlueContext.EventType, GlueContext.WebContentType
Constructor and Description |
---|
GlueWebContext()
생성자(constructor).
|
Modifier and Type | Method and Description |
---|---|
Object |
get(Object key)
Key 해당 하는 값을 조회함.
|
Object |
get(String key,
GlueContext.ContentType type)
RootMap이 아닌 ContentType에 해당 하는 Map에서 해당 key의 값을 얻는다.
|
<T> T |
getAndTryToCast(String key,
Class<T> valueClass,
GlueContext.ContentType type) |
GlueHashMap<String,Object> |
getDataAsMap(GlueContext.ContentType type) |
GlueMultipartRequest |
getMultiPartRequest() |
Map<String,Object> |
getSessionAttr() |
Object |
put(String key,
Object value,
GlueContext.ContentType type)
확장대상..
|
void |
putAll(Map<? extends String,? extends Object> map,
GlueContext.ContentType type)
확장대상..
|
void |
setMultiPartRequest(GlueMultipartRequest multipartRequest) |
String |
toString() |
getAuditAttributes, getEventSourceType, getException, getMessage, getMessages, setAuditAttributes, setException, setMessage, setMessages
getAndTryToCast, newGlueHashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode
finalize, getClass, notify, notifyAll, wait, wait, wait
getAndTryToCast, put, putAll, remove
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
public Object get(Object key)
GlueWebContext 에서 Key 탐색 우선 순위는 다음과 같다. 1. Root Map 2. Request Attribute Map 3. Request Parameter Map 우선순위를 따르지 않거나, 그 외의 Data를 얻기 위해서는 get(String key, ContentType type) 를 이용한다. Root Map : ("deptno", "10") Request Attribute Map : ("deptno", "30") Request Parameter Map : ("deptno", "20") 과 같이 GlueWebContext가 구성되어 있다면. ctx.get("deptno") 의 값은 10 이 된다. Request Attribute Map의 값인 30을 얻기 위해서는 ctx.get("deptno", WebContentType.HTTP_REQUEST_ATTR) 를 사용한다.
public GlueHashMap<String,Object> getDataAsMap(GlueContext.ContentType type)
getDataAsMap
in interface GlueContext
getDataAsMap
in class GlueDefaultContext
public Object get(String key, GlueContext.ContentType type)
GlueContext
get
in interface GlueContext
get
in class GlueDefaultContext
public <T> T getAndTryToCast(String key, Class<T> valueClass, GlueContext.ContentType type)
getAndTryToCast
in interface GlueContext
getAndTryToCast
in class GlueDefaultContext
public Object put(String key, Object value, GlueContext.ContentType type)
GlueContext
put
in interface GlueContext
put
in class GlueDefaultContext
public void putAll(Map<? extends String,? extends Object> map, GlueContext.ContentType type)
GlueContext
putAll
in interface GlueContext
putAll
in class GlueDefaultContext
public void setMultiPartRequest(GlueMultipartRequest multipartRequest)
setMultiPartRequest
in interface GlueContext
setMultiPartRequest
in class GlueDefaultContext
public GlueMultipartRequest getMultiPartRequest()
getMultiPartRequest
in interface GlueContext
getMultiPartRequest
in class GlueDefaultContext
public String toString()
toString
in class GlueDefaultContext
Copyright © 2013–2021 POSCO ICT. All rights reserved.