org.apache.shindig.gadgets.uri
Class ProxyUriBase
java.lang.Object
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
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)
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 timeversion - 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.