public class CategoryDAO extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
private CategoryProviderExtensionPoint |
_categoryProviderEP
CategoryProvider
|
protected AmetysObjectResolver |
_resolver
Ametys object resolver
|
static String |
ROLE
The Avalon role
|
Constructor and Description |
---|
CategoryDAO() |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
applyTemplates(List<String> categoryIds,
String template)
Applies a template to a given newsletter category.
|
Map<String,String> |
createCategory(String parentId,
String title,
String description,
String siteName,
String lang)
Creates a newsletter category.
|
Map<String,String> |
deleteCategory(String id)
Deletes a newsletter category.
|
Map<String,String> |
editCategory(String id,
String title,
String description)
Edits a newsletter category.
|
List<Map<String,Object>> |
getCategories(List<String> categoryIds)
Gets the properties of given categories.
|
Map<String,Object> |
getCategory(String categoryId)
Gets the properties of given categories.
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected AmetysObjectResolver _resolver
private CategoryProviderExtensionPoint _categoryProviderEP
public CategoryDAO()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Map<String,String> createCategory(String parentId, String title, String description, String siteName, String lang)
parentId
- The id of the parent of the future categorytitle
- The titledescription
- The descriptionsiteName
- The site namelang
- The languagepublic Map<String,String> editCategory(String id, String title, String description)
id
- The id of the category to edittitle
- The titledescription
- The descriptionpublic Map<String,String> deleteCategory(String id)
id
- The id of the category to deletepublic List<Map<String,Object>> getCategories(List<String> categoryIds)
categoryIds
- The ids of categoriespublic Map<String,Object> getCategory(String categoryId)
categoryId
- The id of the category to look for