haul        2002/12/06 02:01:24

  Modified:    src/java/org/apache/cocoon/components/language/markup/xsp
                        Tag: cocoon_2_0_3_branch XSPModuleHelper.java
  Log:
  renamed all methods from getParameter* to getAttribute* to be consistent
  with the InputModule method names.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +19 -19    
xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/XSPModuleHelper.java
  
  Index: XSPModuleHelper.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/XSPModuleHelper.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- XSPModuleHelper.java      3 Dec 2002 15:07:10 -0000       1.1.2.2
  +++ XSPModuleHelper.java      6 Dec 2002 10:01:24 -0000       1.1.2.3
  @@ -184,17 +184,17 @@
   
   
       /**
  -     * Get a single parameter value from a module. Uses cached
  +     * Get a single attribute value from a module. Uses cached
        * reference if existing.
        *
        * @param objectModel a <code>Map</code> value
        * @param module a <code>String</code> value holding the module name
  -     * @param name a <code>String</code> value holding the parameter name
  +     * @param name a <code>String</code> value holding the attribute name
        * @param deflt an <code>Object</code> value holding a default value
        * @return an <code>Object</code> value
        * @exception RuntimeException if an error occurs
        */
  -    public Object getParameter(Map objectModel, String module, String name, Object 
deflt) throws RuntimeException {
  +    public Object getAttribute(Map objectModel, String module, String name, Object 
deflt) throws RuntimeException {
   
           Object result = this.get(OP_GET, module, name, objectModel);
           if (result == null) result = deflt;
  @@ -209,12 +209,12 @@
        *
        * @param objectModel a <code>Map</code> value
        * @param module a <code>String</code> value holding the module name
  -     * @param name a <code>String</code> value holding the parameter name
  +     * @param name a <code>String</code> value holding the attribute name
        * @param deflt an <code>Object[]</code> value holding a default value
        * @return an <code>Object[]</code> value
        * @exception RuntimeException if an error occurs
        */
  -    public Object[] getParameterValues(Map objectModel, String module, String name, 
Object[] deflt) throws RuntimeException {
  +    public Object[] getAttributeValues(Map objectModel, String module, String name, 
Object[] deflt) throws RuntimeException {
   
           Object[] result = (Object[]) this.get(OP_VALUES, module, name, objectModel);
           if (result == null) result = deflt;
  @@ -222,26 +222,26 @@
       }
   
       /**
  -     * Output the request parameter values for a given name to the
  +     * Output the request attribute values for a given name to the
        * content handler.
        *
        * @param objectModel The Map objectModel
        * @param contentHandler The SAX content handler
        * @param module a <code>String</code> value holding the module name
  -     * @param name a <code>String</code> value holding the parameter name
  +     * @param name a <code>String</code> value holding the attribute name
        * @exception SAXException If a SAX error occurs
        * @exception RuntimeException if an error occurs
        */
  -    public void getParameterValues(Map objectModel, ContentHandler contentHandler, 
String module, String name )
  +    public void getAttributeValues(Map objectModel, ContentHandler contentHandler, 
String module, String name )
           throws SAXException, RuntimeException {
   
           AttributesImpl attr = new AttributesImpl();
           XSPObjectHelper.addAttribute(attr, "name", name);
   
           XSPObjectHelper.start(URI, PREFIX, contentHandler,
  -            "parameter-values", attr);
  +            "attribute-values", attr);
   
  -        Object[] values = this.getParameterValues(objectModel, module, name, null);
  +        Object[] values = this.getAttributeValues(objectModel, module, name, null);
   
           if (values != null) {
               for (int i = 0; i < values.length; i++) {
  @@ -250,12 +250,12 @@
               }
           }
   
  -        XSPObjectHelper.end(URI, PREFIX, contentHandler, "parameter-values");
  +        XSPObjectHelper.end(URI, PREFIX, contentHandler, "attribute-values");
       }
   
   
       /**
  -     * Get an iterator to a collection of parameter names from a
  +     * Get an iterator to a collection of attribute names from a
        * module.
        *
        * @param objectModel a <code>Map</code> value
  @@ -263,7 +263,7 @@
        * @return an <code>Iterator</code> value
        * @exception RuntimeException if an error occurs
        */
  -    public Iterator getParameterNames(Map objectModel, String module) throws 
RuntimeException {
  +    public Iterator getAttributeNames(Map objectModel, String module) throws 
RuntimeException {
   
           return (Iterator) this.get(OP_NAMES, module, null, objectModel);
       }
  @@ -271,7 +271,7 @@
   
   
       /**
  -     * Output parameter names for a given request
  +     * Output attribute names for a given request
        *
        * @param objectModel The Map objectModel
        * @param contentHandler The SAX content handler
  @@ -279,18 +279,18 @@
        * @exception SAXException If a SAX error occurs
        * @exception RuntimeException if an error occurs
        */
  -    public  void getParameterNames(Map objectModel, ContentHandler contentHandler, 
String module)
  +    public  void getAttributeNames(Map objectModel, ContentHandler contentHandler, 
String module)
           throws SAXException, RuntimeException {
   
  -        XSPObjectHelper.start(URI, PREFIX, contentHandler, "parameter-names");
  +        XSPObjectHelper.start(URI, PREFIX, contentHandler, "attribute-names");
   
  -        Iterator iter = this.getParameterNames(objectModel, module);
  +        Iterator iter = this.getAttributeNames(objectModel, module);
           while (iter.hasNext()) {
               String name = (String) iter.next();
               XSPObjectHelper.elementData(URI, PREFIX, contentHandler, "name", name);
           }
   
  -        XSPObjectHelper.end(URI, PREFIX, contentHandler, "parameter-names");
  +        XSPObjectHelper.end(URI, PREFIX, contentHandler, "attribute-names");
       }
   
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to