public class ODFRootClientSideElement extends StaticClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected CatalogsManager |
_catalogsManager
Catalog manager
|
protected ObservationManager |
_observationManager
Observation manager
|
protected OdfPageHandler |
_odfPageHandler
Odf page handler
|
protected AmetysObjectResolver |
_resolver
Ametys resolver
|
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
ODFRootClientSideElement() |
Modifier and Type | Method and Description |
---|---|
private boolean |
_addOdfRootProperty(Page page,
String catalog,
String firstLevel,
String secondLevel) |
private Property |
_getVirtualProperty(JCRAmetysObject jcrPage) |
private void |
_notifyOdfRootPageChange(Page page) |
private void |
_setVirtualProperty(JCRAmetysObject jcrPage,
Value[] values) |
private boolean |
_updateOdfRootProperty(Page page,
String catalog,
String firstLevel,
String secondLevel) |
boolean |
addOrUpdateOdfRootProperty(String pageId,
String catalog,
String firstLevel,
String secondLevel)
Add or update the odf root page property on a page
|
Map<String,Object> |
getOdfRootPageInfo(String pageId)
Retrieves odf root page properties
|
Map<String,Object> |
getStatus(String pageId)
Get odf root page status for the current page
|
private static boolean |
isVirtualPageFactoryValue(Value value)
Tests if a JCR Value represents the virtual page property
|
boolean |
removeOdfRootPage(String pageId)
Remove the odf root page property on a page
|
void |
service(ServiceManager smanager) |
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected AmetysObjectResolver _resolver
protected CatalogsManager _catalogsManager
protected OdfPageHandler _odfPageHandler
protected ObservationManager _observationManager
public ODFRootClientSideElement()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class StaticFileImportsClientSideElement
ServiceException
public Map<String,Object> getStatus(String pageId)
pageId
- the page identifierpublic Map<String,Object> getOdfRootPageInfo(String pageId)
pageId
- page identifierpublic boolean addOrUpdateOdfRootProperty(String pageId, String catalog, String firstLevel, String secondLevel) throws RepositoryException
pageId
- the page identifiercatalog
- the catalog to setfirstLevel
- the first level to setsecondLevel
- the second level to setRepositoryException
- if a repository error occursprivate boolean _addOdfRootProperty(Page page, String catalog, String firstLevel, String secondLevel) throws RepositoryException
RepositoryException
private boolean _updateOdfRootProperty(Page page, String catalog, String firstLevel, String secondLevel)
public boolean removeOdfRootPage(String pageId) throws RepositoryException
pageId
- the page identifierRepositoryException
- if a repository error occursprivate void _notifyOdfRootPageChange(Page page)
private Property _getVirtualProperty(JCRAmetysObject jcrPage) throws RepositoryException
RepositoryException
private void _setVirtualProperty(JCRAmetysObject jcrPage, Value[] values) throws RepositoryException
RepositoryException
private static boolean isVirtualPageFactoryValue(Value value) throws RepositoryException
value
- the value to testRepositoryException
- if a repository error occurs