Skip to content

Commit b7febe0

Browse files
authored
Merge pull request #3 from raptor22fa/feature/adt-visible
feature/adt-visible changed adt classname
2 parents 9551f57 + 3f35599 commit b7febe0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

db-setup-core/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@
113113
<groupId>com.liferay</groupId>
114114
<artifactId>com.liferay.dynamic.data.mapping.api</artifactId>
115115
</dependency>
116+
<dependency>
117+
<groupId>com.liferay</groupId>
118+
<artifactId>com.liferay.portlet.display.template.api</artifactId>
119+
</dependency>
116120
<dependency>
117121
<groupId>javax.portlet</groupId>
118122
<artifactId>portlet-api</artifactId>

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/core/SetupArticles.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import com.liferay.portal.kernel.service.ServiceContext;
5555
import com.liferay.portal.kernel.util.*;
5656
import com.liferay.portal.kernel.workflow.WorkflowConstants;
57+
import com.liferay.portlet.display.template.PortletDisplayTemplate;
5758
import com.mimacom.liferay.portal.setup.LiferaySetup;
5859
import com.mimacom.liferay.portal.setup.core.util.ResolverUtil;
5960
import com.mimacom.liferay.portal.setup.core.util.ResourcesUtil;
@@ -348,7 +349,7 @@ public static void addDDMTemplate(final Adt template, final long groupId)
348349
LOG.info("Adding ADT " + template.getName());
349350
long classNameId = PortalUtil.getClassNameId(template.getClassName());
350351

351-
long resourceClassnameId = Validator.isBlank(template.getResourceClassName()) ? ClassNameLocalServiceUtil.getClassNameId(JournalArticle.class)
352+
long resourceClassnameId = Validator.isBlank(template.getResourceClassName()) ? ClassNameLocalServiceUtil.getClassNameId(PortletDisplayTemplate.class)
352353
: ClassNameLocalServiceUtil.getClassNameId(template.getResourceClassName());
353354

354355
Map<Locale, String> nameMap = new HashMap<Locale, String>();
@@ -366,7 +367,7 @@ public static void addDDMTemplate(final Adt template, final long groupId)
366367
DDMTemplate ddmTemplate = null;
367368
try {
368369
ddmTemplate = DDMTemplateLocalServiceUtil.fetchTemplate(groupId, classNameId,
369-
template.getTemplateKey());
370+
template.getTemplateKey(), true);
370371
} catch (SystemException e) {
371372
LOG.error("Error while trying to find ADT with key: " + template.getTemplateKey());
372373
}

0 commit comments

Comments
 (0)