|
|||||||||||||||||||
| This license of Clover is provided to support the development of Flock only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| FlockTapestryEngine.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
package net.sf.flock.webapp; |
|
| 2 |
|
|
| 3 |
import javax.servlet.ServletContext; |
|
| 4 |
|
|
| 5 |
import net.sf.flock.SubscriptionManagerI; |
|
| 6 |
import net.sf.tapestry.IRequestCycle; |
|
| 7 |
import net.sf.tapestry.RequestContext; |
|
| 8 |
import net.sf.tapestry.engine.SimpleEngine; |
|
| 9 |
|
|
| 10 |
public class FlockTapestryEngine extends SimpleEngine {
|
|
| 11 |
|
|
| 12 |
private static final String[] pageNames = { "Home", "Subscriptions" };
|
|
| 13 |
|
|
| 14 | 0 |
public String[] getPageNames() {
|
| 15 | 0 |
return pageNames; |
| 16 |
} |
|
| 17 |
|
|
| 18 |
/** |
|
| 19 |
* @see net.sf.tapestry.engine.AbstractEngine#setupForRequest(net.sf.tapestry.RequestContext) |
|
| 20 |
*/ |
|
| 21 | 0 |
protected void setupForRequest(RequestContext requestContext) {
|
| 22 | 0 |
super.setupForRequest(requestContext); |
| 23 |
|
|
| 24 | 0 |
ServletContext ctx = requestContext.getServlet().getServletContext(); |
| 25 | 0 |
FlockContext.setSubscriptionManager( (SubscriptionManagerI) ctx.getAttribute("flock.subscriptionManager") );
|
| 26 |
|
|
| 27 |
} |
|
| 28 |
|
|
| 29 |
/** |
|
| 30 |
* @see net.sf.tapestry.engine.AbstractEngine#cleanupAfterRequest(net.sf.tapestry.IRequestCycle) |
|
| 31 |
*/ |
|
| 32 | 0 |
protected void cleanupAfterRequest(IRequestCycle cycle) {
|
| 33 | 0 |
super.cleanupAfterRequest(cycle); |
| 34 |
|
|
| 35 | 0 |
FlockContext.setSubscriptionManager(null); |
| 36 |
} |
|
| 37 |
|
|
| 38 |
} |
|
| 39 |
|
|
||||||||||