@Override protected StagedModel getStagedModel(String uuid, Group group) { try { return AssetCategoryLocalServiceUtil.getAssetCategoryByUuidAndGroupId( uuid, group.getGroupId()); } catch (Exception e) { return null; } }
@Override protected void validateImport( Map<String, List<StagedModel>> dependentStagedModelsMap, Group group) throws Exception { List<StagedModel> categoryDependentStagedModels = dependentStagedModelsMap.get(AssetCategory.class.getSimpleName()); Assert.assertEquals(1, categoryDependentStagedModels.size()); AssetCategory category = (AssetCategory) categoryDependentStagedModels.get(0); AssetCategoryLocalServiceUtil.getAssetCategoryByUuidAndGroupId( category.getUuid(), group.getGroupId()); List<StagedModel> vocabularyDependentStagedModels = dependentStagedModelsMap.get(AssetVocabulary.class.getSimpleName()); Assert.assertEquals(1, vocabularyDependentStagedModels.size()); AssetVocabulary vocabulary = (AssetVocabulary) vocabularyDependentStagedModels.get(0); AssetVocabularyLocalServiceUtil.getAssetVocabularyByUuidAndGroupId( vocabulary.getUuid(), group.getGroupId()); }