org.apache.shindig.gadgets.uri
Class ProxyUriBase

java.lang.Object
  extended by org.apache.shindig.gadgets.uri.ProxyUriBase
Direct Known Subclasses:
ConcatUriManager.ConcatUri, ProxyUriManager.ProxyUri

public class ProxyUriBase
extends Object

Represents state/config information for the proxy.

Since:
2.0.0

Constructor Summary
protected ProxyUriBase(Gadget gadget)
           
protected ProxyUriBase(UriStatus status, Integer refresh, boolean debug, boolean noCache, String container, String gadget)
           
protected ProxyUriBase(UriStatus status, Uri origUri)
           
 
Method Summary
 boolean cajoleContent()
           
 boolean equals(Object obj)
           
protected static boolean getBooleanValue(String str)
           
 String getContainer()
           
 String getGadget()
           
protected static Integer getIntegerValue(String str)
           
 Integer getRefresh()
           
 String getRewriteMimeType()
           
 UriStatus getStatus()
           
 int hashCode()
           
 boolean isDebug()
           
 boolean isNoCache()
           
 HttpRequest makeHttpRequest(Uri targetUri)
           
 UriBuilder makeQueryParams(Integer forcedRefresh, String version)
          Construct the query parameters for proxy url
 boolean sanitizeContent()
           
 ProxyUriBase setCajoleContent(boolean cajole)
           
 void setFromUri(Uri uri)
          Parse uri query paramaters.
 ProxyUriBase setRewriteMimeType(String type)
           
 ProxyUriBase setSanitizeContent(boolean sanitize)
           
 Integer translateStatusRefresh(int longVal, int defaultVal)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyUriBase

protected ProxyUriBase(Gadget gadget)

ProxyUriBase

protected ProxyUriBase(UriStatus status,
                       Uri origUri)

ProxyUriBase

protected ProxyUriBase(UriStatus status,
                       Integer refresh,
                       boolean debug,
                       boolean noCache,
                       String container,
                       String gadget)
Method Detail

setFromUri

public void setFromUri(Uri uri)
Parse uri query paramaters. Note this function is called by a constructor, and can be override to handle derived class parsing


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setRewriteMimeType

public ProxyUriBase setRewriteMimeType(String type)

setSanitizeContent

public ProxyUriBase setSanitizeContent(boolean sanitize)

setCajoleContent

public ProxyUriBase setCajoleContent(boolean cajole)

getStatus

public UriStatus getStatus()

getRefresh

public Integer getRefresh()

isDebug

public boolean isDebug()

isNoCache

public boolean isNoCache()

getContainer

public String getContainer()

getGadget

public String getGadget()

getRewriteMimeType

public String getRewriteMimeType()

sanitizeContent

public boolean sanitizeContent()

cajoleContent

public boolean cajoleContent()

makeHttpRequest

public HttpRequest makeHttpRequest(Uri targetUri)
                            throws GadgetException
Throws:
GadgetException

makeQueryParams

public UriBuilder makeQueryParams(Integer forcedRefresh,
                                  String version)
Construct the query parameters for proxy url

Parameters:
forcedRefresh - optional overwrite the refresh time
version - optional version
Returns:
Url with only query parameters set

translateStatusRefresh

public Integer translateStatusRefresh(int longVal,
                                      int defaultVal)
                               throws GadgetException
Throws:
GadgetException

getBooleanValue

protected static boolean getBooleanValue(String str)

getIntegerValue

protected static Integer getIntegerValue(String str)


Copyright © 2007-2012. All Rights Reserved.