|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portlet.dining.dao.ScreenScrapingDiningMenuDaoImpl
public class ScreenScrapingDiningMenuDaoImpl
Dining menu DAO capable of collecting menu information vi screen scraping HTML content. This implementation should only be used if no more structured content can be made available.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
ScreenScrapingDiningMenuDaoImpl()
|
|
| Method Summary | |
|---|---|
protected String |
getCleanedHtmlContent(String html)
Get clean, valid HTML for the supplied HTML markup. |
List<String> |
getDiningHalls(javax.portlet.PortletRequest request)
Get the list of dining halls for a given portlet request. |
protected String |
getHtmlContent(String diningHall)
Get HTML content for the specified dining hall. |
DiningHall |
getMenu(javax.portlet.PortletRequest request,
String diningHall)
Get the menu for the specified dining hall. |
protected Menu |
getMenu(String xml)
Deserialize a menu from the provided XML. |
protected String |
getXml(String cleanHtml)
Get portlet-specific XML for clean, valid HTML. |
void |
setCache(net.sf.ehcache.Cache cache)
|
void |
setDiningHalls(List<String> diningHalls)
Set the list of dining hall names. |
void |
setPolicy(org.springframework.core.io.Resource config)
Set the AntiSamy policy to be used to clean and validate HTML content. |
void |
setXslt(org.springframework.core.io.Resource xslt)
Set the XSLT to use when transforming clean, valid HTML to portlet-specific XML. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public ScreenScrapingDiningMenuDaoImpl()
| Method Detail |
|---|
public void setCache(net.sf.ehcache.Cache cache)
public void setXslt(org.springframework.core.io.Resource xslt)
xslt -
public void setPolicy(org.springframework.core.io.Resource config)
throws org.owasp.validator.html.PolicyException,
IOException
config -
org.owasp.validator.html.PolicyException
IOExceptionpublic void setDiningHalls(List<String> diningHalls)
diningHalls - public List<String> getDiningHalls(javax.portlet.PortletRequest request)
IDiningMenuDao
getDiningHalls in interface IDiningMenuDao
public DiningHall getMenu(javax.portlet.PortletRequest request,
String diningHall)
IDiningMenuDao
getMenu in interface IDiningMenuDao
protected String getHtmlContent(String diningHall)
throws org.apache.http.client.ClientProtocolException,
IOException
diningHall -
org.apache.http.client.ClientProtocolException
IOException
protected String getCleanedHtmlContent(String html)
throws org.owasp.validator.html.ScanException,
org.owasp.validator.html.PolicyException
html -
org.owasp.validator.html.ScanException
org.owasp.validator.html.PolicyException
protected String getXml(String cleanHtml)
throws TransformerException,
IOException
cleanHtml -
TransformerException
IOException
protected Menu getMenu(String xml)
throws JAXBException
xml -
JAXBException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||