IEngineServiceView engine,
IRequestCycle cycle,
ResponseOutputStream output)
throws ServletException, IOException
{try { __CLOVER_80_0.M[461]++;
__CLOVER_80_0.S[2010]++;IDirect direct;
__CLOVER_80_0.S[2011]++;int count = 0;
__CLOVER_80_0.S[2012]++;String componentPageName;
__CLOVER_80_0.S[2013]++;IPage componentPage;
__CLOVER_80_0.S[2014]++;RequestContext requestContext = cycle.getRequestContext();
__CLOVER_80_0.S[2015]++;String[] serviceContext = getServiceContext(requestContext);
__CLOVER_80_0.S[2016]++;if ((((serviceContext != null) && (++__CLOVER_80_0.CT[378] != 0)) || (++__CLOVER_80_0.CF[378] == 0))){
__CLOVER_80_0.S[2017]++;count = serviceContext.length;}
__CLOVER_80_0.S[2018]++;if ((((count != 3 && count != 4) && (++__CLOVER_80_0.CT[379] != 0)) || (++__CLOVER_80_0.CF[379] == 0))){
__CLOVER_80_0.S[2019]++;throw new ApplicationRuntimeException(
Tapestry.getMessage("DirectService.context-parameters"));}
__CLOVER_80_0.S[2020]++;boolean complex = count == 4;
__CLOVER_80_0.S[2021]++;int i = 0;
__CLOVER_80_0.S[2022]++;String stateful = serviceContext[i++];
__CLOVER_80_0.S[2023]++;String pageName = serviceContext[i++];
__CLOVER_80_0.S[2024]++;if ((((complex) && (++__CLOVER_80_0.CT[380] != 0)) || (++__CLOVER_80_0.CF[380] == 0))){
__CLOVER_80_0.S[2025]++;componentPageName = serviceContext[i++];}
else{
__CLOVER_80_0.S[2026]++;componentPageName = pageName;}
__CLOVER_80_0.S[2027]++;String componentPath = serviceContext[i++];
__CLOVER_80_0.S[2028]++;IPage page = cycle.getPage(pageName);
__CLOVER_80_0.S[2029]++;cycle.activate(page);
__CLOVER_80_0.S[2030]++;if ((((complex) && (++__CLOVER_80_0.CT[381] != 0)) || (++__CLOVER_80_0.CF[381] == 0))){
__CLOVER_80_0.S[2031]++;componentPage = cycle.getPage(componentPageName);}
else{
__CLOVER_80_0.S[2032]++;componentPage = page;}
__CLOVER_80_0.S[2033]++;IComponent component = componentPage.getNestedComponent(componentPath);
__CLOVER_80_0.S[2034]++;try
{
__CLOVER_80_0.S[2035]++;direct = (IDirect) component;
}
catch (ClassCastException ex)
{
__CLOVER_80_0.S[2036]++;throw new ApplicationRuntimeException(
Tapestry.format("DirectService.component-wrong-type", component.getExtendedId()),
component,
null,
ex);
}
// Check for a StateSession only the session was stateful when
// the Gesture was created.
__CLOVER_80_0.S[2037]++;if ((((stateful.equals(STATEFUL_ON) && direct.isStateful()) && (++__CLOVER_80_0.CT[382] != 0)) || (++__CLOVER_80_0.CF[382] == 0))){
{
__CLOVER_80_0.S[2038]++;HttpSession session = cycle.getRequestContext().getSession();
__CLOVER_80_0.S[2039]++;if ((((session == null || session.isNew()) && (++__CLOVER_80_0.CT[383] != 0)) || (++__CLOVER_80_0.CF[383] == 0))){
__CLOVER_80_0.S[2040]++;throw new StaleSessionException(
Tapestry.format(
"DirectService.stale-session-exception",
direct.getExtendedId()),
direct.getPage());}
}}
__CLOVER_80_0.S[2041]++;Object[] parameters = getParameters(cycle);
__CLOVER_80_0.S[2042]++;cycle.setServiceParameters(parameters);
__CLOVER_80_0.S[2043]++;direct.trigger(cycle);
// Render the response. This will be the response page (the first element in the context)
// unless the direct (or its delegate) changes it.
__CLOVER_80_0.S[2044]++;engine.renderResponse(cycle, output);