com.poscoict.glueframework.context
Class GlueWebContext
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
com.poscoict.glueframework.util.GlueHashMap<String,Object>
com.poscoict.glueframework.context.GlueDefaultContext
com.poscoict.glueframework.context.GlueWebContext
- All Implemented Interfaces:
- GlueContext, GlueAuditAttributeHolder, Serializable, Cloneable, Map<String,Object>
public class GlueWebContext
- extends GlueDefaultContext
ServletÀÇ Data¸¦ °ü¸®Çϱâ À§ÇÑ ³»ºÎ ÀúÀå¼Ò Class ÀÌ´Ù . HttpReqestÀÇ Parameter¿Í Attribute Data, ±×¸®°í HttpSession, Cookie, Header Data¸¦ °®´Â´Ù. DataÀÇ ¼º°Ý¿¡ µû¶ó
WebContentType¿¡ ±× À¯ÇüÀÌ Á¤ÀÇ µÇ¾î ÀÖ´Ù.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
GlueWebContext
public GlueWebContext()
- »ý¼ºÀÚ(constructor).
get
public Object get(Object key)
- 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) ¸¦ »ç¿ëÇÑ´Ù.
- Specified by:
get
in interface GlueContext
- Specified by:
get
in interface Map<String,Object>
- Overrides:
get
in class HashMap<String,Object>
- Parameters:
key
- GlueWebContextÀÇ Key
- Returns:
- data
- See Also:
Map.get(java.lang.Object)
getDataAsMap
public GlueHashMap<String,Object> getDataAsMap(GlueContext.ContentType type)
- Specified by:
getDataAsMap
in interface GlueContext
- Overrides:
getDataAsMap
in class GlueDefaultContext
get
public Object get(String key,
GlueContext.ContentType type)
- Description copied from interface:
GlueContext
- RootMapÀÌ ¾Æ´Ñ ContentType¿¡ ÇØ´ç ÇÏ´Â Map¿¡¼ ÇØ´ç keyÀÇ °ªÀ» ¾ò´Â´Ù.
- Specified by:
get
in interface GlueContext
- Overrides:
get
in class GlueDefaultContext
- Returns:
- Object
getAndTryToCast
public <T> T getAndTryToCast(String key,
Class<T> valueClass,
GlueContext.ContentType type)
- Specified by:
getAndTryToCast
in interface GlueContext
- Overrides:
getAndTryToCast
in class GlueDefaultContext
- Returns:
put
public Object put(String key,
Object value,
GlueContext.ContentType type)
- Description copied from interface:
GlueContext
- È®Àå´ë»ó..
- Specified by:
put
in interface GlueContext
- Overrides:
put
in class GlueDefaultContext
- Returns:
- Object
putAll
public void putAll(Map<? extends String,? extends Object> map,
GlueContext.ContentType type)
- Description copied from interface:
GlueContext
- È®Àå´ë»ó..
- Specified by:
putAll
in interface GlueContext
- Overrides:
putAll
in class GlueDefaultContext
setMultiPartRequest
public void setMultiPartRequest(GlueMultipartRequest multipartRequest)
- Specified by:
setMultiPartRequest
in interface GlueContext
- Overrides:
setMultiPartRequest
in class GlueDefaultContext
getMultiPartRequest
public GlueMultipartRequest getMultiPartRequest()
- Specified by:
getMultiPartRequest
in interface GlueContext
- Overrides:
getMultiPartRequest
in class GlueDefaultContext
getSessionAttr
public Map<String,Object> getSessionAttr()
toString
public String toString()
- Overrides:
toString
in class GlueDefaultContext
Copyright © 2013–2016 POSCO ICT. All rights reserved.