com.liferay.portlet.journal.util.test
Class JournalTestUtil
java.lang.Object
com.liferay.portlet.journal.util.test.JournalTestUtil
public class JournalTestUtil
- extends Object
|
Method Summary |
static JournalArticle |
addArticle(long groupId,
long folderId)
|
static JournalArticle |
addArticle(long groupId,
long folderId,
long classNameId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
Locale defaultLocale,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
|
static JournalArticle |
addArticle(long groupId,
long folderId,
long classNameId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
Locale defaultLocale,
Date expirationDate,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
|
static JournalArticle |
addArticle(long groupId,
long folderId,
long classNameId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
String layoutUuid,
Locale defaultLocale,
Date expirationDate,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
|
static JournalArticle |
addArticle(long groupId,
long folderId,
long classNameId,
String title,
String description,
String content,
Locale defaultLocale,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
|
static JournalArticle |
addArticle(long groupId,
long folderId,
long classNameId,
String title,
String description,
String content,
Locale defaultLocale,
Date expirationDate,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
|
static JournalArticle |
addArticle(long groupId,
long folderId,
String title,
String content)
|
static JournalArticle |
addArticle(long groupId,
long folderId,
String title,
String content,
Locale defaultLocale,
boolean workflowEnabled,
boolean approved)
|
static JournalArticle |
addArticle(long groupId,
long folderId,
String title,
String description,
String content,
Locale defaultLocale,
boolean workflowEnabled,
boolean approved)
|
static JournalArticle |
addArticle(long groupId,
String title,
String content)
|
static JournalArticle |
addArticle(long groupId,
String title,
String content,
Date expirationDate,
ServiceContext serviceContext)
|
static JournalArticle |
addArticle(long groupId,
String title,
String content,
Locale defaultLocale)
|
static JournalArticle |
addArticle(long groupId,
String title,
String content,
ServiceContext serviceContext)
|
static JournalArticle |
addArticleWithWorkflow(long groupId,
boolean approved)
|
static JournalArticle |
addArticleWithWorkflow(long groupId,
long folderId,
boolean approved)
|
static JournalArticle |
addArticleWithWorkflow(long groupId,
long folderId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
boolean workflowEnabled,
boolean approved)
|
static JournalArticle |
addArticleWithWorkflow(long groupId,
long folderId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
|
static JournalArticle |
addArticleWithWorkflow(long groupId,
long folderId,
String title,
String content,
boolean approved)
|
static JournalArticle |
addArticleWithWorkflow(long groupId,
long folderId,
String title,
String content,
boolean approved,
ServiceContext serviceContext)
|
static JournalArticle |
addArticleWithWorkflow(long groupId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
boolean approved)
|
static JournalArticle |
addArticleWithXMLContent(long groupId,
long folderId,
long classNameId,
String xml,
String ddmStructureKey,
String ddmTemplateKey)
|
static JournalArticle |
addArticleWithXMLContent(long groupId,
long folderId,
long classNameId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
Locale defaultLocale)
|
static JournalArticle |
addArticleWithXMLContent(long folderId,
long classNameId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
Locale defaultLocale,
Map<String,byte[]> images,
ServiceContext serviceContext)
|
static JournalArticle |
addArticleWithXMLContent(long folderId,
long classNameId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
Locale defaultLocale,
ServiceContext serviceContext)
|
static JournalArticle |
addArticleWithXMLContent(long groupId,
String xml,
String ddmStructureKey,
String ddmTemplateKey)
|
static JournalArticle |
addArticleWithXMLContent(long parentFolderId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
Map<String,byte[]> images,
ServiceContext serviceContext)
|
static JournalArticle |
addArticleWithXMLContent(long parentFolderId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
ServiceContext serviceContext)
|
static JournalArticle |
addArticleWithXMLContent(String xml,
String ddmStructureKey,
String ddmTemplateKey)
|
static JournalArticle |
addArticleWithXMLContent(String xml,
String ddmStructureKey,
String ddmTemplateKey,
Locale defaultLocale)
|
static JournalArticle |
addArticleWithXMLContent(String xml,
String ddmStructureKey,
String ddmTemplateKey,
ServiceContext serviceContext)
|
static Element |
addDynamicElementElement(Element element,
String type,
String name)
|
static JournalFeed |
addFeed(long groupId,
long plid,
String name,
String ddmStructureKey,
String ddmTemplateKey,
String rendererTemplateKey)
|
static JournalFolder |
addFolder(long groupId,
long parentFolderId,
String name)
|
static JournalFolder |
addFolder(long groupId,
String name)
|
static JournalFolder |
addFolder(long parentFolderId,
String name,
ServiceContext serviceContext)
|
static Element |
addMetadataElement(Element element,
String locale,
String label)
|
static void |
expireArticle(long groupId,
JournalArticle article)
|
static JournalArticle |
expireArticle(long groupId,
JournalArticle article,
double version)
|
static String |
getSampleTemplateXSL()
|
static int |
getSearchArticlesCount(long companyId,
long groupId)
|
static Map<String,Map<String,String>> |
getXsdMap(String xsd)
|
static JournalArticle |
updateArticle(JournalArticle article)
|
static JournalArticle |
updateArticle(JournalArticle article,
String title)
|
static JournalArticle |
updateArticle(JournalArticle article,
String title,
String content)
|
static JournalArticle |
updateArticle(JournalArticle article,
String title,
String content,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
|
static JournalArticle |
updateArticleWithWorkflow(JournalArticle article,
boolean approved)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JournalTestUtil
public JournalTestUtil()
addArticle
public static JournalArticle addArticle(long groupId,
long folderId)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
long folderId,
long classNameId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
Locale defaultLocale,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
long folderId,
long classNameId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
Locale defaultLocale,
Date expirationDate,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
long folderId,
long classNameId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
String layoutUuid,
Locale defaultLocale,
Date expirationDate,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
long folderId,
long classNameId,
String title,
String description,
String content,
Locale defaultLocale,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
long folderId,
long classNameId,
String title,
String description,
String content,
Locale defaultLocale,
Date expirationDate,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
long folderId,
String title,
String content)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
long folderId,
String title,
String content,
Locale defaultLocale,
boolean workflowEnabled,
boolean approved)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
long folderId,
String title,
String description,
String content,
Locale defaultLocale,
boolean workflowEnabled,
boolean approved)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
String title,
String content)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
String title,
String content,
Date expirationDate,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
String title,
String content,
Locale defaultLocale)
throws Exception
- Throws:
Exception
addArticle
public static JournalArticle addArticle(long groupId,
String title,
String content,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticleWithWorkflow
public static JournalArticle addArticleWithWorkflow(long groupId,
boolean approved)
throws Exception
- Throws:
Exception
addArticleWithWorkflow
public static JournalArticle addArticleWithWorkflow(long groupId,
long folderId,
boolean approved)
throws Exception
- Throws:
Exception
addArticleWithWorkflow
public static JournalArticle addArticleWithWorkflow(long groupId,
long folderId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
boolean workflowEnabled,
boolean approved)
throws Exception
- Throws:
Exception
addArticleWithWorkflow
public static JournalArticle addArticleWithWorkflow(long groupId,
long folderId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticleWithWorkflow
public static JournalArticle addArticleWithWorkflow(long groupId,
long folderId,
String title,
String content,
boolean approved)
throws Exception
- Throws:
Exception
addArticleWithWorkflow
public static JournalArticle addArticleWithWorkflow(long groupId,
long folderId,
String title,
String content,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticleWithWorkflow
public static JournalArticle addArticleWithWorkflow(long groupId,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
Map<Locale,String> contentMap,
boolean approved)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(long groupId,
long folderId,
long classNameId,
String xml,
String ddmStructureKey,
String ddmTemplateKey)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(long groupId,
long folderId,
long classNameId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
Locale defaultLocale)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(long folderId,
long classNameId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
Locale defaultLocale,
Map<String,byte[]> images,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(long folderId,
long classNameId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
Locale defaultLocale,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(long groupId,
String xml,
String ddmStructureKey,
String ddmTemplateKey)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(long parentFolderId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
Map<String,byte[]> images,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(long parentFolderId,
String xml,
String ddmStructureKey,
String ddmTemplateKey,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(String xml,
String ddmStructureKey,
String ddmTemplateKey)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(String xml,
String ddmStructureKey,
String ddmTemplateKey,
Locale defaultLocale)
throws Exception
- Throws:
Exception
addArticleWithXMLContent
public static JournalArticle addArticleWithXMLContent(String xml,
String ddmStructureKey,
String ddmTemplateKey,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addDynamicElementElement
public static Element addDynamicElementElement(Element element,
String type,
String name)
addFeed
public static JournalFeed addFeed(long groupId,
long plid,
String name,
String ddmStructureKey,
String ddmTemplateKey,
String rendererTemplateKey)
throws Exception
- Throws:
Exception
addFolder
public static JournalFolder addFolder(long groupId,
long parentFolderId,
String name)
throws Exception
- Throws:
Exception
addFolder
public static JournalFolder addFolder(long groupId,
String name)
throws Exception
- Throws:
Exception
addFolder
public static JournalFolder addFolder(long parentFolderId,
String name,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addMetadataElement
public static Element addMetadataElement(Element element,
String locale,
String label)
expireArticle
public static void expireArticle(long groupId,
JournalArticle article)
throws PortalException
- Throws:
PortalException
expireArticle
public static JournalArticle expireArticle(long groupId,
JournalArticle article,
double version)
throws PortalException
- Throws:
PortalException
getSampleTemplateXSL
public static String getSampleTemplateXSL()
getSearchArticlesCount
public static int getSearchArticlesCount(long companyId,
long groupId)
throws Exception
- Throws:
Exception
getXsdMap
public static Map<String,Map<String,String>> getXsdMap(String xsd)
throws Exception
- Throws:
Exception
updateArticle
public static JournalArticle updateArticle(JournalArticle article)
throws Exception
- Throws:
Exception
updateArticle
public static JournalArticle updateArticle(JournalArticle article,
String title)
throws Exception
- Throws:
Exception
updateArticle
public static JournalArticle updateArticle(JournalArticle article,
String title,
String content)
throws Exception
- Throws:
Exception
updateArticle
public static JournalArticle updateArticle(JournalArticle article,
String title,
String content,
boolean workflowEnabled,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
updateArticleWithWorkflow
public static JournalArticle updateArticleWithWorkflow(JournalArticle article,
boolean approved)
throws Exception
- Throws:
Exception