/** * Returns the template with the primary key. * * @param templateId the primary key of the template * @return the template with the primary key * @throws PortalException if a portal exception occurred */ @Override public com.liferay.dynamic.data.mapping.model.DDMTemplate getTemplate( long templateId) throws com.liferay.portal.kernel.exception.PortalException { return _ddmTemplateLocalService.getTemplate(templateId); }
/** * Returns the template matching the group and template key. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the template's related model * @param templateKey the unique string identifying the template * @return the matching template * @throws PortalException if a portal exception occurred */ @Override public com.liferay.dynamic.data.mapping.model.DDMTemplate getTemplate( long groupId, long classNameId, String templateKey) throws com.liferay.portal.kernel.exception.PortalException { return _ddmTemplateLocalService.getTemplate(groupId, classNameId, templateKey); }
/** * Returns the template matching the group and template key, optionally * searching ancestor sites (that have sharing enabled) and global scoped * sites. * * <p> * This method first searches in the group. If the template is still not * found and <code>includeAncestorTemplates</code> is set to * <code>true</code>, this method searches the group's ancestor sites (that * have sharing enabled) and lastly searches global scoped sites. * </p> * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the template's related model * @param templateKey the unique string identifying the template * @param includeAncestorTemplates whether to include ancestor sites (that have sharing enabled) and include global scoped sites in the search in the search * @return the matching template * @throws PortalException if a portal exception occurred */ @Override public com.liferay.dynamic.data.mapping.model.DDMTemplate getTemplate( long groupId, long classNameId, String templateKey, boolean includeAncestorTemplates) throws com.liferay.portal.kernel.exception.PortalException { return _ddmTemplateLocalService.getTemplate(groupId, classNameId, templateKey, includeAncestorTemplates); }
@Override public DDMTemplate getTemplate(long templateId) throws PortalException { com.liferay.dynamic.data.mapping.model.DDMTemplate ddmTemplate = _ddmTemplateLocalService.getTemplate(templateId); return new DDMTemplateImpl(ddmTemplate); }
/** * Returns the template with the primary key. * * @param templateId the primary key of the template * @return the template with the primary key * @throws PortalException if a portal exception occurred */ public static com.liferay.dynamic.data.mapping.model.DDMTemplate getTemplate( long templateId) throws com.liferay.portal.kernel.exception.PortalException { return getService().getTemplate(templateId); }
/** * Returns the template matching the group and template key. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the template's related model * @param templateKey the unique string identifying the template * @return the matching template * @throws PortalException if a portal exception occurred */ public static com.liferay.dynamic.data.mapping.model.DDMTemplate getTemplate( long groupId, long classNameId, String templateKey) throws com.liferay.portal.kernel.exception.PortalException { return getService().getTemplate(groupId, classNameId, templateKey); }
/** * Returns the template matching the group and template key, optionally * searching ancestor sites (that have sharing enabled) and global scoped * sites. * * <p> * This method first searches in the group. If the template is still not * found and <code>includeAncestorTemplates</code> is set to * <code>true</code>, this method searches the group's ancestor sites (that * have sharing enabled) and lastly searches global scoped sites. * </p> * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the template's related model * @param templateKey the unique string identifying the template * @param includeAncestorTemplates whether to include ancestor sites (that have sharing enabled) and include global scoped sites in the search in the search * @return the matching template * @throws PortalException if a portal exception occurred */ public static com.liferay.dynamic.data.mapping.model.DDMTemplate getTemplate( long groupId, long classNameId, String templateKey, boolean includeAncestorTemplates) throws com.liferay.portal.kernel.exception.PortalException { return getService() .getTemplate(groupId, classNameId, templateKey, includeAncestorTemplates); }
/** * Returns the template matching the group and template key. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's * related model * @param templateKey the unique string identifying the template * @return the matching template */ @Override public DDMTemplate getTemplate( long groupId, long classNameId, String templateKey) throws PortalException { DDMTemplate ddmTemplate = ddmTemplateLocalService.getTemplate( groupId, classNameId, templateKey); _ddmTemplateModelResourcePermission.check( getPermissionChecker(), ddmTemplate, ActionKeys.VIEW); return ddmTemplate; }
throws PortalException { DDMTemplate ddmTemplate = ddmTemplateLocalService.getTemplate( groupId, classNameId, templateKey, includeAncestorTemplates);
@Override public String getTemplateScript( long groupId, String ddmTemplateKey, Map<String, String> tokens, String languageId) throws PortalException { DDMTemplate ddmTemplate = _ddmTemplateLocalService.getTemplate( groupId, _portal.getClassNameId(DDMStructure.class), ddmTemplateKey, true); String script = ddmTemplate.getScript(); for (TransformerListener transformerListener : JournalTransformerListenerRegistryUtil. getTransformerListeners()) { script = transformerListener.onScript( script, null, languageId, tokens); } return script; }
ddmTemplate = ddmTemplateLocalService.getTemplate( PortalUtil.getSiteGroupId(article.getGroupId()), classNameLocalService.getClassNameId(DDMStructure.class), ddmTemplate = ddmTemplateLocalService.getTemplate( PortalUtil.getSiteGroupId(article.getGroupId()), classNameLocalService.getClassNameId(
DDMTemplate ddmTemplate = _ddmTemplateLocalService.getTemplate( _portal.getSiteGroupId(groupId), _classNameLocalService.getClassNameId(DDMStructure.class),
protected void updateDDMLinks( long id, long groupId, String ddmStructureKey, String ddmTemplateKey, boolean incrementVersion) throws PortalException { DDMStructure ddmStructure = ddmStructureLocalService.getStructure( PortalUtil.getSiteGroupId(groupId), classNameLocalService.getClassNameId(JournalArticle.class), ddmStructureKey, true); DDMTemplate ddmTemplate = ddmTemplateLocalService.getTemplate( PortalUtil.getSiteGroupId(groupId), classNameLocalService.getClassNameId(DDMStructure.class), ddmTemplateKey, true); if (incrementVersion) { ddmStorageLinkLocalService.addStorageLink( ddmStructure.getClassNameId(), id, ddmStructure.getStructureId(), new ServiceContext()); ddmTemplateLinkLocalService.addTemplateLink( classNameLocalService.getClassNameId(JournalArticle.class), id, ddmTemplate.getTemplateId()); } else { DDMStorageLink ddmStorageLink = ddmStorageLinkLocalService.getClassStorageLink(id); ddmStorageLink.setStructureId(ddmStructure.getStructureId()); ddmStorageLinkLocalService.updateDDMStorageLink(ddmStorageLink); ddmTemplateLinkLocalService.updateTemplateLink( classNameLocalService.getClassNameId(JournalArticle.class), id, ddmTemplate.getTemplateId()); } }
DDMStructure.class)) { DDMTemplate ddmTemplate = _ddmTemplateLocalService.getTemplate( article.getGroupId(), _portal.getClassNameId(DDMStructure.class),