public class BlogRootPageFactory extends AbstractLogEnabled implements VirtualAmetysObjectFactory<Page>, Serviceable, PluginAware
AmetysObjectFactory
for handling "virtual" blog root page.Modifier and Type | Field and Description |
---|---|
protected BlogCacheManager |
_cacheManager
The blog cache manager.
|
protected String |
_i18nCatalogue
The i18n catalogue.
|
protected I18nUtils |
_i18nUtils
The i18n cache.
|
protected PageDataTypeExtensionPoint |
_pageDataTypeExtensionPoint
The extension point with available data types for pages
|
protected String |
_pluginName
The plugin name.
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
protected ServiceExtensionPoint |
_serviceExtensionPoint
The service extension point
|
protected SkinsManager |
_skinsManager
The skins manager
|
protected TagProviderExtensionPoint |
_tagProviderEP
The tag provider extension point.
|
static String |
SCHEME
The sub-pages scheme.
|
Constructor and Description |
---|
BlogRootPageFactory() |
Modifier and Type | Method and Description |
---|---|
Page |
getAmetysObjectById(String id)
|
Page |
getChild(JCRAmetysObject parent,
String childName)
Returns a named
AmetysObject . |
AmetysObjectIterable<Page> |
getChildren(JCRAmetysObject parent)
Returns the "root" objects of this virtual factory, hosted in the Ametys
hierarchy under a
TraversableAmetysObject , which is backed by a
concrete JCR Node. |
String |
getScheme()
Returns the protocol of this factory, used to construct unique ids.
|
boolean |
hasAmetysObjectForId(String id)
Return true if the specified id correspond to an existing
AmetysObject . |
boolean |
hasChild(JCRAmetysObject parent,
String childName)
Returns true if the named
AmetysObject 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. |
String |
translate(String language,
String key)
Get a translated i18n message from the cache.
|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
public static final String SCHEME
protected AmetysObjectResolver _resolver
protected BlogCacheManager _cacheManager
protected TagProviderExtensionPoint _tagProviderEP
protected I18nUtils _i18nUtils
protected String _pluginName
protected String _i18nCatalogue
protected SkinsManager _skinsManager
protected PageDataTypeExtensionPoint _pageDataTypeExtensionPoint
protected ServiceExtensionPoint _serviceExtensionPoint
public BlogRootPageFactory()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic String getScheme()
AmetysObjectFactory
getScheme
in interface AmetysObjectFactory<Page>
public AmetysObjectIterable<Page> getChildren(JCRAmetysObject parent)
VirtualAmetysObjectFactory
TraversableAmetysObject
, which is backed by a
concrete JCR Node.getChildren
in interface VirtualAmetysObjectFactory<Page>
parent
- the JCRAmetysObject
"hosting" this factory.public boolean hasChild(JCRAmetysObject parent, String childName)
VirtualAmetysObjectFactory
AmetysObject
exists.hasChild
in interface VirtualAmetysObjectFactory<Page>
parent
- the JCRAmetysObject
"hosting" this factory.childName
- the name of the virtual child.AmetysObject
exists.public Page getChild(JCRAmetysObject parent, String childName)
VirtualAmetysObjectFactory
AmetysObject
.getChild
in interface VirtualAmetysObjectFactory<Page>
parent
- the JCRAmetysObject
"hosting" this factory.childName
- the name of the virtual child.AmetysObject
.public Page getAmetysObjectById(String id) throws AmetysRepositoryException
AmetysObjectFactory
getAmetysObjectById
in interface AmetysObjectFactory<Page>
id
- the identifier.AmetysObject
.AmetysRepositoryException
- if an error occurs.public boolean hasAmetysObjectForId(String id) throws AmetysRepositoryException
AmetysObjectFactory
AmetysObject
.
Id are like <protocol>://<protocol-specific-part>
.hasAmetysObjectForId
in interface AmetysObjectFactory<Page>
id
- the identifier.AmetysObject
.AmetysRepositoryException
- if an error occurs.