Class VelocitySecureScreen

  • All Implemented Interfaces:
    Assembler, Screen

    public abstract class VelocitySecureScreen
    extends VelocityScreen
    VelocitySecureScreen Always performs a Security Check that you've defined before executing the doBuildTemplate(). You should extend this class and add the specific security check needed. If you have a number of screens that need to perform the same check, you could make a base screen by extending this class and implementing the isAuthorized(). Then each screen that needs to perform the same check could extend your base screen.
    Version:
    $Id$
    Author:
    Dave Bryson, Peter Courcoux
    • Method Detail

      • doBuildTemplate

        protected abstract void doBuildTemplate​(PipelineData pipelineData,
                                                org.apache.velocity.context.Context context)
                                         throws Exception
        Implement this to add information to the context.
        Overrides:
        doBuildTemplate in class VelocityScreen
        Parameters:
        pipelineData - Turbine information.
        context - Context for web pages.
        Throws:
        Exception - a generic exception.
      • isAuthorized

        protected abstract boolean isAuthorized​(PipelineData pipelineData)
                                         throws Exception
        Implement this method to perform the security check needed. You should set the template in this method that you want the user to be sent to if they're unauthorized. See the VelocitySecurityCheck utility.
        Parameters:
        pipelineData - Turbine information.
        Returns:
        True if the user is authorized to access the screen.
        Throws:
        Exception - a generic exception.