PortletRequestAttributes.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:spring4-understanding 作者:
@Override
public String[] getAttributeNames(int scope) {
    if (scope == SCOPE_REQUEST) {
        if (!isRequestActive()) {
            throw new IllegalStateException(
                    "Cannot ask for request attributes - request is not active anymore!");
        }
        return StringUtils.toStringArray(this.request.getAttributeNames());
    }
    else {
        PortletSession session = getSession(false);
        if (session != null) {
            if (scope == SCOPE_GLOBAL_SESSION) {
                return StringUtils.toStringArray(session.getAttributeNames(PortletSession.APPLICATION_SCOPE));
            }
            else {
                return StringUtils.toStringArray(session.getAttributeNames());
            }
        }
        else {
            return new String[0];
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号