Example usage for com.liferay.portal.kernel.service ClassNameServiceUtil fetchClassName

List of usage examples for com.liferay.portal.kernel.service ClassNameServiceUtil fetchClassName

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service ClassNameServiceUtil fetchClassName.

Prototype

public static com.liferay.portal.kernel.model.ClassName fetchClassName(String value) 

Source Link

Usage

From source file:com.liferay.journal.service.test.JournalArticleServiceTest.java

License:Open Source License

@Test
public void testCheckArticleWithValidStructure() throws Exception {
    Group group = GroupTestUtil.addGroup();

    JournalFolder parentFolder = JournalTestUtil.addFolder(group.getGroupId(), RandomTestUtil.randomString());

    JournalArticle article = JournalTestUtil.addArticle(group.getGroupId(), parentFolder.getFolderId(), "title",
            "content");

    ClassName className = ClassNameServiceUtil.fetchClassName(JournalArticle.class.getName());

    DDMStructure ddmStructure = DDMStructureServiceUtil.getStructure(group.getGroupId(),
            className.getClassNameId(), article.getDDMStructureKey());

    checkArticleMatchesStructure(article, ddmStructure);
}