com.liferay.portlet.journal.util
Class JournalUtil
java.lang.Object
com.liferay.portlet.journal.util.JournalUtil
public class JournalUtil
- extends Object
|
Method Summary |
static void |
addAllReservedEls(Element rootElement,
Map<String,String> tokens,
JournalArticle article,
String languageId,
ThemeDisplay themeDisplay)
|
static void |
addPortletBreadcrumbEntries(JournalArticle article,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
|
static void |
addPortletBreadcrumbEntries(JournalFolder folder,
javax.servlet.http.HttpServletRequest request,
LiferayPortletResponse liferayPortletResponse)
|
static void |
addPortletBreadcrumbEntries(JournalFolder folder,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
|
static void |
addPortletBreadcrumbEntries(long folderId,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
|
static void |
addRecentArticle(PortletRequest portletRequest,
JournalArticle article)
|
static void |
addRecentDDMStructure(PortletRequest portletRequest,
DDMStructure ddmStructure)
|
static void |
addRecentDDMTemplate(PortletRequest portletRequest,
DDMTemplate ddmTemplate)
|
static void |
addReservedEl(Element rootElement,
Map<String,String> tokens,
String name,
Date value)
|
static void |
addReservedEl(Element rootElement,
Map<String,String> tokens,
String name,
double value)
|
static void |
addReservedEl(Element rootElement,
Map<String,String> tokens,
String name,
String value)
|
static String |
diffHtml(long groupId,
String articleId,
double sourceVersion,
double targetVersion,
String languageId,
PortletRequestModel portletRequestModel,
ThemeDisplay themeDisplay)
|
static String |
formatVM(String vm)
|
static String |
getAbsolutePath(PortletRequest portletRequest,
long folderId)
|
static Layout |
getArticleLayout(String layoutUuid,
long groupId)
|
static OrderByComparator<JournalArticle> |
getArticleOrderByComparator(String orderByCol,
String orderByType)
|
static List<JournalArticle> |
getArticles(Hits hits)
|
static DiffVersionsInfo |
getDiffVersionsInfo(long groupId,
String articleId,
double sourceVersion,
double targetVersion)
|
static String |
getDisplayStyle(LiferayPortletRequest liferayPortletRequest,
String[] displayViews)
|
static Map<Locale,String> |
getEmailArticleAddedBodyMap(PortletPreferences preferences)
|
static boolean |
getEmailArticleAddedEnabled(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleAddedSubjectMap(PortletPreferences preferences)
|
static boolean |
getEmailArticleAnyEventEnabled(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleApprovalDeniedBodyMap(PortletPreferences preferences)
|
static boolean |
getEmailArticleApprovalDeniedEnabled(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleApprovalDeniedSubjectMap(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleApprovalGrantedBodyMap(PortletPreferences preferences)
|
static boolean |
getEmailArticleApprovalGrantedEnabled(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleApprovalGrantedSubjectMap(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleApprovalRequestedBodyMap(PortletPreferences preferences)
|
static boolean |
getEmailArticleApprovalRequestedEnabled(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleApprovalRequestedSubjectMap(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleReviewBodyMap(PortletPreferences preferences)
|
static boolean |
getEmailArticleReviewEnabled(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleReviewSubjectMap(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleUpdatedBodyMap(PortletPreferences preferences)
|
static boolean |
getEmailArticleUpdatedEnabled(PortletPreferences preferences)
|
static Map<Locale,String> |
getEmailArticleUpdatedSubjectMap(PortletPreferences preferences)
|
static Map<String,String> |
getEmailDefinitionTerms(PortletRequest portletRequest,
String emailFromAddress,
String emailFromName)
|
static String |
getEmailFromAddress(PortletPreferences preferences,
long companyId)
|
static String |
getEmailFromName(PortletPreferences preferences,
long companyId)
|
static String |
getJournalControlPanelLink(PortletRequest portletRequest,
long folderId)
|
static long |
getPreviewPlid(JournalArticle article,
ThemeDisplay themeDisplay)
|
static Stack<JournalArticle> |
getRecentArticles(PortletRequest portletRequest)
|
static Stack<DDMStructure> |
getRecentDDMStructures(PortletRequest portletRequest)
|
static Stack<DDMTemplate> |
getRecentDDMTemplates(PortletRequest portletRequest)
|
static int |
getRestrictionType(long folderId)
|
static String |
getTemplateScript(DDMTemplate ddmTemplate,
Map<String,String> tokens,
String languageId,
boolean transform)
|
static String |
getTemplateScript(long groupId,
String ddmTemplateKey,
Map<String,String> tokens,
String languageId)
|
static String |
getTemplateScript(long groupId,
String ddmTemplateKey,
Map<String,String> tokens,
String languageId,
boolean transform)
|
static Map<String,String> |
getTokens(long articleGroupId,
PortletRequestModel portletRequestModel,
ThemeDisplay themeDisplay)
|
static Map<String,String> |
getTokens(long articleGroupId,
ThemeDisplay themeDisplay)
|
static String |
getUrlTitle(long id,
String title)
|
static boolean |
isSubscribedToFolder(long companyId,
long groupId,
long userId,
long folderId)
|
static boolean |
isSubscribedToFolder(long companyId,
long groupId,
long userId,
long folderId,
boolean recursive)
|
static boolean |
isSubscribedToStructure(long companyId,
long groupId,
long userId,
long ddmStructureId)
|
static String |
mergeArticleContent(String curContent,
String newContent,
boolean removeNullElements)
|
static String |
prepareLocalizedContentForImport(String content,
Locale defaultImportLocale)
|
static String |
removeArticleLocale(Document document,
String content,
String languageId)
|
static void |
removeArticleLocale(Element element,
String languageId)
|
static String |
removeOldContent(String content,
String xsd)
|
static void |
removeRecentArticle(PortletRequest portletRequest,
String articleId)
|
static void |
removeRecentArticle(PortletRequest portletRequest,
String articleId,
double version)
|
static void |
removeRecentDDMStructure(PortletRequest portletRequest,
String ddmStructureKey)
|
static void |
removeRecentDDMTemplate(PortletRequest portletRequest,
String ddmTemplateKey)
|
static String |
transform(ThemeDisplay themeDisplay,
Map<String,String> tokens,
String viewMode,
String languageId,
Document document,
PortletRequestModel portletRequestModel,
String script,
String langType)
|
static String |
transform(ThemeDisplay themeDisplay,
Map<String,String> tokens,
String viewMode,
String languageId,
Document document,
PortletRequestModel portletRequestModel,
String script,
String langType,
boolean propagateException)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_STACK_SIZE
public static final int MAX_STACK_SIZE
- See Also:
- Constant Field Values
SELECTED_FIELD_NAMES
public static final String[] SELECTED_FIELD_NAMES
JournalUtil
public JournalUtil()
addAllReservedEls
public static void addAllReservedEls(Element rootElement,
Map<String,String> tokens,
JournalArticle article,
String languageId,
ThemeDisplay themeDisplay)
addPortletBreadcrumbEntries
public static void addPortletBreadcrumbEntries(JournalArticle article,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
throws Exception
- Throws:
Exception
addPortletBreadcrumbEntries
public static void addPortletBreadcrumbEntries(JournalFolder folder,
javax.servlet.http.HttpServletRequest request,
LiferayPortletResponse liferayPortletResponse)
throws Exception
- Throws:
Exception
addPortletBreadcrumbEntries
public static void addPortletBreadcrumbEntries(JournalFolder folder,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
throws Exception
- Throws:
Exception
addPortletBreadcrumbEntries
public static void addPortletBreadcrumbEntries(long folderId,
javax.servlet.http.HttpServletRequest request,
RenderResponse renderResponse)
throws Exception
- Throws:
Exception
addRecentArticle
public static void addRecentArticle(PortletRequest portletRequest,
JournalArticle article)
addRecentDDMStructure
public static void addRecentDDMStructure(PortletRequest portletRequest,
DDMStructure ddmStructure)
addRecentDDMTemplate
public static void addRecentDDMTemplate(PortletRequest portletRequest,
DDMTemplate ddmTemplate)
addReservedEl
public static void addReservedEl(Element rootElement,
Map<String,String> tokens,
String name,
Date value)
addReservedEl
public static void addReservedEl(Element rootElement,
Map<String,String> tokens,
String name,
double value)
addReservedEl
public static void addReservedEl(Element rootElement,
Map<String,String> tokens,
String name,
String value)
diffHtml
public static String diffHtml(long groupId,
String articleId,
double sourceVersion,
double targetVersion,
String languageId,
PortletRequestModel portletRequestModel,
ThemeDisplay themeDisplay)
throws Exception
- Throws:
Exception
formatVM
public static String formatVM(String vm)
getAbsolutePath
public static String getAbsolutePath(PortletRequest portletRequest,
long folderId)
throws PortalException
- Throws:
PortalException
getArticleLayout
public static Layout getArticleLayout(String layoutUuid,
long groupId)
getArticleOrderByComparator
public static OrderByComparator<JournalArticle> getArticleOrderByComparator(String orderByCol,
String orderByType)
getArticles
public static List<JournalArticle> getArticles(Hits hits)
throws PortalException
- Throws:
PortalException
getDiffVersionsInfo
public static DiffVersionsInfo getDiffVersionsInfo(long groupId,
String articleId,
double sourceVersion,
double targetVersion)
getDisplayStyle
public static String getDisplayStyle(LiferayPortletRequest liferayPortletRequest,
String[] displayViews)
getEmailArticleAddedBodyMap
public static Map<Locale,String> getEmailArticleAddedBodyMap(PortletPreferences preferences)
getEmailArticleAddedEnabled
public static boolean getEmailArticleAddedEnabled(PortletPreferences preferences)
getEmailArticleAddedSubjectMap
public static Map<Locale,String> getEmailArticleAddedSubjectMap(PortletPreferences preferences)
getEmailArticleAnyEventEnabled
public static boolean getEmailArticleAnyEventEnabled(PortletPreferences preferences)
getEmailArticleApprovalDeniedBodyMap
public static Map<Locale,String> getEmailArticleApprovalDeniedBodyMap(PortletPreferences preferences)
getEmailArticleApprovalDeniedEnabled
public static boolean getEmailArticleApprovalDeniedEnabled(PortletPreferences preferences)
getEmailArticleApprovalDeniedSubjectMap
public static Map<Locale,String> getEmailArticleApprovalDeniedSubjectMap(PortletPreferences preferences)
getEmailArticleApprovalGrantedBodyMap
public static Map<Locale,String> getEmailArticleApprovalGrantedBodyMap(PortletPreferences preferences)
getEmailArticleApprovalGrantedEnabled
public static boolean getEmailArticleApprovalGrantedEnabled(PortletPreferences preferences)
getEmailArticleApprovalGrantedSubjectMap
public static Map<Locale,String> getEmailArticleApprovalGrantedSubjectMap(PortletPreferences preferences)
getEmailArticleApprovalRequestedBodyMap
public static Map<Locale,String> getEmailArticleApprovalRequestedBodyMap(PortletPreferences preferences)
getEmailArticleApprovalRequestedEnabled
public static boolean getEmailArticleApprovalRequestedEnabled(PortletPreferences preferences)
getEmailArticleApprovalRequestedSubjectMap
public static Map<Locale,String> getEmailArticleApprovalRequestedSubjectMap(PortletPreferences preferences)
getEmailArticleReviewBodyMap
public static Map<Locale,String> getEmailArticleReviewBodyMap(PortletPreferences preferences)
getEmailArticleReviewEnabled
public static boolean getEmailArticleReviewEnabled(PortletPreferences preferences)
getEmailArticleReviewSubjectMap
public static Map<Locale,String> getEmailArticleReviewSubjectMap(PortletPreferences preferences)
getEmailArticleUpdatedBodyMap
public static Map<Locale,String> getEmailArticleUpdatedBodyMap(PortletPreferences preferences)
getEmailArticleUpdatedEnabled
public static boolean getEmailArticleUpdatedEnabled(PortletPreferences preferences)
getEmailArticleUpdatedSubjectMap
public static Map<Locale,String> getEmailArticleUpdatedSubjectMap(PortletPreferences preferences)
getEmailDefinitionTerms
public static Map<String,String> getEmailDefinitionTerms(PortletRequest portletRequest,
String emailFromAddress,
String emailFromName)
getEmailFromAddress
public static String getEmailFromAddress(PortletPreferences preferences,
long companyId)
getEmailFromName
public static String getEmailFromName(PortletPreferences preferences,
long companyId)
getJournalControlPanelLink
public static String getJournalControlPanelLink(PortletRequest portletRequest,
long folderId)
throws PortalException
- Throws:
PortalException
getPreviewPlid
public static long getPreviewPlid(JournalArticle article,
ThemeDisplay themeDisplay)
throws Exception
- Throws:
Exception
getRecentArticles
public static Stack<JournalArticle> getRecentArticles(PortletRequest portletRequest)
getRecentDDMStructures
public static Stack<DDMStructure> getRecentDDMStructures(PortletRequest portletRequest)
getRecentDDMTemplates
public static Stack<DDMTemplate> getRecentDDMTemplates(PortletRequest portletRequest)
getRestrictionType
public static int getRestrictionType(long folderId)
getTemplateScript
public static String getTemplateScript(DDMTemplate ddmTemplate,
Map<String,String> tokens,
String languageId,
boolean transform)
getTemplateScript
public static String getTemplateScript(long groupId,
String ddmTemplateKey,
Map<String,String> tokens,
String languageId)
throws PortalException
- Throws:
PortalException
getTemplateScript
public static String getTemplateScript(long groupId,
String ddmTemplateKey,
Map<String,String> tokens,
String languageId,
boolean transform)
throws PortalException
- Throws:
PortalException
getTokens
public static Map<String,String> getTokens(long articleGroupId,
PortletRequestModel portletRequestModel,
ThemeDisplay themeDisplay)
throws PortalException
- Throws:
PortalException
getTokens
public static Map<String,String> getTokens(long articleGroupId,
ThemeDisplay themeDisplay)
throws PortalException
- Throws:
PortalException
getUrlTitle
public static String getUrlTitle(long id,
String title)
isSubscribedToFolder
public static boolean isSubscribedToFolder(long companyId,
long groupId,
long userId,
long folderId)
throws PortalException
- Throws:
PortalException
isSubscribedToFolder
public static boolean isSubscribedToFolder(long companyId,
long groupId,
long userId,
long folderId,
boolean recursive)
throws PortalException
- Throws:
PortalException
isSubscribedToStructure
public static boolean isSubscribedToStructure(long companyId,
long groupId,
long userId,
long ddmStructureId)
mergeArticleContent
public static String mergeArticleContent(String curContent,
String newContent,
boolean removeNullElements)
prepareLocalizedContentForImport
public static String prepareLocalizedContentForImport(String content,
Locale defaultImportLocale)
throws LocaleException
- Throws:
LocaleException
removeArticleLocale
public static String removeArticleLocale(Document document,
String content,
String languageId)
removeArticleLocale
public static void removeArticleLocale(Element element,
String languageId)
throws PortalException
- Throws:
PortalException
removeOldContent
public static String removeOldContent(String content,
String xsd)
removeRecentArticle
public static void removeRecentArticle(PortletRequest portletRequest,
String articleId)
removeRecentArticle
public static void removeRecentArticle(PortletRequest portletRequest,
String articleId,
double version)
removeRecentDDMStructure
public static void removeRecentDDMStructure(PortletRequest portletRequest,
String ddmStructureKey)
removeRecentDDMTemplate
public static void removeRecentDDMTemplate(PortletRequest portletRequest,
String ddmTemplateKey)
transform
public static String transform(ThemeDisplay themeDisplay,
Map<String,String> tokens,
String viewMode,
String languageId,
Document document,
PortletRequestModel portletRequestModel,
String script,
String langType)
throws Exception
- Throws:
Exception
transform
public static String transform(ThemeDisplay themeDisplay,
Map<String,String> tokens,
String viewMode,
String languageId,
Document document,
PortletRequestModel portletRequestModel,
String script,
String langType,
boolean propagateException)
throws Exception
- Throws:
Exception