/**
* Constructor
*
* @param actionRequest
* @throws PortalException
*/
public JournalContext(ActionRequest actionRequest) throws PortalException {
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
// Fetch data
numberOfArticles = ParamUtil.getLong(actionRequest, "numberOfArticles", 1);
baseTitle = ParamUtil.getString(actionRequest, "baseTitle", "");
baseArticle = ParamUtil.getString(actionRequest, "baseArticle", "");
folderId = ParamUtil.getLong(actionRequest, "folderId", 0);
totalParagraphs = ParamUtil.getInteger(actionRequest, "totalParagraphs", 0);
titleWords = ParamUtil.getInteger(actionRequest, "titleWords", 0);
randomAmount = ParamUtil.getInteger(actionRequest, "randomAmount", 0);
createContentsType = ParamUtil.getLong(actionRequest, "createContentsType", 0);
linkLists = ParamUtil.getString(actionRequest, "linkLists", "");
ddmStructureId = ParamUtil.getLong(actionRequest, "ddmStructureId", 0);
ddmTemplateId = ParamUtil.getLong(actionRequest, "ddmTemplateId", 0);
// Locales
String[] defLang = { LocaleUtil.getDefault().toString() };
locales = ParamUtil.getStringValues(actionRequest, "locales", defLang);
// Sites
String[] groupsStrIds = ParamUtil.getStringValues(actionRequest, "groupIds",
new String[] { String.valueOf(themeDisplay.getScopeGroupId()) });
groupIds = CommonUtil.convertStringToLongArray(groupsStrIds);
// Fetch default locale
defaultLocale = LocaleUtil.fromLanguageId(themeDisplay.getUser().getLanguageId());
descriptionMap = new ConcurrentHashMap<Locale, String>();
descriptionMap.put(defaultLocale, StringPool.BLANK);
}
JournalContext.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:liferay-dummy-factory
作者:
评论列表
文章目录