Provides methods and instance variables that are applicable to the page associated with the current request. Every requested page will generate a new MarinerPageContext object.
The top level (first) canvas with the request will initialise the top level stacks and global objects such as the styling engine within the MarinerPageContext.
An included canvas will push its status onto the various stacks held within the MarinerPageContext and remove those from the stack on completion of that canvases rendering.
If this page is being rendered inside a region then the DeviceLayoutContext is added to the RegionInstance of the including region instead of being released here.
An outOfContextInclusion is a page which was created in either a servlet, or a JSP page but which was not initialised by a canvas and so limits the information which can be inherited
Refactoring
This class has grown quite substantially since it was first created and has reached the point where it is becoming quite unmanageable. It has 2 distinct but related uses. As the internal request context, and the canvas context. It would be better if this was split into a couple of different related classes each of which is geared towards the different use made of it. This would have significant savings in terms of wasted space.
Obviously refactoring can introduce bugs so it must be done with great care and even greater understanding of the uses made of it as it will have a wide impact on the code.
@mock.generate