lib/Renderer/PageRenderer.js
function PageRenderer(req, res) {
    var page = req.attrs.page;
    Object.defineProperties(this, {
        req: {
            value: req
        },
        res: {
            value: res
        },
        page: {
            value: _.clone(page)
        },
        themeDBAction: {
            value: DBActions.getInstance(req, THEME_SCHEMA)
        },
        layoutDBAction: {
            value: DBActions.getInstance(req, LAYOUT_SCHEMA)
        },
        pageInstanceDBAction: {
            value: DBActions.getAuthInstance(req, PAGE_SCHEMA, PAGE_PERMISSION_SCHEMA)
        },
        pluginInstanceDBAction: {
            value: DBActions.getInstance(req, PLUGIN_INSTANCE_SCHEMA)
        },
        pagePermissionValidator: {
            value: new PermissionValidator(req, PAGE_PERMISSION_SCHEMA, PAGE_SCHEMA)
        },
        pluginPermissionValidator: {
            value: new PermissionValidator(req, PLUGIN_PERMISSION_SCHEMA, PLUGIN_INSTANCE_SCHEMA)
        },
        isExclusive: {
            value: req.query && req.query.mode === "exclusive"
        }
    });
}
function PageRenderer(req, res) {
    var page = req.attrs.page;
    Object.defineProperties(this, {
        req: {
            value: req
        },
        res: {
            value: res
        },
        page: {
            value: _.clone(page)
        },
        themeDBAction: {
            value: DBActions.getInstance(req, THEME_SCHEMA)
        },
        layoutDBAction: {
            value: DBActions.getInstance(req, LAYOUT_SCHEMA)
        },
        pageInstanceDBAction: {
            value: DBActions.getAuthInstance(req, PAGE_SCHEMA, PAGE_PERMISSION_SCHEMA)
        },
        pluginInstanceDBAction: {
            value: DBActions.getInstance(req, PLUGIN_INSTANCE_SCHEMA)
        },
        pagePermissionValidator: {
            value: new PermissionValidator(req, PAGE_PERMISSION_SCHEMA, PAGE_SCHEMA)
        },
        pluginPermissionValidator: {
            value: new PermissionValidator(req, PLUGIN_PERMISSION_SCHEMA, PLUGIN_INSTANCE_SCHEMA)
        },
        isExclusive: {
            value: req.query && req.query.mode === "exclusive"
        }
    });
}
function PageRenderer ( req , res ) { var page = req . attrs . page ; Object . defineProperties ( this , { req : { value : req } , res : { value : res } , page : { value : _ . clone ( page ) } , themeDBAction : { value : DBActions . getInstance ( req , THEME_SCHEMA ) } , layoutDBAction : { value : DBActions . getInstance ( req , LAYOUT_SCHEMA ) } , pageInstanceDBAction : { value : DBActions . getAuthInstance ( req , PAGE_SCHEMA , PAGE_PERMISSION_SCHEMA ) } , pluginInstanceDBAction : { value : DBActions . getInstance ( req , PLUGIN_INSTANCE_SCHEMA ) } , pagePermissionValidator : { value : new PermissionValidator ( req , PAGE_PERMISSION_SCHEMA , PAGE_SCHEMA ) } , pluginPermissionValidator : { value : new PermissionValidator ( req , PLUGIN_PERMISSION_SCHEMA , PLUGIN_INSTANCE_SCHEMA ) } , isExclusive : { value : req . query && req . query . mode === "exclusive" } } ) ; }
Constructor to create PageRenderer to render page for current request
@param req
@param res
@constructor
Constructor to create PageRenderer to render page for current request