Class CategoryProviderExtensionPoint
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<CategoryProvider>
org.ametys.plugins.newsletter.category.CategoryProviderExtensionPoint
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<CategoryProvider>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class CategoryProviderExtensionPoint
extends AbstractThreadSafeComponentExtensionPoint<CategoryProvider>
This class is in charge to load and initialize newsletter category providers.
-
Field Summary
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCategories
(String siteName, String language) Get all the categories for a given siteName and language.getCategory
(String categoryId) Get a category by its ID.getCategoryProvider
(String categoryId) Get a category's provider.boolean
hasCategory
(String categoryId) Tests if a category exists.Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, addExtension, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initialize, initializeExtensions, service
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role
-
-
Constructor Details
-
CategoryProviderExtensionPoint
public CategoryProviderExtensionPoint()
-
-
Method Details
-
getCategories
Get all the categories for a given siteName and language.- Parameters:
siteName
- the site name.language
- the language.- Returns:
- a Collection containing all the categories.
-
getCategory
Get a category by its ID.- Parameters:
categoryId
- the category ID.- Returns:
- the Category or null if not found.
-
hasCategory
Tests if a category exists.- Parameters:
categoryId
- the category ID.- Returns:
- true if the category exists, false otherwise..
-
getCategoryProvider
Get a category's provider.- Parameters:
categoryId
- the category ID.- Returns:
- the CategoryProvider or null if not found.
-