com.google.api.client.googleapis
Class GoogleUrl

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.http.GenericUrl
              extended by com.google.api.client.googleapis.GoogleUrl
All Implemented Interfaces:
Cloneable, Map<String,Object>
Direct Known Subclasses:
GoogleOAuthDomainWideDelegation.Url

public class GoogleUrl
extends GenericUrl

Generic Google URL providing for some common query parameters used in Google API's such as the alt and fields parameters.

Upgrade warning: in prior version 1.7 the pretty-print parameter had a key of "prettyprint", and the user IP parameter had a key of "userip". In 1.8 the case has changed, so they are now "prettyPrint" and "userIp" respectively.

Implementation is not thread-safe.

Since:
1.0
Author:
Yaniv Inbar

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 String alt
          Deprecated. (scheduled to be made private in 1.9) Use getAlt() or setAlt(java.lang.String)
 String fields
          Deprecated. (scheduled to be made private in 1.9) Use getFields() or setFields(java.lang.String)
 String key
          Deprecated. (scheduled to be made private in 1.9) Use getKey() or setKey(java.lang.String)
 Boolean prettyprint
          Deprecated. (scheduled to be made private in 1.9) Use getPrettyPrint() or setPrettyPrint(java.lang.Boolean)
 String userip
          Deprecated. (scheduled to be made private in 1.9) Use getUserIp() or setUserIp(java.lang.String)
 
Constructor Summary
GoogleUrl()
           
GoogleUrl(String encodedUrl)
           
 
Method Summary
 GoogleUrl clone()
           
 String getAlt()
          Returns the alternate wire format.
 String getFields()
          Returns the partial fields mask.
 String getKey()
          Returns the API key as described in the Google APIs Console documentation.
 Boolean getPrettyPrint()
          Returns whether to pretty print the output.
 String getUserIp()
          Returns the user IP used to enforce per-user limits for server-side applications, as described in the Google APIs Console documentation.
 void setAlt(String alt)
          Sets the alternate wire format.
 void setFields(String fields)
          Sets the partial fields mask.
 void setKey(String key)
          Sets the API key as described in the Google APIs Console documentation.
 void setPrettyPrint(Boolean prettyPrint)
          Sets whether to pretty print the output.
 void setUserIp(String userip)
          Sets the user IP used to enforce per-user limits for server-side applications, as described in the Google APIs Console documentation.
 
Methods inherited from class com.google.api.client.http.GenericUrl
appendRawPath, build, equals, getAll, getFirst, getFragment, getHost, getPathParts, getPort, getRawPath, getScheme, hashCode, setFragment, setHost, setPathParts, setPort, setRawPath, setScheme, toPathParts, toString
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getUnknownKeys, put, putAll, remove, set, setUnknownKeys
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

prettyprint

@Deprecated
public Boolean prettyprint
Deprecated. (scheduled to be made private in 1.9) Use getPrettyPrint() or setPrettyPrint(java.lang.Boolean)
Whether to pretty print the output.


alt

@Deprecated
public String alt
Deprecated. (scheduled to be made private in 1.9) Use getAlt() or setAlt(java.lang.String)
Alternate wire format.


fields

@Deprecated
public String fields
Deprecated. (scheduled to be made private in 1.9) Use getFields() or setFields(java.lang.String)
Partial fields mask.


key

@Deprecated
public String key
Deprecated. (scheduled to be made private in 1.9) Use getKey() or setKey(java.lang.String)
API key as described in the Google APIs Console documentation.

Since:
1.3

userip

@Deprecated
public String userip
Deprecated. (scheduled to be made private in 1.9) Use getUserIp() or setUserIp(java.lang.String)
User IP used to enforce per-user limits for server-side applications, as described in the Google APIs Console documentation.

Since:
1.3
Constructor Detail

GoogleUrl

public GoogleUrl()

GoogleUrl

public GoogleUrl(String encodedUrl)
Parameters:
encodedUrl - encoded URL, including any existing query parameters that should be parsed
Method Detail

clone

public GoogleUrl clone()
Overrides:
clone in class GenericUrl

getPrettyPrint

public Boolean getPrettyPrint()
Returns whether to pretty print the output.

Since:
1.8

setPrettyPrint

public void setPrettyPrint(Boolean prettyPrint)
Sets whether to pretty print the output.

Since:
1.8

getAlt

public final String getAlt()
Returns the alternate wire format.

Since:
1.8

setAlt

public final void setAlt(String alt)
Sets the alternate wire format.

Since:
1.8

getFields

public final String getFields()
Returns the partial fields mask.

Since:
1.8

setFields

public final void setFields(String fields)
Sets the partial fields mask.

Since:
1.8

getKey

public final String getKey()
Returns the API key as described in the Google APIs Console documentation.

Since:
1.8

setKey

public final void setKey(String key)
Sets the API key as described in the Google APIs Console documentation.

Since:
1.8

getUserIp

public final String getUserIp()
Returns the user IP used to enforce per-user limits for server-side applications, as described in the Google APIs Console documentation.

Since:
1.8

setUserIp

public final void setUserIp(String userip)
Sets the user IP used to enforce per-user limits for server-side applications, as described in the Google APIs Console documentation.

Since:
1.8


Copyright © 2010-2012 Google. All Rights Reserved.