public void init(Object obj) { if (!Config.getBooleanProperty("ENABLE_SCRIPTING", false)) { return; } ViewContext context = (ViewContext) obj; this.request = context.getRequest(); ctx = context.getVelocityContext(); try { host = WebAPILocator.getHostWebAPI().getCurrentHost(request); } catch (PortalException e1) { Logger.error(this, e1.getMessage(), e1); } catch (SystemException e1) { Logger.error(this, e1.getMessage(), e1); } catch (DotDataException e1) { Logger.error(this, e1.getMessage(), e1); } catch (DotSecurityException e1) { Logger.error(this, e1.getMessage(), e1); } userAPI = WebAPILocator.getUserWebAPI(); try { user = userAPI.getLoggedInFrontendUser(request); backuser = userAPI.getLoggedInUser(request); respectFrontendRoles = true; } catch (Exception e) { Logger.error(this, "Error finding the logged in user", e); } }
public void init(Object obj) { if (!Config.getBooleanProperty("ENABLE_SCRIPTING", false)) { return; } ViewContext context = (ViewContext) obj; this.request = context.getRequest(); ctx = context.getVelocityContext(); this.request = context.getRequest(); this.response = context.getResponse(); }
public void init(Object obj) { ViewContext context = (ViewContext) obj; this.request = context.getRequest(); ctx = context.getVelocityContext(); }