|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.portal.providers.urlscraper.Fetcher
This class fetches and stores the content from an arbitrary url
Field Summary | |
static String |
KEY_COOKIES_TO_FORWARD_ALL
wether to Forward all Cookies as Boolean |
static String |
KEY_COOKIES_TO_FORWARD_LIST
if only selcted Cookies will be forwarded, the list of cookies to be forwarded as List |
static String |
KEY_FORM_DATA
The formData as String e.g: login=[uid]&passwd=[password] wher the characters in square bracket are properties available in the channel. |
static String |
KEY_HTTP_AUTH
isHttpAuth , set true only if HttpAuth |
static String |
KEY_HTTP_AUTH_PASSWORD
the password for Http Auth |
static String |
KEY_HTTP_AUTH_UID
The Uid for Http Auth |
static String |
KEY_INPUT_ENCODING
The Input encoding as String |
static String |
KEY_LOGIN_FORM_DATA
The form data to be sent to during login if provided e.g: login=[uid]&passwd=[password] |
static String |
KEY_LOGIN_URL
login URL as string . |
static String |
KEY_LOGOUT_URL
logoutUrl as string . |
static String |
KEY_RESOURCE_BUNDLE
As ResourceBundle |
static String |
KEY_RULESET_ID
The RulesetId as String |
Constructor Summary | |
Fetcher(Map config)
Constructor method |
|
Fetcher(Map configMap,
boolean ubt,
String ubtAppendUrlSt)
Constructor method |
Method Summary | |
static String |
getContentEncoding(String contentType,
byte[] bytes,
String MIMEType,
String profileCharset)
Gets the charset |
StringBuffer |
getFilteredContent(int timeOut,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String urlAsString)
gets the Filtered Content within the timeOut limit else fails |
void |
logout(int timeOut,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Invokes the logout within the timeOut limit else fails |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String KEY_RULESET_ID
public static final String KEY_COOKIES_TO_FORWARD_ALL
public static final String KEY_COOKIES_TO_FORWARD_LIST
public static final String KEY_RESOURCE_BUNDLE
public static final String KEY_INPUT_ENCODING
public static final String KEY_FORM_DATA
public static final String KEY_LOGIN_URL
public static final String KEY_LOGIN_FORM_DATA
public static final String KEY_HTTP_AUTH
public static final String KEY_HTTP_AUTH_UID
public static final String KEY_HTTP_AUTH_PASSWORD
public static final String KEY_LOGOUT_URL
Constructor Detail |
public Fetcher(Map config) throws MalformedURLException
Constructor method
config
- The Map needs lot of entries and the object type as defined.
MalformedURLException
- The Exceptionpublic Fetcher(Map configMap, boolean ubt, String ubtAppendUrlSt) throws MalformedURLException
Constructor method
configMap
- the MAPubtAppendUrlSt
- ubt
- Whether to track links outside portal
MalformedURLException
Method Detail |
public static String getContentEncoding(String contentType, byte[] bytes, String MIMEType, String profileCharset)
This method determines the charset based on the contentType header if it is available (only applies to http(s) urls), or from the inputEncoding property if it is non-blank, or from the meta tag in content, e.g. meta tag in html, xml or wml header if they are available (only applies to HTML, XML, WML).
profileCharset
- contentType
- If http(s) urls, null otherwisebytes
- Bytes from the scraped contentMIMEType
- MIMEType for the content
public StringBuffer getFilteredContent(int timeOut, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String urlAsString)
timeOut
- req
- res
- urlAsString
-
public void logout(int timeOut, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
timeOut
- req
- res
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |