Package org.ametys.odf.catalog
Class CatalogDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.catalog.CatalogDAO
- All Implemented Interfaces:
 LogEnabled,Component,Serviceable
- Direct Known Subclasses:
 CatalogDAO
DAO for manipulating catalogs.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CatalogsManagerThe catalog managerprotected CurrentUserProviderThe current user providerprotected I18nUtilsThe I18N utilsprotected AmetysObjectResolverThe ametys object resolverprotected SchedulerThe schedulerstatic final StringThe Avalon role - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptioncreateCatalog(String title, String name, String catalogNameToCopy) Creates a new ODF catalog.editCatalog(String id, String title) Edits an ODF catalog.Gets the properties of a catalog.getCatalogProperties(Catalog catalog) Get the properties of a catalog as a MapgetCatalogsProperties(List<String> ids) Gets the properties of a set of catalogs.removeCatalog(String catalogId, boolean forceDeletion) Removes an ODF catalog.voidservice(ServiceManager manager) Set a catalog as default catalogMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger 
- 
Field Details
- 
ROLE
The Avalon role - 
_catalogsManager
The catalog manager - 
_resolver
The ametys object resolver - 
_currentUserProvider
The current user provider - 
_scheduler
The scheduler - 
_i18nUtils
The I18N utils 
 - 
 - 
Constructor Details
- 
CatalogDAO
public CatalogDAO() 
 - 
 - 
Method Details
- 
service
- Specified by:
 servicein interfaceServiceable- Throws:
 ServiceException
 - 
createCatalog
public Map<String,String> createCatalog(String title, String name, String catalogNameToCopy) throws ProcessingException Creates a new ODF catalog.- Parameters:
 title- The title of the catalogname- The code of the catalogcatalogNameToCopy- The catalog name to copy or null- Returns:
 - The id and the title of the created catalog, or an error
 - Throws:
 ProcessingException- if creation failed
 - 
editCatalog
Edits an ODF catalog.- Parameters:
 id- The id of the catalog to edittitle- The title of the catalog- Returns:
 - The id and the title of the edited catalog, or an error
 
 - 
setDefaultCatalog
Set a catalog as default catalog- Parameters:
 id- The id of catalog- Returns:
 - The id and the title of the edited catalog, or an error
 
 - 
removeCatalog
Removes an ODF catalog.- Parameters:
 catalogId- the catalog's idforceDeletion- if true, will not check if the catalog is referenced byProgramItems before deleting the catalog- Returns:
 - The id of the deleted catalog, or an error
 
 - 
getCatalogProperties
Gets the properties of a catalog.- Parameters:
 id- The catalog id- Returns:
 - The properties of the catalog in a map
 
 - 
getCatalogsProperties
Gets the properties of a set of catalogs.- Parameters:
 ids- The catalogs' id- Returns:
 - The properties of the catalogs
 
 - 
getCatalogProperties
Get the properties of a catalog as a Map- Parameters:
 catalog- The catalog- Returns:
 - The properties into a map object
 
 
 -