Package org.ametys.plugins.site
Class SiteInformationCache
- java.lang.Object
- 
- org.ametys.runtime.plugin.component.AbstractLogEnabled
- 
- org.ametys.plugins.site.SiteInformationCache
 
 
- 
- All Implemented Interfaces:
- LogEnabled,- Component,- Serviceable
 
 public class SiteInformationCache extends AbstractLogEnabled implements Serviceable, Component A cache for site information provided by the Back-Office.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description (package private) classSiteInformationCache.SiteUrlComparator
 - 
Field SummaryFields Modifier and Type Field Description private LDAPDataSourceManager_ldapDataSourceManagerprivate Map<SiteUrl,Site>_sitesprivate SQLDataSourceManager_sqlDataSourceManagerprivate Lock_syncLockprivate UserPopulationDAO_userPopulationDAOstatic StringBACKOFFICE_PREFIX_IDENTIFIERPrefix for backoffice synchronized userpopulationsstatic StringROLEAvalon Role
 - 
Constructor SummaryConstructors Constructor Description SiteInformationCache()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_configureSites(Configuration conf, Collection<Site> sites)private Configuration_getBackofficeConfiguration(String url)private void_serialize(Configuration configuration, File file)private void_synchronize()private void_synchronizeMonitoringAndCaptcha(Configuration boConfiguration)private void_synchronizePopulationsAndDatasources()Synchronize the local user populations and datasources with backofficeprivate void_synchronizeSites()Map<SiteUrl,Site>getSites()Returns the cached informations.voidresetSitesCache()Clear cached informations.voidservice(ServiceManager manager)- 
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabledgetLogger, setLogger
 
- 
 
- 
- 
- 
Field Detail- 
BACKOFFICE_PREFIX_IDENTIFIERpublic static final String BACKOFFICE_PREFIX_IDENTIFIER Prefix for backoffice synchronized userpopulations- See Also:
- Constant Field Values
 
 - 
_ldapDataSourceManagerprivate LDAPDataSourceManager _ldapDataSourceManager 
 - 
_sqlDataSourceManagerprivate SQLDataSourceManager _sqlDataSourceManager 
 - 
_userPopulationDAOprivate UserPopulationDAO _userPopulationDAO 
 
- 
 - 
Constructor Detail- 
SiteInformationCachepublic SiteInformationCache() 
 
- 
 - 
Method Detail- 
servicepublic void service(ServiceManager manager) throws ServiceException - Specified by:
- servicein interface- Serviceable
- Throws:
- ServiceException
 
 - 
resetSitesCachepublic void resetSitesCache() Clear cached informations.
 - 
getSitespublic Map<SiteUrl,Site> getSites() Returns the cached informations.- Returns:
- the cached informations.
 
 - 
_synchronizeprivate void _synchronize() 
 - 
_synchronizeSitesprivate void _synchronizeSites() throws ConfigurationException - Throws:
- ConfigurationException
 
 - 
_configureSitesprivate void _configureSites(Configuration conf, Collection<Site> sites) throws ConfigurationException - Throws:
- ConfigurationException
 
 - 
_getBackofficeConfigurationprivate Configuration _getBackofficeConfiguration(String url) 
 - 
_synchronizePopulationsAndDatasourcesprivate void _synchronizePopulationsAndDatasources() throws Exception Synchronize the local user populations and datasources with backoffice- Throws:
- Exception- If an unexpected error occurred
 
 - 
_serializeprivate void _serialize(Configuration configuration, File file) throws Exception - Throws:
- Exception
 
 - 
_synchronizeMonitoringAndCaptchaprivate void _synchronizeMonitoringAndCaptcha(Configuration boConfiguration) 
 
- 
 
-