com.poscoict.glueframework.context
Class GluePortletContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by com.poscoict.glueframework.util.GlueHashMap<String,Object>
              extended by com.poscoict.glueframework.context.GlueDefaultContext
                  extended by com.poscoict.glueframework.context.GluePortletContext
All Implemented Interfaces:
GlueContext, GlueAuditAttributeHolder, Serializable, Cloneable, Map<String,Object>

public class GluePortletContext
extends GlueDefaultContext

GlueContext for Portlet. 모든 Layer에서 공통으로 Data 를 저장하고 조회 하는 Class이다.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface com.poscoict.glueframework.context.GlueContext
GlueContext.ContentType, GlueContext.EventType, GlueContext.PortletContentType, GlueContext.WebContentType
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
GluePortletContext()
          생성자(constructor).
 
Method Summary
 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(GlueContext.PortletContentType type)
           
 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()
           
 
Methods inherited from class com.poscoict.glueframework.context.GlueDefaultContext
getAuditAttributes, getEventSourceType, getException, getMessage, getMessages, setAuditAttributes, setException, setMessage, setMessages
 
Methods inherited from class com.poscoict.glueframework.util.GlueHashMap
getAndTryToCast, newGlueHashMap
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.poscoict.glueframework.context.GlueContext
getAndTryToCast, put, putAll, remove
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, size, values
 

Constructor Detail

GluePortletContext

public GluePortletContext()
생성자(constructor).

Method Detail

get

public Object get(Object key)
Key 해당 하는 값을 조회함.
 GluePortletContext 에서 Key 탐색 우선 순위는 다음과 같다.
 1. Root Map
 2. Request Attribute Map
 3. Private Request Parameter Map
 4. Public Request Parameter Map
 
 우선순위를 따르지 않거나, 그 외의 Data를 얻기 위해서는  get(String key, ContentType type) 를 이용한다.
  
 Root Map : ("deptno", "10")
 Request Attribute Map : ("deptno", "30")
 Private Request Parameter Map : ("deptno", "20")
 Public Request Parameter Map : ("deptno", "40")
 과 같이 GlueWebContext가 구성되어 있다면. 
 ctx.get("deptno") 의 값은 10 이 된다.
 Request Attribute Map의 값인 30을 얻기 위해서는 
 ctx.get("deptno", PortletContentType.PORTLET_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(GlueContext.PortletContentType type)
Parameters:
type -
Returns:

toString

public String toString()
Overrides:
toString in class GlueDefaultContext


Copyright © 2013–2016 POSCO ICT. All rights reserved.