Security Context APIs

JReport provides a set of APIs to support the Security Context feature, including JReport Designer API and JReport Server API.

JReport Designer API

JRSecurityContextFactory

Package: jet.acl.api

Usage: This interface is used to help the user to create an instance of SecurityContext.

Method: getSecurityContext(javax.swing.JFrame frame, java.util.Vector roles)

Parameters:

Returns: The SecurityContext object.

JRSecurityUserDataSource

Package: jet.datasource

Usage: A JRSecurityUserDataSource provides data to JReport for generating reports. The JRSecurityUserDataSource class is developed by users of JReport. It can provide data from a flat file, non-relational database, or application data.

The data returned by this class is in ResultSet object, so users will need to create a ResultSet instance. Then, JReport will use the instance to fetch the data. Users can also create their own ResultSet class.

Method: getResultSet(SecurityContext sc, java.lang.String param)

Method description: Gets the data in ResultSet according to parameters.

Parameters:

Returns: The ResultSet object.

JRSecurityHierarchicalDataSource

Package: jet.datasource

Usage: A JRSecurityHierarchicalDataSource provides data to JReport for generating reports. The JRSecurityHierarchicalDataSource class is developed by users of JReport. It can provide data from a flat file, non-relational database, or application data.

The data returned by this class is in JRHierarchicalDataset object, so users will need to create a JRHierarchicalDataset instance. Then, JReport will use the instance to fetch the data. Users can also create their own JRHierarchicalDataset class.

Method: getHierarchicalDataset(SecurityContext sc, java.lang.String param)

Method description: Gets the data in JRSecurityHierarchicalDataset according to the security context and parameters

Parameters:

Returns: The JRHierarchicalDataset object.

JReport Server API

SecurityContextFactory

Package: jet.server.api

Usage: SecurityContextFactory is an interface that is used to help you implement security context.

Method: getSecurityContext(java.lang.String realmName, java.lang.String userName, java.lang.String resource, int versionNumber)

Method description: Returns the SecurityContext of a specified resource.

Parameters:

Returns: The SecurityContext of the specified resource.

SecurityContext

Package: jet.server.api

Usage: SecurityContext is an interface that is used to help you implement security context.

Methods: