mitreid-connect
静的公開変数類 | 限定公開メンバ関数 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.mitre.openid.connect.view.JsonEntityView クラス
org.mitre.openid.connect.view.JsonEntityView の継承関係図
Inheritance graph
org.mitre.openid.connect.view.JsonEntityView 連携図
Collaboration graph

静的公開変数類

static final String ENTITY = "entity"
 
static final String VIEWNAME = "jsonEntityView"
 

限定公開メンバ関数

void renderMergedOutputModel (Map< String, Object > model, HttpServletRequest request, HttpServletResponse response)
 

非公開変数類

Gson gson
 

静的非公開変数類

static final Logger logger = LoggerFactory.getLogger(JsonEntityView.class)
 

詳解

著者
jricher

関数詳解

◆ renderMergedOutputModel()

void org.mitre.openid.connect.view.JsonEntityView.renderMergedOutputModel ( Map< String, Object >  model,
HttpServletRequest  request,
HttpServletResponse  response 
)
inlineprotected
83  {
84 
85  response.setContentType(MediaType.APPLICATION_JSON_VALUE);
86  response.setCharacterEncoding("UTF-8");
87 
88 
89  HttpStatus code = (HttpStatus) model.get(HttpCodeView.CODE);
90  if (code == null) {
91  code = HttpStatus.OK; // default to 200
92  }
93 
94  response.setStatus(code.value());
95 
96  try {
97 
98  Writer out = response.getWriter();
99  Object obj = model.get(ENTITY);
100  gson.toJson(obj, out);
101 
102  } catch (IOException e) {
103 
104  logger.error("IOException in JsonEntityView.java: ", e);
105 
106  }
107  }
static final String ENTITY
Definition: JsonEntityView.java:50
Gson gson
Definition: JsonEntityView.java:59
static final Logger logger
Definition: JsonEntityView.java:55

メンバ詳解

◆ ENTITY

final String org.mitre.openid.connect.view.JsonEntityView.ENTITY = "entity"
static

◆ gson

Gson org.mitre.openid.connect.view.JsonEntityView.gson
private
初期値:
= new GsonBuilder()
.setExclusionStrategies(new ExclusionStrategy() {
@Override
public boolean shouldSkipField(FieldAttributes f) {
return false;
}
@Override
public boolean shouldSkipClass(Class<?> clazz) {
if (clazz.equals(BeanPropertyBindingResult.class)) {
return true;
}
return false;
}
})
.serializeNulls()
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssZ")
.create()

◆ logger

final Logger org.mitre.openid.connect.view.JsonEntityView.logger = LoggerFactory.getLogger(JsonEntityView.class)
staticprivate

Logger for this class

◆ VIEWNAME

final String org.mitre.openid.connect.view.JsonEntityView.VIEWNAME = "jsonEntityView"
static

このクラス詳解は次のファイルから抽出されました: