throws PortalException { long siteGroupId = PortalUtil.getSiteGroupId(repositoryId);
protected static long[] getSiteGroupIds(long[] groupIds) { Set<Long> siteGroupIds = new LinkedHashSet<>(); for (long groupId : groupIds) { siteGroupIds.add(PortalUtil.getSiteGroupId(groupId)); } return ArrayUtil.toLongArray(siteGroupIds); }
public AssetEntryQuery( long[] classNameIds, SearchContainer<?> searchContainer) { this(); setClassNameIds(classNameIds); _start = searchContainer.getStart(); _end = searchContainer.getEnd(); if (Validator.isNotNull(searchContainer.getOrderByCol())) { setOrderByCol1(searchContainer.getOrderByCol()); setOrderByType1(searchContainer.getOrderByType()); } PortletRequest portletRequest = searchContainer.getPortletRequest(); ThemeDisplay themeDisplay = (ThemeDisplay)portletRequest.getAttribute( WebKeys.THEME_DISPLAY); _groupIds = new long[] {themeDisplay.getScopeGroupId()}; long categoryId = ParamUtil.getLong(portletRequest, "categoryId"); if (categoryId > 0) { _allCategoryIds = new long[] {categoryId}; } String tagName = ParamUtil.getString(portletRequest, "tag"); if (Validator.isNotNull(tagName)) { _allTagIds = AssetTagLocalServiceUtil.getTagIds( PortalUtil.getSiteGroupId(themeDisplay.getScopeGroupId()), new String[] {tagName}); if (_allTagIds.length == 0) { _allTagIds = new long[] {0}; } _allTagIdsArray = new long[][] {_allTagIds}; } }
@Override public DDMTemplate getDDMTemplate() { return DDMTemplateLocalServiceUtil.fetchTemplate( PortalUtil.getSiteGroupId(getGroupId()), ClassNameLocalServiceUtil.getClassNameId(JournalArticle.class), getDDMTemplateKey(), true); }
@Override public DDMStructure getDDMStructure() { return DDMStructureLocalServiceUtil.fetchStructure( PortalUtil.getSiteGroupId(getGroupId()), ClassNameLocalServiceUtil.getClassNameId(JournalArticle.class), getDDMStructureKey(), true); }
protected long getClassTypeId(JournalArticle article) throws PortalException { long classNameId = classNameLocalService.getClassNameId( JournalArticle.class); DDMStructure ddmStructure = ddmStructureLocalService.fetchStructure( PortalUtil.getSiteGroupId(article.getGroupId()), classNameId, article.getDDMStructureKey(), true); return ddmStructure.getStructureId(); }
PortalUtil.getSiteGroupId(article.getGroupId()), classNameLocalService.getClassNameId(DDMStructure.class), ddmTemplateKey, true); if (!defaultDDMTemplateKey.equals(ddmTemplateKey)) { ddmTemplate = ddmTemplateLocalService.getTemplate( PortalUtil.getSiteGroupId(article.getGroupId()), 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()); } }
PortalUtil.getSiteGroupId(article.getGroupId()), classNameLocalService.getClassNameId(JournalArticle.class), article.getDDMStructureKey(), true);