com.sap.netweaver.bc.rf.common

Class UriQuery

java.lang.Object
  extended bycom.sap.netweaver.bc.rf.common.UriQuery

public final class UriQuery
extends Object

Manages query parameters for RFC 2396 uris.

Copyright (c) SAP AG 2001-2002


Nested Class Summary
static class UriQuery.Parameter
          Keeps one query parameter.
 
Constructor Summary
UriQuery()
          Construct an empty query.
 
Method Summary
 void add(String name, String value)
          Adds a new parameter to the end of the query
 void clear()
          Remove all parameters from the query.
 UriQuery.Parameter get(int index)
          Get the Parameter at given index
 Iterator iterator()
          Get iterator to iterate over all parameters
 void remove(String name)
          Removes all occurances of parameter with given name.
 void set(List parameter)
          Sets query to given list of parameters.
 void set(String name, String value)
          Sets first occurance of parameter name to given value.
 int size()
          Return number of parameters.
 String toExternalForm()
          Convert query back to its RFC 2396 encoded form.
 String toString()
          TBD: Description of the Method.
static UriQuery valueOf(String query)
          Get an object for manipulating the given query string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UriQuery

public UriQuery()
Construct an empty query.

Method Detail

valueOf

public static UriQuery valueOf(String query)
Get an object for manipulating the given query string. The query string is in RFC 2396 encoded form.

Parameters:
query - the query from an uri
Returns:
object to manipulate query

toString

public String toString()
TBD: Description of the Method.

Returns:
TBD: Description of the outgoing return value

toExternalForm

public String toExternalForm()
Convert query back to its RFC 2396 encoded form.

Returns:
encoded query string

add

public void add(String name,
                String value)
Adds a new parameter to the end of the query

Parameters:
name - of parameter
value - of parameter or null if not present

remove

public void remove(String name)
Removes all occurances of parameter with given name.

Parameters:
name - to remove

clear

public void clear()
Remove all parameters from the query.


iterator

public Iterator iterator()
Get iterator to iterate over all parameters

Returns:
iterator over all UriQuery.Parameters

set

public void set(String name,
                String value)
Sets first occurance of parameter name to given value. If parameter was not part of query already, the parameter is appended to the query.

Parameters:
name - of parameter
value - of parameter or null if not present

set

public void set(List parameter)
Sets query to given list of parameters. All existing parameters will be removed.

Parameters:
parameter - TBD: Description of the incoming method parameter

size

public int size()
Return number of parameters.

Returns:
number of parameters

get

public UriQuery.Parameter get(int index)
                       throws IndexOutOfBoundsException
Get the Parameter at given index

Parameters:
index - of parameter to get
Returns:
Parameter at index
Throws:
IndexOutOfBoundsException - when index not available


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.