public class PageGenerator extends ServiceableGenerator
| Modifier and Type | Field and Description | 
|---|---|
private ContentTypeExtensionPoint | 
_contentTypeExtPt  | 
private ContentTypesHelper | 
_contentTypeHelper  | 
private ContentTypesAssignmentHandler | 
_cTypeAssignmentHandler
The content type assignment handler. 
 | 
private DynamicContentTypeDescriptorExtentionPoint | 
_dynamicCTDescriptorEP  | 
private PageResourceAccess | 
_pageAccess
The monitored resource access 
 | 
private RenderingContextHandler | 
_renderingContextHandler  | 
private ResourceAccessComponent | 
_resourceAccessMonitor
The resource access monitoring component 
 | 
private ServicesAssignmentHandler | 
_serviceAssignmentHandler
The service assignment handler. 
 | 
private ServiceExtensionPoint | 
_serviceExtPt  | 
private SkinsManager | 
_skinsManager  | 
private TagProviderExtensionPoint | 
_tagProviderEP  | 
private Logger | 
_timeLogger  | 
private WorkspaceSelector | 
_workspaceSelector  | 
private PageElementCache | 
_zoneItemCache  | 
private int | 
_zoneItemsInCache  | 
private int | 
_zoneItemsSaxed  | 
private int | 
_zonesSaxed  | 
managerobjectModel, parameters, resolver, sourcecontentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer| Constructor and Description | 
|---|
PageGenerator()  | 
| Modifier and Type | Method and Description | 
|---|---|
private SkinTemplate | 
_getTemplateDefinition(Page page)
Get the template definition for a page 
 | 
private String | 
_getType(ZoneItem zoneItem)  | 
private void | 
_handleZoneAccess(PageElementResourceAccess zoneAccess,
                 boolean cacheable,
                 boolean hit)  | 
private Zone | 
_inherit(Page childPage,
        Page page,
        String zoneName)
Try to inherit the zone (as it is empty) 
 | 
private void | 
_saxAvailableContentTypes(Page page,
                         String zoneName)
Generate the list of available content types for the given zone. 
 | 
private void | 
_saxAvailableServices(Page page,
                     String zoneName)
Generate the list of available services for the given zone. 
 | 
private Object | 
_saxContentZoneItem(ZoneItem zoneItem,
                   ContentHandler handler,
                   Request request)  | 
private void | 
_saxCSSFile(ContentHandler handler,
           ClientSideElement.ScriptFile cssFile)  | 
private void | 
_saxError(ContentHandler handler,
         Throwable e)  | 
private Object | 
_saxServiceZoneItem(ZoneItem zoneItem,
                   ContentHandler handler,
                   Exception ex)  | 
private void | 
_saxSource(ContentHandler handler,
          Source src,
          Exception ex)  | 
private void | 
_saxZone(Page page,
        String zoneName,
        AmetysObjectIterable<? extends ZoneItem> zoneItems,
        String workspace,
        String site,
        RenderingContext renderingContext)
Sax a zone 
 | 
private void | 
_saxZoneItem(Page page,
            String workspace,
            String site,
            RenderingContext renderingContext,
            Request request,
            ZoneItem zoneItem)  | 
private void | 
_saxZoneItems(Page page,
             AmetysObjectIterable<? extends ZoneItem> zoneItems,
             String workspace,
             String site,
             RenderingContext renderingContext)
Sax zone items 
 | 
private boolean | 
_throwException(Exception ex)
Test if the error has to be thrown instead of SAXing it as an error zone item. 
 | 
void | 
generate()  | 
void | 
service(ServiceManager serviceManager)  | 
disposerecycle, setupsetConsumer, setContentHandler, setLexicalHandlerenableLogging, getLogger, setupLogger, setupLogger, setupLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetConsumerprivate ServiceExtensionPoint _serviceExtPt
private ContentTypeExtensionPoint _contentTypeExtPt
private SkinsManager _skinsManager
private TagProviderExtensionPoint _tagProviderEP
private PageElementCache _zoneItemCache
private WorkspaceSelector _workspaceSelector
private RenderingContextHandler _renderingContextHandler
private ContentTypesHelper _contentTypeHelper
private DynamicContentTypeDescriptorExtentionPoint _dynamicCTDescriptorEP
private ContentTypesAssignmentHandler _cTypeAssignmentHandler
private ServicesAssignmentHandler _serviceAssignmentHandler
private ResourceAccessComponent _resourceAccessMonitor
private PageResourceAccess _pageAccess
private int _zoneItemsInCache
private int _zoneItemsSaxed
private int _zonesSaxed
private Logger _timeLogger
public PageGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface Serviceableservice in class ServiceableGeneratorServiceExceptionpublic void generate() throws IOException, SAXException, ProcessingException
private void _saxZone(Page page, String zoneName, AmetysObjectIterable<? extends ZoneItem> zoneItems, String workspace, String site, RenderingContext renderingContext) throws SAXException, IOException, ProcessingException
page - The pagezoneName - The zone in the page to saxzoneItems - The items of the zone or nullworkspace - the workspacesite - the site's namerenderingContext - the rendering contextSAXException - if an error occurs while saxingIOException - if an I/O exception occursProcessingException - if an error occursprivate void _saxAvailableServices(Page page, String zoneName) throws SAXException
page - the page.zoneName - the zone name in the page.SAXException - if something goes wrong when saxing the available servicesprivate void _saxAvailableContentTypes(Page page, String zoneName) throws SAXException
page - the page.zoneName - the zone name in the page.SAXException - if something goes wrong when saxing the available content typesprivate void _saxZoneItems(Page page, AmetysObjectIterable<? extends ZoneItem> zoneItems, String workspace, String site, RenderingContext renderingContext) throws SAXException, IOException, ProcessingException
page - the pagezoneItems - The zone items to saxworkspace - the workspacesite - the site's namerenderingContext - the rendering contextSAXException - if an error occurs while saxingIOException - if an I/O exception occursProcessingException - if an error occursprivate void _handleZoneAccess(PageElementResourceAccess zoneAccess, boolean cacheable, boolean hit)
private void _saxZoneItem(Page page, String workspace, String site, RenderingContext renderingContext, Request request, ZoneItem zoneItem) throws SAXException, ProcessingException, IOException
private Object _saxContentZoneItem(ZoneItem zoneItem, ContentHandler handler, Request request) throws SAXException, MalformedURLException, IOException
private Object _saxServiceZoneItem(ZoneItem zoneItem, ContentHandler handler, Exception ex) throws SAXException, MalformedURLException, IOException
private void _saxCSSFile(ContentHandler handler, ClientSideElement.ScriptFile cssFile) throws SAXException
SAXExceptionprivate void _saxSource(ContentHandler handler, Source src, Exception ex) throws SAXException, IOException, ProcessingException
private SkinTemplate _getTemplateDefinition(Page page)
page - The page. Cannot be null.private Zone _inherit(Page childPage, Page page, String zoneName)
childPage - The child page that do inherit. Cannot be nullpage - The page to inherit. Cannot be nullzoneName - The zone name in the page to inherit. Cannot be null or emptyprivate boolean _throwException(Exception ex)
ex - the exception.private void _saxError(ContentHandler handler, Throwable e) throws SAXException
SAXException