Class PlainJSONSecureAnnotatedScreen
- java.lang.Object
-
- org.apache.turbine.modules.screens.RawScreen
-
- org.apache.turbine.modules.screens.PlainJSONScreen
-
- org.apache.turbine.modules.screens.PlainJSONSecureAnnotatedScreen
-
public class PlainJSONSecureAnnotatedScreen extends PlainJSONScreen
-
-
Field Summary
-
Fields inherited from class org.apache.turbine.modules.screens.PlainJSONScreen
BUFFER_SIZE, JSON_TYPE
-
Fields inherited from interface org.apache.turbine.modules.Screen
CACHE_SIZE_DEFAULT, CACHE_SIZE_KEY, NAME, PREFIX
-
-
Constructor Summary
Constructors Constructor Description PlainJSONSecureAnnotatedScreen()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doOutput(PipelineData pipelineData)
This method overrides the method in JSONScreen to perform a security check prior to producing the output.protected boolean
isAuthorized(PipelineData pipelineData)
Use this method to perform the necessary security check with Turbine annotationsTurbineRequiredRole
in a newly overriddendoOutput(PipelineData)
method.-
Methods inherited from class org.apache.turbine.modules.screens.PlainJSONScreen
getContentType
-
-
-
-
Constructor Detail
-
PlainJSONSecureAnnotatedScreen
public PlainJSONSecureAnnotatedScreen()
-
-
Method Detail
-
doOutput
public void doOutput(PipelineData pipelineData) throws Exception
This method overrides the method in JSONScreen to perform a security check prior to producing the output.- Overrides:
doOutput
in classPlainJSONScreen
- Parameters:
pipelineData
- Turbine information.- Throws:
Exception
- a generic exception.
-
isAuthorized
protected boolean isAuthorized(PipelineData pipelineData) throws Exception
Use this method to perform the necessary security check with Turbine annotationsTurbineRequiredRole
in a newly overriddendoOutput(PipelineData)
method.- Parameters:
pipelineData
- Turbine information.- Returns:
true
if the user is authorized to access the screen, by default it is required ACL is populated. IfTurbineRequiredRole
is not set, it is allowed by default- Throws:
Exception
- A generic exception.
-
-