@Override protected void updateDDMStructure(ServiceContext serviceContext) throws Exception { DDMForm ddmForm = DDMStructureTestUtil.getSampleDDMForm("title"); DDMFormLayout ddmFormLayout = DDMUtil.getDefaultDDMFormLayout(ddmForm); DDMStructureLocalServiceUtil.updateStructure( _ddmStructure.getUserId(), _ddmStructure.getStructureId(), _ddmStructure.getParentStructureId(), _ddmStructure.getNameMap(), _ddmStructure.getDescriptionMap(), ddmForm, ddmFormLayout, serviceContext); }
@Override protected BaseModel<?> addBaseModelWithDDMStructure( BaseModel<?> parentBaseModel, String keywords, ServiceContext serviceContext) throws Exception { String content = DDMStructureTestUtil.getSampleStructuredContent(keywords); DDMForm ddmForm = DDMStructureTestUtil.getSampleDDMForm("name"); DDMStructure ddmStructure = DDMStructureTestUtil.addStructure( serviceContext.getScopeGroupId(), JournalArticle.class.getName(), ddmForm); DDMTemplate ddmTemplate = DDMTemplateTestUtil.addTemplate( serviceContext.getScopeGroupId(), ddmStructure.getStructureId(), PortalUtil.getClassNameId(JournalArticle.class)); return addArticleWithXmlContent( parentBaseModel, content, ddmStructure, ddmTemplate, serviceContext); }