Class BlogRootPageFactory
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.plugins.blog.repository.BlogRootPageFactory
-
- All Implemented Interfaces:
AmetysObjectFactory<Page>,VirtualAmetysObjectFactory<Page>,PluginAware,Component,LogEnabled,Serviceable
public class BlogRootPageFactory extends AbstractLogEnabled implements VirtualAmetysObjectFactory<Page>, Serviceable, PluginAware
AmetysObjectFactoryfor handling "virtual" blog root page.
-
-
Field Summary
Fields Modifier and Type Field Description protected BlogCacheManager_cacheManagerThe blog cache manager.protected String_i18nCatalogueThe i18n catalogue.protected I18nUtils_i18nUtilsThe i18n cache.protected PageDataTypeExtensionPoint_pageDataTypeExtensionPointThe extension point with available data types for pagesprotected String_pluginNameThe plugin name.protected AmetysObjectResolver_resolverThe ametys object resolver.protected ServiceExtensionPoint_serviceExtensionPointThe service extension pointprotected SkinsManager_skinsManagerThe skins managerprotected TagProviderExtensionPoint_tagProviderEPThe tag provider extension point.static StringSCHEMEThe sub-pages scheme.
-
Constructor Summary
Constructors Constructor Description BlogRootPageFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PagegetAmetysObjectById(String id)PagegetChild(JCRAmetysObject parent, String childName)Returns a namedAmetysObject.AmetysObjectIterable<Page>getChildren(JCRAmetysObject parent)Returns the "root" objects of this virtual factory, hosted in the Ametys hierarchy under aTraversableAmetysObject, which is backed by a concrete JCR Node.StringgetScheme()Returns the protocol of this factory, used to construct unique ids.booleanhasAmetysObjectForId(String id)Return true if the specified id correspond to an existingAmetysObject.booleanhasChild(JCRAmetysObject parent, String childName)Returns true if the namedAmetysObjectexists.voidservice(ServiceManager manager)voidsetPluginInfo(String pluginName, String featureName, String id)Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.Stringtranslate(String language, String key)Get a translated i18n message from the cache.-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
SCHEME
public static final String SCHEME
The sub-pages scheme.- See Also:
- Constant Field Values
-
_resolver
protected AmetysObjectResolver _resolver
The ametys object resolver.
-
_cacheManager
protected BlogCacheManager _cacheManager
The blog cache manager.
-
_tagProviderEP
protected TagProviderExtensionPoint _tagProviderEP
The tag provider extension point.
-
_i18nUtils
protected I18nUtils _i18nUtils
The i18n cache.
-
_pluginName
protected String _pluginName
The plugin name.
-
_i18nCatalogue
protected String _i18nCatalogue
The i18n catalogue.
-
_skinsManager
protected SkinsManager _skinsManager
The skins manager
-
_pageDataTypeExtensionPoint
protected PageDataTypeExtensionPoint _pageDataTypeExtensionPoint
The extension point with available data types for pages
-
_serviceExtensionPoint
protected ServiceExtensionPoint _serviceExtensionPoint
The service extension point
-
-
Constructor Detail
-
BlogRootPageFactory
public BlogRootPageFactory()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
getScheme
public String getScheme()
Description copied from interface:AmetysObjectFactoryReturns the protocol of this factory, used to construct unique ids.- Specified by:
getSchemein interfaceAmetysObjectFactory<Page>- Returns:
- the protocol of this factory.
-
getChildren
public AmetysObjectIterable<Page> getChildren(JCRAmetysObject parent)
Description copied from interface:VirtualAmetysObjectFactoryReturns the "root" objects of this virtual factory, hosted in the Ametys hierarchy under aTraversableAmetysObject, which is backed by a concrete JCR Node.- Specified by:
getChildrenin interfaceVirtualAmetysObjectFactory<Page>- Parameters:
parent- theJCRAmetysObject"hosting" this factory.- Returns:
- the root objects of this virtual factory.
-
hasChild
public boolean hasChild(JCRAmetysObject parent, String childName)
Description copied from interface:VirtualAmetysObjectFactoryReturns true if the namedAmetysObjectexists.- Specified by:
hasChildin interfaceVirtualAmetysObjectFactory<Page>- Parameters:
parent- theJCRAmetysObject"hosting" this factory.childName- the name of the virtual child.- Returns:
- true if the named
AmetysObjectexists.
-
getChild
public Page getChild(JCRAmetysObject parent, String childName)
Description copied from interface:VirtualAmetysObjectFactoryReturns a namedAmetysObject.- Specified by:
getChildin interfaceVirtualAmetysObjectFactory<Page>- Parameters:
parent- theJCRAmetysObject"hosting" this factory.childName- the name of the virtual child.- Returns:
- the corresponding
AmetysObject.
-
getAmetysObjectById
public Page getAmetysObjectById(String id) throws AmetysRepositoryException
Description copied from interface:AmetysObjectFactory- Specified by:
getAmetysObjectByIdin interfaceAmetysObjectFactory<Page>- Parameters:
id- the identifier.- Returns:
- the corresponding
AmetysObject. - Throws:
AmetysRepositoryException- if an error occurs.
-
hasAmetysObjectForId
public boolean hasAmetysObjectForId(String id) throws AmetysRepositoryException
Description copied from interface:AmetysObjectFactoryReturn true if the specified id correspond to an existingAmetysObject. Id are like<protocol>://<protocol-specific-part>.- Specified by:
hasAmetysObjectForIdin interfaceAmetysObjectFactory<Page>- Parameters:
id- the identifier.- Returns:
- true if the specified id correspond to an existing
AmetysObject. - Throws:
AmetysRepositoryException- if an error occurs.
-
-