Class CategoryImportService
java.lang.Object
io.meeds.social.category.injection.CategoryImportService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final org.exoplatform.commons.api.settings.data.ContextThe settings context ofCATEGORY_IMPORT_SCOPE.static final org.exoplatform.commons.api.settings.data.ScopeThe settings scope under which the id of each imported category is stored, keyed by its descriptor'snameId: read byCategoryService.getDefaultCategoryId(String).static final StringThe key, underCATEGORY_IMPORT_SCOPE, of the import's version: the one key of that scope that holds no category id. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected io.meeds.social.category.model.CategorycreateCategory(io.meeds.social.category.model.CategoryDescriptor d, long oldId, long parentId) protected longgetSettingValue(String name) protected voidimportCategory(io.meeds.social.category.model.CategoryDescriptor d, long oldId, long parentId) voidprotected voidimportDescriptor(io.meeds.social.category.model.CategoryDescriptor descriptor) voidinit()protected List<io.meeds.social.category.model.CategoryDescriptor> parseDescriptors(URL url) protected voidsaveNames(io.meeds.social.category.model.CategoryDescriptor d, io.meeds.social.category.model.Category category) protected voidsetSettingValue(String name, long value)
-
Field Details
-
ADMINISTRATORS_GROUP
- See Also:
-
CATEGORY_IMPORT_SCOPE
public static final org.exoplatform.commons.api.settings.data.Scope CATEGORY_IMPORT_SCOPEThe settings scope under which the id of each imported category is stored, keyed by its descriptor'snameId: read byCategoryService.getDefaultCategoryId(String). -
CATEGORY_CONTEXT
public static final org.exoplatform.commons.api.settings.data.Context CATEGORY_CONTEXTThe settings context ofCATEGORY_IMPORT_SCOPE. -
CATEGORY_VERSION
The key, underCATEGORY_IMPORT_SCOPE, of the import's version: the one key of that scope that holds no category id.- See Also:
-
-
Constructor Details
-
CategoryImportService
public CategoryImportService()
-
-
Method Details
-
init
@PostConstruct public void init() -
importDefaultCategories
public void importDefaultCategories() -
parseDescriptors
-
importDescriptor
protected void importDescriptor(io.meeds.social.category.model.CategoryDescriptor descriptor) -
importCategory
protected void importCategory(io.meeds.social.category.model.CategoryDescriptor d, long oldId, long parentId) -
saveNames
protected void saveNames(io.meeds.social.category.model.CategoryDescriptor d, io.meeds.social.category.model.Category category) -
createCategory
protected io.meeds.social.category.model.Category createCategory(io.meeds.social.category.model.CategoryDescriptor d, long oldId, long parentId) -
setSettingValue
-
getSettingValue
-