commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-commons Wiki] Update of "ResourcesUserGuideCreating" by NiallPemberton
Date Tue, 29 Nov 2005 00:39:06 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification.

The following page has been changed by NiallPemberton:
http://wiki.apache.org/jakarta-commons/ResourcesUserGuideCreating

------------------------------------------------------------------------------
- || [http://jakarta.apache.org/commons/resources/ Home] || [wiki:Resources Wiki] || [wiki:ResourcesUserGuide
Guide] || [wiki:ResourcesUserGuideIntro Getting Started] || [wiki:ResourcesUserGuideMessages
Messages] || [wiki:ResourcesUserGuideImplementations Standard] || [wiki:ResourcesUserGuideCreating
Creating] || [http://jakarta.apache.org/commons/resources/apidocs/ API] || [http://jakarta.apache.org/commons/resources/xref/
XREF] ||
+ || [http://jakarta.apache.org/commons/resources/ Home] || [wiki:Resources Wiki] || [wiki:ResourcesUserGuide
Guide] || [wiki:ResourcesUserGuideIntro Getting Started] || [wiki:ResourcesUserGuideMessages
Messages] || [wiki:ResourcesUserGuideImplementations Standard] || [wiki:ResourcesUserGuideCreating
Creating] || [http://jakarta.apache.org/commons/resources/apidocs/ API] || [http://jakarta.apache.org/commons/resources/xref/
Source] ||
  ----
  = 4. Creating a Resources Implementation =
  
  You can implement the [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/Resources.html
Resources] and [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/ResourcesFactory.html
ResourcesFactory] interfaces directly, however, by far the easiest way is to use one of the
'''base''' implementations provided.
  
  The two '''base''' Resources classes are:
-  * [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/ResourcesBase.html
ResourcesBase] - implements Resources
+  * [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/impl/ResourcesBase.html
ResourcesBase] - implements Resources
-     * '''{{{void:init()}}}''' - (optional) for initialization processing.
+     * '''init()''' - (optional) for initialization processing.
-     * '''{{{Iterator:getKeys()}}}''' - (required) return the set of keys in this Resources
+     * '''getKeys()''' - (required) return the set (Iterator) of keys in this Resources
-     * '''{{{Object:getObject(key, Locale, TimeZone)}}}''' - (required) retrieve the content
for a key/Locale/Timezone
+     * '''getObject(key, Locale, !TimeZone)''' - (required) retrieve the content for a key/Locale/Timezone
-  * [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/CollectionResourcesBase.html
CollectionResourcesBase] - extends '''!ResourcesBase''' and provides a mechanism for caching
a set of '''Map'''s containing key/value pairs for a Locale.
+  * [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/impl/CollectionResourcesBase.html
CollectionResourcesBase] - extends '''!ResourcesBase''' and provides a mechanism for caching
a set of '''Map'''s containing key/value pairs for a Locale.
-     * '''{{{void:init()}}}''' - (optional) for initialization processing.
+     * '''init()''' - (optional) for initialization processing.
-     * '''{{{Map:getLocaleMap(baseUrl, Locale)}}}''' (required) returns a Map of key/value
pairs for a Locale.
+     * '''getLocaleMap(baseUrl, Locale)''' (required) returns a Map of key/value pairs for
a Locale.
  
  == 4.1 ResourcesBase ==
  
@@ -38, +38 @@

          public Object getObject(String key, Locale locale, TimeZone timeZone) {
              // must implement this method
          }
- 
      }
  }}}
  
@@ -63, +62 @@

  
  == 4.3 ResourcesFactory ==
  
- To create a '''factory''' for your '''Resources''' implementation, extends the [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/ResourcesFactoryBase.html
ResourcesFactoryBase] ...
+ To create a '''factory''' for your '''Resources''' implementation, extend the [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/impl/ResourcesFactoryBase.html
ResourcesFactoryBase] ...
  
  {{{
      public class MyResourcesFactory extends ResourcesFactoryBase {
@@ -82, +81 @@

      }
  }}}
  
- '''N.B''' for implementations to be used in a Web Application there is a [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/WebappResourcesFactoryBase.html
WebappResourcesFactoryBase] factory which includes a '''!ServletContext''' property with appropriate
read/write methods.
+ '''N.B''' for implementations to be used in a Web Application there is a [http://jakarta.apache.org/commons/resources/apidocs/org/apache/commons/resources/impl/WebappResourcesFactoryBase.html
WebappResourcesFactoryBase] factory which includes a '''!ServletContext''' property with appropriate
read/write methods.
  
  ----
- || [http://jakarta.apache.org/commons/resources/ Home] || [wiki:Resources Wiki] || [wiki:ResourcesUserGuide
Guide] || [wiki:ResourcesUserGuideIntro Getting Started] || [wiki:ResourcesUserGuideMessages
Messages] || [wiki:ResourcesUserGuideImplementations Standard] || [wiki:ResourcesUserGuideCreating
Creating] || [http://jakarta.apache.org/commons/resources/apidocs/ API] || [http://jakarta.apache.org/commons/resources/xref/
XREF] ||
+ || [http://jakarta.apache.org/commons/resources/ Home] || [wiki:Resources Wiki] || [wiki:ResourcesUserGuide
Guide] || [wiki:ResourcesUserGuideIntro Getting Started] || [wiki:ResourcesUserGuideMessages
Messages] || [wiki:ResourcesUserGuideImplementations Standard] || [wiki:ResourcesUserGuideCreating
Creating] || [http://jakarta.apache.org/commons/resources/apidocs/ API] || [http://jakarta.apache.org/commons/resources/xref/
Source] ||
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message