public class OdfProgramRestrictionManager extends AbstractLogEnabled implements Component, Serviceable, Contextualizable, Disposable
| Modifier and Type | Field and Description |
|---|---|
protected Context |
_cocoonContext
Cocoon context
|
protected ContentHelper |
_contentHelper
Content helper
|
private Context |
_context |
protected ContentTypeExtensionPoint |
_cTypeEP
The content type extension point.
|
protected AmetysObjectResolver |
_resolver
Ametys object resolver
|
protected Map<String,OdfProgramRestriction> |
_restrictions
The available odf restrictions
|
protected RootOrgUnitProvider |
_rootOrgUnitProvider
Root orgunit provider
|
protected SiteConfigurationExtensionPoint |
_scep
Site configuration extension point
|
static String |
ROLE
The avalon role.
|
| Constructor and Description |
|---|
OdfProgramRestrictionManager() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_addDefaultOrgunitRestrictions() |
private I18nizableText |
_configureI18nizableText(Configuration config,
String name,
String defaultValue,
String defaultCatalog) |
protected OdfRestrictionRule |
_configureRestrictionRule(Configuration ruleConf)
Configure a restriction rule from a configuration node
|
protected List<OdfRestrictionRule> |
_configureRestrictionRules(Configuration rulesConf)
Create a list of rules from configuration nodes
|
protected void |
_readRestrictionConfigurationFile()
Configured the restrictions from the XML configuration file
|
void |
contextualize(Context context) |
void |
dispose() |
OdfProgramRestriction |
getRestriction(Page odfRootPage)
Get the ODF restriction for the given ODF root page
|
String |
getRestrictionRootOrgUnitId(String siteName)
Get the id of the restriction root orgunit
|
Map<String,OdfProgramRestriction> |
getRestrictions()
Retrieves the available restrictions
|
boolean |
hasOrgunitRestrictions(Page rootPage)
Indicate is there is any restriction related to orgunit for this root page
|
boolean |
hasRestrictions(Page rootPage)
Indicate is there is any restriction for this root page
|
void |
service(ServiceManager serviceManager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected SiteConfigurationExtensionPoint _scep
protected ContentTypeExtensionPoint _cTypeEP
protected AmetysObjectResolver _resolver
protected RootOrgUnitProvider _rootOrgUnitProvider
protected Context _cocoonContext
protected Map<String,OdfProgramRestriction> _restrictions
protected ContentHelper _contentHelper
public OdfProgramRestrictionManager()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic void dispose()
dispose in interface Disposablepublic Map<String,OdfProgramRestriction> getRestrictions()
public OdfProgramRestriction getRestriction(Page odfRootPage)
odfRootPage - The ODF root pagenullpublic boolean hasRestrictions(Page rootPage)
rootPage - odf root pagepublic boolean hasOrgunitRestrictions(Page rootPage)
rootPage - odf root pagepublic String getRestrictionRootOrgUnitId(String siteName)
siteName - the site nameprotected void _readRestrictionConfigurationFile()
private I18nizableText _configureI18nizableText(Configuration config, String name, String defaultValue, String defaultCatalog)
protected List<OdfRestrictionRule> _configureRestrictionRules(Configuration rulesConf) throws ConfigurationException
rulesConf - Array of configuration node that represents the set of rulesConfigurationException - if a configuration error is encounteredprotected OdfRestrictionRule _configureRestrictionRule(Configuration ruleConf) throws ConfigurationException
ruleConf - The configuration node representing the ruleConfigurationException - if a configuration error is encounteredprivate void _addDefaultOrgunitRestrictions()