Author: cdamioli
Date: Wed Feb 24 18:50:56 2016
New Revision: 1732203
URL: http://svn.apache.org/viewvc?rev=1732203&view=rev
Log:
COCOON-2348 Make XMLResourceBundle (and -Factory) more extensible
Modified:
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java
Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java?rev=1732203&r1=1732202&r2=1732203&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java Wed Feb 24 18:50:56 2016
@@ -369,6 +369,13 @@ public class XMLResourceBundle extends A
}
/**
+ * Sets the validity of the bundle.
+ */
+ public void setValidity(SourceValidity validity) {
+ this.validity = validity;
+ }
+
+ /**
* Get an instance of the {@link ParamSaxBuffer} associated with the key.
*
* @param key the key
Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java?rev=1732203&r1=1732202&r2=1732203&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/i18n/XMLResourceBundleFactory.java Wed Feb 24 18:50:56 2016
@@ -56,7 +56,7 @@ public class XMLResourceBundleFactory ex
/**
* Root directory to all bundle names
*/
- private String directory;
+ protected String directory;
/**
* Reload check interval in milliseconds.
@@ -64,7 +64,7 @@ public class XMLResourceBundleFactory ex
* disable reloads and <code>0</code> to check for modifications
* on each catalogue request.
*/
- private long interval;
+ protected long interval;
/**
* Service Manager
@@ -258,7 +258,7 @@ public class XMLResourceBundleFactory ex
// Create this bundle (if source exists) and pass parent to it.
final String sourceURI = getSourceURI(directories[index - 1], name, locale);
- bundle = _create(sourceURI, locale, parent);
+ bundle = create(sourceURI, locale, parent);
updateCache(cacheKey, bundle);
}
}
@@ -277,7 +277,7 @@ public class XMLResourceBundleFactory ex
* @param parent parent bundle, if any
* @return the bundle
*/
- private XMLResourceBundle _create(String sourceURI,
+ protected XMLResourceBundle create(String sourceURI,
Locale locale,
XMLResourceBundle parent) {
if (getLogger().isDebugEnabled()) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.