catch (IllegalArgumentException ignore)
{
}
resourceURL.setCacheability(ResourceURL.PORTLET);
assertEquals(ResourceURL.PORTLET, resourceURL.getCacheability());
return new InvokeGetResponse(resourceURL.toString());
}
});
seq.bindAction(1, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
{
protected Response run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
{
assertEquals(ResourceURL.PORTLET, request.getCacheability());
//
try
{
response.createActionURL();
fail();
}
catch (IllegalStateException ignore)
{
}
//
try
{
response.createRenderURL();
fail();
}
catch (IllegalStateException ignore)
{
}
//
ResourceURL resourceURL = response.createResourceURL();
assertEquals(ResourceURL.PORTLET, resourceURL.getCacheability());
//
try
{
resourceURL.setCacheability(ResourceURL.PAGE);
fail();
}
catch (IllegalStateException ignore)
{
}
assertEquals(ResourceURL.PORTLET, resourceURL.getCacheability());
//
resourceURL.setCacheability(ResourceURL.PORTLET);
assertEquals(ResourceURL.PORTLET, resourceURL.getCacheability());
//
return new InvokeGetResponse(resourceURL.toString());
}
});
seq.bindAction(2, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
{
protected Response run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
{
assertEquals(ResourceURL.PORTLET, request.getCacheability());
ResourceURL resourceURL = response.createResourceURL();
assertEquals(ResourceURL.PORTLET, resourceURL.getCacheability());
resourceURL.setCacheability(ResourceURL.FULL);
assertEquals(ResourceURL.FULL, resourceURL.getCacheability());
return new InvokeGetResponse(resourceURL.toString());
}
});
seq.bindAction(3, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
{
protected Response run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
{
assertEquals(ResourceURL.FULL, request.getCacheability());
//
try
{
response.createActionURL();
fail();
}
catch (IllegalStateException ignore)
{
}
//
try
{
response.createRenderURL();
fail();
}
catch (IllegalStateException ignore)
{
}
//
ResourceURL resourceURL = response.createResourceURL();
assertEquals(ResourceURL.FULL, resourceURL.getCacheability());
//
try
{
resourceURL.setCacheability(ResourceURL.PORTLET);
fail();
}
catch (IllegalStateException ignore)
{
}
assertEquals(ResourceURL.FULL, resourceURL.getCacheability());
//
try
{
resourceURL.setCacheability(ResourceURL.PAGE);
fail();
}
catch (IllegalStateException ignore)
{
}
assertEquals(ResourceURL.FULL, resourceURL.getCacheability());
//
resourceURL.setCacheability(ResourceURL.FULL);
assertEquals(ResourceURL.FULL, resourceURL.getCacheability());
//
return new InvokeGetResponse(resourceURL.toString());
}
});
seq.bindAction(4, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
{
protected Response run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException