List of usage examples for com.liferay.portal.kernel.util Time YEAR
long YEAR
To view the source code for com.liferay.portal.kernel.util Time YEAR.
Click Source Link
From source file:com.liferay.journal.service.test.JournalArticleExpirationTest.java
License:Open Source License
protected JournalArticle updateArticle(JournalArticle article, int mode) throws Exception { if (mode == _MODE_POSTPONE_EXPIRIRATION) { Calendar displayDateCalendar = new GregorianCalendar(); displayDateCalendar.setTime(article.getDisplayDate()); Calendar expirationDateCalendar = getExpirationCalendar(Time.YEAR, 1); ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(article.getGroupId()); serviceContext.setWorkflowAction(WorkflowConstants.ACTION_PUBLISH); return JournalArticleLocalServiceUtil.updateArticle(TestPropsValues.getUserId(), article.getGroupId(), article.getFolderId(), article.getArticleId(), article.getVersion(), article.getTitleMap(), article.getDescriptionMap(), article.getContent(), article.getDDMStructureKey(), article.getDDMTemplateKey(), article.getLayoutUuid(), displayDateCalendar.get(Calendar.MONTH), displayDateCalendar.get(Calendar.DAY_OF_MONTH), displayDateCalendar.get(Calendar.YEAR), displayDateCalendar.get(Calendar.HOUR_OF_DAY), displayDateCalendar.get(Calendar.MINUTE), expirationDateCalendar.get(Calendar.MONTH), expirationDateCalendar.get(Calendar.DAY_OF_MONTH), expirationDateCalendar.get(Calendar.YEAR), expirationDateCalendar.get(Calendar.HOUR_OF_DAY), expirationDateCalendar.get(Calendar.MINUTE), false, 0, 0, 0, 0, 0, true, article.getIndexable(), article.isSmallImage(), article.getSmallImageURL(), null, null, null, serviceContext); }/* ww w . ja v a2s.c om*/ return article; }