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 Modifier and Type Field Description static String
ROLE
Avalon Role-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description CategoryProviderExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Category>
getCategories(String siteName, String language)
Get all the categories for a given siteName and language.Category
getCategory(String categoryId)
Get a category by its ID.CategoryProvider
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
-
-
-
-
Constructor Detail
-
CategoryProviderExtensionPoint
public CategoryProviderExtensionPoint()
-
-
Method Detail
-
getCategories
public Collection<Category> getCategories(String siteName, String language)
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
public Category getCategory(String categoryId)
Get a category by its ID.- Parameters:
categoryId
- the category ID.- Returns:
- the Category or null if not found.
-
hasCategory
public boolean hasCategory(String categoryId)
Tests if a category exists.- Parameters:
categoryId
- the category ID.- Returns:
- true if the category exists, false otherwise..
-
getCategoryProvider
public CategoryProvider getCategoryProvider(String categoryId)
Get a category's provider.- Parameters:
categoryId
- the category ID.- Returns:
- the CategoryProvider or null if not found.
-
-