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
AmetysObjectFactory
for handling "virtual" blog root page.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BlogCacheManager
The blog cache manager.protected String
The i18n catalogue.protected I18nUtils
The i18n cache.protected ModelItemTypeExtensionPoint
The extension point with available data types for pagesprotected String
The plugin name.protected AmetysObjectResolver
The ametys object resolver.protected ServiceExtensionPoint
The service extension pointprotected SkinsManager
The skins managerprotected TagProviderExtensionPoint
The tag provider extension point.static final String
The sub-pages scheme. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChild
(JCRAmetysObject parent, String childName) Returns a namedAmetysObject
.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.Returns the protocol of this factory, used to construct unique ids.boolean
Return true if the specified id correspond to an existingAmetysObject
.boolean
hasChild
(JCRAmetysObject parent, String childName) Returns true if the namedAmetysObject
exists.void
service
(ServiceManager manager) void
setPluginInfo
(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.Get a translated i18n message from the cache.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
SCHEME
The sub-pages scheme.- See Also:
-
_resolver
The ametys object resolver. -
_cacheManager
The blog cache manager. -
_tagProviderEP
The tag provider extension point. -
_i18nUtils
The i18n cache. -
_pluginName
The plugin name. -
_i18nCatalogue
The i18n catalogue. -
_skinsManager
The skins manager -
_pageDataTypeExtensionPoint
The extension point with available data types for pages -
_serviceExtensionPoint
The service extension point
-
-
Constructor Details
-
BlogRootPageFactory
public BlogRootPageFactory()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
setPluginInfo
Description copied from interface:PluginAware
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.- Specified by:
setPluginInfo
in 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
Description copied from interface:AmetysObjectFactory
Returns the protocol of this factory, used to construct unique ids.- Specified by:
getScheme
in interfaceAmetysObjectFactory<Page>
- Returns:
- the protocol of this factory.
-
getChildren
Description copied from interface:VirtualAmetysObjectFactory
Returns the "root" objects of this virtual factory, hosted in the Ametys hierarchy under aTraversableAmetysObject
, which is backed by a concrete JCR Node.- Specified by:
getChildren
in interfaceVirtualAmetysObjectFactory<Page>
- Parameters:
parent
- theJCRAmetysObject
"hosting" this factory.- Returns:
- the root objects of this virtual factory.
-
hasChild
Description copied from interface:VirtualAmetysObjectFactory
Returns true if the namedAmetysObject
exists.- Specified by:
hasChild
in interfaceVirtualAmetysObjectFactory<Page>
- Parameters:
parent
- theJCRAmetysObject
"hosting" this factory.childName
- the name of the virtual child.- Returns:
- true if the named
AmetysObject
exists.
-
getChild
Description copied from interface:VirtualAmetysObjectFactory
Returns a namedAmetysObject
.- Specified by:
getChild
in interfaceVirtualAmetysObjectFactory<Page>
- Parameters:
parent
- theJCRAmetysObject
"hosting" this factory.childName
- the name of the virtual child.- Returns:
- the corresponding
AmetysObject
.
-
getAmetysObjectById
Description copied from interface:AmetysObjectFactory
- Specified by:
getAmetysObjectById
in interfaceAmetysObjectFactory<Page>
- Parameters:
id
- the identifier.- Returns:
- the corresponding
AmetysObject
. - Throws:
AmetysRepositoryException
- if an error occurs.
-
hasAmetysObjectForId
Description copied from interface:AmetysObjectFactory
Return true if the specified id correspond to an existingAmetysObject
. Id are like<protocol>://<protocol-specific-part>
.- Specified by:
hasAmetysObjectForId
in interfaceAmetysObjectFactory<Page>
- Parameters:
id
- the identifier.- Returns:
- true if the specified id correspond to an existing
AmetysObject
. - Throws:
AmetysRepositoryException
- if an error occurs.
-
translate
Get a translated i18n message from the cache.- Parameters:
language
- the language.key
- the i18n message key.- Returns:
- the translated text.
-