@Override protected BaseModel<?> addSearchableAssetEntry( String fieldValue, BaseModel<?> parentBaseModel, DDMStructure ddmStructure, DDMTemplate ddmTemplate, ServiceContext serviceContext) throws Exception { String content = DDMStructureTestUtil.getSampleStructuredContent(fieldValue); return addArticleWithXmlContent( parentBaseModel, content, ddmStructure, ddmTemplate, 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); }
@Override protected BaseModel<?> addSearchableAssetEntryRepeatable( String[] fieldValues, BaseModel<?> parentBaseModel, DDMStructure ddmStructure, DDMTemplate ddmTemplate, ServiceContext serviceContext) throws Exception { ArrayList<Map<Locale, String>> contents = new ArrayList<>(fieldValues.length); for (String fieldValue : fieldValues) { Map<Locale, String> map = new HashMap<>(); map.put(Locale.US, fieldValue); contents.add(map); } String content = DDMStructureTestUtil.getSampleStructuredContent("name", contents, "en_US"); return addArticleWithXmlContent( parentBaseModel, content, ddmStructure, ddmTemplate, serviceContext); }