Hi Thomas,
Hmmm.... I think this would be best done as it's done in the
DefaultRenderingConfiguration class, i.e. with a configuration
component which is in charge of returning the values and in charge of
setting the default values.
WDYT?
Thanks
-Vincent
On Oct 15, 2008, at 3:10 PM, tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2008-10-15 15:09:38 +0200 (Wed, 15 Oct 2008)
> New Revision: 13574
>
> Modified:
> platform/core/trunk/xwiki-cache/xwiki-cache-api/src/main/java/org/
> xwiki/cache/internal/DefaultCacheManager.java
> Log:
> XWIKI-2741: Add a CacheManager component based on configuration
> component to get default cache and local cache hint
> * add default hints to use when configuration is not found in
> xwiki.properties
>
> Modified: platform/core/trunk/xwiki-cache/xwiki-cache-api/src/main/
> java/org/xwiki/cache/internal/DefaultCacheManager.java
> ===================================================================
> --- platform/core/trunk/xwiki-cache/xwiki-cache-api/src/main/java/
> org/xwiki/cache/internal/DefaultCacheManager.java 2008-10-15
> 13:06:40 UTC (rev 13573)
> +++ platform/core/trunk/xwiki-cache/xwiki-cache-api/src/main/java/
> org/xwiki/cache/internal/DefaultCacheManager.java 2008-10-15
> 13:09:38 UTC (rev 13574)
> @@ -43,6 +43,16 @@
> public class DefaultCacheManager implements CacheManager,
> Initializable, Composable
> {
> /**
> + * The default cache implementation.
> + */
> + private static final String DEFAULT_CACHE_HINT = "jbosscache";
> +
> + /**
> + * The default local cache implementation.
> + */
> + private static final String DEFAULT_LOCALCACHE_HINT =
> "jbosscache/local";
> +
> + /**
> * The component manager to use to find cache components.
> */
> private ComponentManager componentManager;
> @@ -60,12 +70,12 @@
> /**
> * The role hint of configured default cache component.
> */
> - private String cacheHint;
> + private String cacheHint = DEFAULT_CACHE_HINT;
>
> /**
> * The role hint of configured default local cache component.
> */
> - private String localCacheHint;
> + private String localCacheHint = DEFAULT_LOCALCACHE_HINT;
>
> /**
> * [EMAIL PROTECTED]
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs