Intellicus supports ‘Callback Events’. This feature allows Intellicus to raise particular event on execution of a specific task. The events raised are received by call back code. By receiving all these events users will be able to perform all necessary actions according to their needs.
Java programmers can leverage their existing code by calling them from various Callback events thrown by Intellicus.
For programming, Intellicus takes the compiled java code. Intellicus publishes Interface classes in iCallback.jar
Implement the interface corresponding to the requested event type.
After compilation of its class and creating its Jar File, place it in the lib folder of ReportEngine i.e. <Intellicus Installed Path>/ReportEngine/lib
Make entries of these class names in eventshandlers.xml placed in Config folder of ReportEngine. Intellicus provides following types of Callback events and their methods:
ReportEvents
- afterReportExecution
- beforeReportExecution
- beforeURLAssign
- beforeParamsInitialization
Connection Events
- beforeConnectionGet
- afterConnectionGet
- beforeConnectionSubmit
UMM Events
- afterOrganizationCreate
- afterRoleCreate
- afterUserCreate
- afterUserModify
ReportMgmtEvents
- afterCategoryAdded
- afterCategoryModify
- afterCategoryDelete
- afterReportAdded
- afterReportModify
- afterReportDelete
ROMgmtEvents
- afterReportObjectAdded
- afterReportObjectModify
- afterReportObjectDelete
General Configuration
To configure an event,
- You need to set value of EVENTSHANDLER TYPE tag. This tag is found in configuration file <Intellicus install path>ReportEngineConfig eventshandlers.xml.
- The name of the IMPLEMENTOR class should be mentioned in the EVENTS configuration XML file.
For example, in case of Report Events,
<EVENTSHANDLERS> <EVENTSHANDLER TYPE=”REPORTEVENTS”> <CALLBACK CALLTYPE="1"> <IMPLEMENTER TYPE="1"> <ATTRS TYPE="1"> <ATTR NAME="PATH”> <VALUE>com.mypackage.myclass</VALUE> </ATTR> </ATTRS> </IMPLEMENTER> </CALLBACK> </ EVENTSHANDLER> </ EVENTSHANDLERS>
For each type of callback event there would be one class and corresponding entry in the configuration XML. eventshandlers.xml may contain multiple event handlers. Event Handler, if defined in configuration file automatically performs initialization with default implementation.
Report Events
Intellicus provides an interface class “ReportEvents”. This interface class enforces the below given methods for various events. Intellicus integrator may write a java class to overwrite the default impelementaion of one or more methods in this interface.
Configuration
For implementing Report Events, EVENTSHANDLER TYPE should be: REPORTEVENTS.
Following code shows the XML entry having configuration of Report Events.
<EVENTSHANDLERS> <EVENTSHANDLER TYPE=”REPORTEVENTS”> <CALLBACK CALLTYPE="1"> <IMPLEMENTER TYPE="1"> <ATTRS TYPE="1"> <ATTR NAME="PATH”> <VALUE>com.mypackage.myclass</VALUE> </ATTR> </ATTRS> </IMPLEMENTER> </CALLBACK> </ EVENTSHANDLER> </ EVENTSHANDLERS>
During callback events process Intellicus Report Server will call these methods:
Object beforeReportExecution(): Gather the callback event information before the execution of a Report from the java class using HashMap as object.
void afterReportExecution(Object eventInfo): Provide the callback event Infomation after the execution of a Report to the java class using HashMap as object.
Object beforeURLAssign(Object eventInfo): Provide the callback event Infomation before the execution of a URL to the java class using HashMap as object and will gather the modified URL from the java class using HashMap as object.
void beforeParamsInitialization(Object eventInfo): Provide the callback event Infomation before the initialization of Parameters while running Report. It basically provides a mechanism of doing some pre-processing on the parameters.
Sample Implementation code
import com.impetus.interaj.callback.ReportEvents;
public class SampleReportEventHandlerWithImpl extends ReportEvents{
/* Default Constructor. */
public SampleReportEventHandlerWithImpl () throws Exception
{
}
BEFORE REPORT EXECUTION
To get the details from user before report gets executed. This event will be triggered just before the execution of Report in Intellicus.
The following methods of the class will be called in this event.
Object beforeReportExecution()
This method returns an Object which is generally a HashMap object that stores as a key, String that specify the property and as a value, a String that specifies the customizations on that property. The HashMap can have the following fields:
CONNECTION_NAME => Name of the connection.
If a connection object is needed, then provide the name of the connection as a string.
The method should return a HashMap of information as Java class object.
The HashMap is scanned for these key-values.
Event Info Hash Map
Key | Value |
CONNECTION_NAME | If you need a connection object other than the connection used to execute the report, then provide the name of the connection as a string.
If this key doesn’t exist or it is blank, then the connection used for executing the report will be provided in setEventInfo call. |
OPERATION_TYPE | The operation performed on the report.
SAVE = Report was requested for saving by UI or by scheduler. In this case, SAVED_OUTPUT_ID is also available in this HashMap for future use. EXEC = The report was requested for viewing on the UI. In this case, SAVE_OUTPUT_ID will be blank or null. PRINT = The report was requested for printing on the UI or on the server side. In this case, SAVE_OUTPUT_ID will be blank or null. |
USER_INFO | Hash Map of USER_INFO.
HashMap userInfo = (HashMap) eventInfo.get(“USER_INFO”) ; String appID = (String)userInfo.get (“USER_ID”); Refer to USER_INFO table below for values inside this HashMap. |
SYS_PARAMS | Hash Map of all System Parameters passed to the Report.
KEY of each element is the name of the system parameter name and VALUE is the string of parameter value. |
USER_PARAMS | Hash Map of all user parameters passed to the report.
KEY of each element is the parameter name and VALUE is the string of parameter value. |
beforeReportExecution
public Object beforeReportExecution() throws Exception { return new HashMap(); }
Place the logical code in above method.
AFTER REPORT EXECUTION
To set the details after report get executed. . This event is triggered after Report Execution.
The following method of the class will be called in this event.
void afterReportExecution(Object eventInfo)
This method is to provide the information related to the report execution to the callback class. It takes an Object eventInfo as parameter which is generally a HashMap object that store as a key, String that specify the property and as a value, a String or HashMap that specifies the customizations on that property.
The Hash Map has either strings or Hash Maps in turn as values. The keys in the hash maps are the key words mentioned below or parameters passed to the report.
The HashMap contains following values:
Key | Value | REPORT_ID: String
|
The REPORT_ID of the executed report. For example:
String reportID = (String) eventInfo.get (“REPORT_ID”); |
CATEGORY_ID: String | The CATEGORY_ID of the executed report. |
REPORT_OID: String |
The REPORT_OID (Report output ID) of the executed report. |
SAVED_OUTPUT_ID: String |
The output id of saved report.
Useful for referencing a saved report for Viewing. |
TIME_SPENT: | Time spent in execution of report in milliseconds. |
OUTPUT_TIME:
|
Time stamp of execution completion in Java time stamp milliseconds. |
FORMAT: String | Output format requested such as PDF, HTM etc. The saved report can further be viewed in any other format irrespective to this format. |
USER_INFO | Hash Map of USER_INFO.
HashMap userInfo = (HashMap) eventInfo.get(“USER_INFO”) ; String appID = (String)userInfo.get (“USER_ID”); Refer to USER_INFO table below for values inside this HashMap. |
PARAMS_INFO | Hash Map of PARAMS_INFO. Refer to PARAMS_INFO table below. |
CONNECTION | Java.sql.connection class object :
The connection, which was used to execute the report or requested in the getEventInfo call. The connection is in opened state and you have to keep it in the same state by end of the call. This connection is provided from the connection pool of Intellicus database connections. |
OPERATION_TYPE | The operation performed on the report.
SAVE = Report was requested for saving by UI or by scheduler. In this case, SAVED_OUTPUT_ID is also available in this HashMap for future use. EXEC = The report was requested for viewing on the UI. In this case, SAVE_OUTPUT_ID will be blank or null. PRINT = The report was requested for printing on the UI or on the server side. In this case, SAVE_OUTPUT_ID will be blank or null. |
ERROR_CODE |
NULL or Blank if no error occurred.
Contains the error code / number if any error occurs in the execution of the report. |
ERROR_MESSAGE | Error message if any error occurs. |
ERROR_ROOT_CAUSE | Descriptive error message in case an error occurred. |
SYS_PARAMS | Hash-Map of all System Parameters passed to the Report.
KEY of each element is the name of the system parameter name and VALUE is the string of parameter value. |
USER_PARAMS |
Hash Map of all user parameters passed to the report.
KEY of each element is the parameter name and VALUE is the string of parameter value.
|
afterReportExecution
public void afterReportExecution(Object eventInfo) throws Exception { //Get the saved report id in case a report is being saved String execType = (String) eventInfoMap.get("OPERATION_TYPE"); if (execType.equals("SAVE")) // operation type was SAVE { String errorCode = (String) eventInfoMap.get ("ERROR_CODE"); if (errorCode != null ) // means report was successfully // executed and saved ! { String reportSaveID = (String) eventInfoMap.get("SAVED_OUTPUT_ID"); } } }
Place the logical code in above method.
BEFORE URL ASSIGN
To get the modified URL. This event will be triggered if the report has hyper-link set for any of its corresponding column.
Passed URL can be:
- Absolute URL
- DrillDown Report.
The following method of the class will be called in this event.
Object beforeURLAssign(Object eventInfo)
This method is used by the Intellicus Report Server to provide a mechanism of doing some pre-processing on the URL being embedded within the report.
This method is to provide the information related to the report execution to the callback class. It takes an Object eventInfo as parameter which is generally a HashMap object that store as a key, String that specify the property and as a value, a String or HashMap that specifies the customizations on that property.
The HashMap contains following values:
Key | Value |
URL : String | The drilldown URL |
REPORT_ID: String | The REPORT_ID of the executed report. For eg.
String reportID = (String) eventInfo.get (“REPORT_ID”); |
CATEGORY_ID: String | The CATEGORY_ID of the executed report. |
REPORT_OID: String | The REPORT_OID (Report output ID) of the executed report. |
SAVED_OUTPUT_ID: String | The output id of saved report. Useful for referencing a saved report for Viewing. |
FORMAT: String | String: Output format requested such as PDF , HTM etc. The saved report can further be viewed in any other format irrespective to this format. |
TIME_SPENT: long | Time spent in execution of report in milliseconds. |
OUTPUT_TIME: long | Time stamp of execution completion in Java time stamp milliseconds. |
USER_INFO |
Hash Map of USER_INFO.
HashMap userInfo = (HashMap) eventInfo.get(“USER_INFO”) ; String appID = (String)userInfo.get (“USER_ID”); Refer to USER_INFO table below for values inside this HashMap. |
PARAMS_INFO | Hash Map of PARAMS_INFO.
Refer to PARAMS_INFO table below. |
OPERATION_TYPE | The operation performed on the report.
SAVE = Report was requested for saving by UI or by scheduler. In this case, SAVED_OUTPUT_ID is also available in this HashMap for future use. EXEC = The report was requested for viewing on the UI. In this case, SAVE_OUTPUT_ID will be blank or null. PRINT = The report was requested for printing on the UI or on the server side. In this case, SAVE_OUTPUT_ID will be blank or null.
|
User Info Hash Map
Key | Value |
USER_ID | USER ID passed to Report Server for execution of report. |
PASSWORD | Password passed to Report Server for execution of report. |
ORG_ID | ORGID passed to Report Server for execution of report. |
SESSION_ID | Session id. |
SECURITY_DESCRIPTOR | Security Descriptor string. |
CUSTOMER_ID | Customer id, for Service Provider deployments. |
LOCATION | Location. |
LOCALE | Locale setting of browser. |
TIME_STAMP | Time of request in Java time stamp milliseconds. |
DB_NAME | Data base name. |
ROLES | Roles granted to the user. |
CONNECTION_NAME | Connection name requested to use for the report. |
Params Info Hash Map
Key | Value |
SYS_PARAMS | Hash Map of all System Parameters passed to the Report.
KEY of each element is the name of the system parameter name and VALUE is the string of parameter value. |
USER_PARAMS | Hash Map of all user parameters passed to the report.
KEY of each element is the parameter name and VALUE is the string of parameter value. |
This code will be called for all those reports having Hyper-link set corresponding in its column. To modify the URL only for specific Reports, implementation code needs to be modified as per requirement.
beforeURLAssign
public Object beforeURLAssign(Object eventInfoMap) { //This HashMap will return an assigned URL String url = (String)((HashMap)eventInfoMap).get("URL"); //This HashMap will return a UserInfo HashMap which contains user_id and password of Logged in User. HashMap userInfo = (HashMap)((HashMap)eventInfoMap).get("USER_INFO"); //Get User id from userInfo hashMap by passing USER_ID key. //This is when the passed URL is for drilldown to any Intellicus report. if(url.contains("DRILLDOWN")){ //Write your Custom code in case of drill down Reports } //This is when the passed URL is an absolute URL. else{ //Url String contains URL:~TARGET=0:SRC= additional value in a URL. //Below line of code is used to get Initial prefix of URL. String initialURlPrefix = url.substring(0,url.indexOf("SRC=")+"SRC=".length()); //Below line of code is used to get orginal URL. String originalURL = url.substring(url.indexOf("SRC=")+"SRC=".length()); //Below condition check wheter given url contains any parameter or not. //Custom code to get modified url originalURL = getURL(originalURL); //Append intial prefix of URL and original Url to form a new URL. url = initialURlPrefix + originalURL; } //create a HashMap Object HashMap hmapModifiedURL = new HashMap(); //put modified url in a created HashMap hmapModifiedURL.put("URL", url); //Return above HashMap to calling function. return hmapModifiedURL; }
When the passed URL is for drilldown to any Intellicus report.
if(url.contains("DRILLDOWN")){ //Write your Custom code here }
When the passed URL is an absolute URL.
else{ //Write your Custom code here }
Place the logical code in above method
BEFORE PARAMETERS INITIALIZATION
This method is used by Intellicus Report Server to provide a mechanism of doing some pre-processing on the User Parameters.
The following method of the class will be called in this event.
public void beforeParamsInitialization(java.lang.Object eventInfo) throws java.lang.Exception
This method takes a HashMap Object eventInfo that store as a key, String that specify the property and as a value, a String that specifies the customizations on that property. The HashMap contains following values.
The HashMap contains following values.
Key | Value |
OPERATION_TYPE: String | The operation performed on the report like SAVE,EXEC,PRINT etc. |
OUTPUT_TIME : long | Time stamp of execution completion in Java time stamp milliseconds. |
USER_INFO | Hash Map of USER_INFO.
HashMap userInfo = (HashMap) eventInfo.get(“USER_INFO”) ; String appID = (String)userInfo.get (“USER_ID”); Refer to USER_INFO table below for values inside this HashMap.
|
USER_PARAMS: HashMap | Hash Map of all user parameters passed to the report. KEY of each element is the parameter name and VALUE is the string of parameter value. |
User Info Hash Map
Key | Value |
USERINFO_USERID | USER ID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_ORGID | ORGID passed to Report Server for execution of report. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIME_STAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DB_NAME | Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
This code will be called to provide a mechanism of doing some pre-processing on the parameters
beforeURLAssign
public Object beforeParamsInitialization(Object eventInfo) { //The HashMap contains following values. // 1) OPERATION_TYPE String => The operation performed on the report like SAVE,EXEC,PRINT etc // 2) OUTPUT_TIME long => Time stamp of execution completion in Java time stamp milliseconds. // 3) USER_INFO HashMap => Hash Map of USER_INFO which contains following values. // 4) USER_PARAMS HashMap => Hash Map of all user parameters passed to the report. // KEY of each element is the parameter name and VALUE is the string of parameter value. HashMap paramsInfoMap = (HashMap) eventInfo; //Get USER_PARAMS HashMap HashMap userParamsMap = (HashMap) paramsInfoMap.get("USER_PARAMS"); System.out.println(userParamsMap.keySet()); //Here sample code assumes that USER_PARAMS hashmap contains 2 user parameter with name START_TIME & END_TIME //which host application wants to update before Params Initialization //Get START_TIME, a sample user parameter, from userParamsMap String StartParam = (String)userParamsMap.get("START_TIME"); //If StartParam is not null then update START_TIME if(StartParam != null) { // Update START_TIME in userParamsMap // Here host application will replace START_TIME parameter with actual time after proper calculation userParamsMap.put("START_TIME", new Date().toString()); System.out.println("Parameter START_TIME found"); } //Get END_TIME, a sample user parameter,user parameter from userParamsMap String EndParam = (String)userParamsMap.get("END_TIME"); //If EndParam is not null then update END_TIME if(EndParam != null) { // Update END_TIME in userParamsMap // Here host application will replace END_TIME parameter with actual time after proper calculation userParamsMap.put("END_TIME", new Date().toString()); System.out.println("Parameter END_TIME found"); }
Place the logical code in above method
User Mapping
Application user needs to be mapped with Intellicus user.
Figure 5: User Mapping
Connection Events
Intellicus provides a class “ConnectionEvents”. This class provides the below given methods. Intellicus integrator has to write a java class, which must extend this class for Intellicus to call a sequence of methods.
Configuration
For implementing Connection Events, EVENTSHANDLER TYPE should be: CONNECTIONEVENTS.
Following code shows the XML entry having configuration of Connection Events.
<EVENTSHANDLER TYPE=” CONNECTIONEVENTS”> <CALLBACK CALLTYPE="1"> <IMPLEMENTER TYPE="1"> <ATTRS TYPE="1"> <ATTR NAME="PATH”> <VALUE>com.mypackage.myclass</VALUE> </ATTR> </ATTRS> </IMPLEMENTER> </CALLBACK> </ EVENTSHANDLER>
During callback events process Intellicus Report Server will call these methods:
Object beforeConnectionGet(Object connInfo): Get callback event information before the connection of any operation is being get from the connection pool. Gather these information from the java class using HashMap as object.
- Object afterConnectionGet(Object connInfo): Set the callback event Infomation after the connection of any operation is being get from connection pool Provide these information to the java class using HashMap as object.
- Object beforeConnectionSubmit(Object connInfo): Get callback event information before the connection of any operation is being submitted back to the connection pool. Gather these information from the java class using HashMap as object.
Sample Implementation code
import com.impetus.interaj.callback.ConnectionEvents;
public class SampleConnectionCallbackEvent extends ConnectionEvents {
}
BEFORE CONNECTION GET
To get the Connection Name along with other parameters before a connection is get from connection pool.
The following method of the class will be called in this event.
Object beforeConnectionGet(Object connInfo)
Intellicus call backs an event before getting a connection from connection pool. There might be situation that clients want to change connection on which a particular operation is to be performed. So here Intellicus first raises an event (i.e. beforeConnectionGet) before getting a connection from connection pool. It provides the connection name in the callback code. The callback code may change the connection name for particular operation. Intellicus should receive the updated connection name and should also use the updated connection for the execution of an operation.
This callback event executes each time Intellicus tries to get a connection from Connection Pool.
This callback event happens for non-repository connections only.
This event can be raised for the execution of following components.
- Chart Execution
- Crosstab Execution
- Main Report Execution
- Sub Report Execution
Event Info Hash Map
Key | Value |
CONNECTION_NAME | Name of a Connection. |
OBJECT_TYPE | Operation is performed for which type of object: Chart, Crosstab etc. |
OBJECT_ID | Object Id. |
IS_DEFAULT | Connection is default or not. |
IS_REPOSITORY | Connection is repository connection or not. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
SYS_PARAMS | Hash Map of all System Parameters passed to the Report.
KEY of each element is the name of the system parameter name and VALUE is the string of parameter value. |
USER_PARAMS | Hash Map of all user parameters passed to the report.
KEY of each element is the parameter name and VALUE is the string of parameter value. |
beforeConnectionGet
public Object beforeConnectionGet(Object beforeConnInfo){ String conName = (String)((HashMap)beforeConnInfo).get("CONNECTION_NAME"); String isDefault = (String)((HashMap)beforeConnInfo).get("IS_DEFAULT"); String isRepository = (String)((HashMap)beforeConnInfo).get("IS_REPOSITORY"); System.out.println("Connection Name : "+conName); System.out.println("Is Connection Default : "+isDefault); System.out.println("Is Connection Repository : "+isRepository); return beforeConnInfo; }
Place the logical code in above method.
AFTER CONNECTION GET
To get the Connection Details if connections get successfully from the connection pool.
The following method of the class will be called in this event.
Object afterConnectionGet(Object connInfo)
Intellicus can callback an event when it gets any connection from a connection pool. Intellicus Application supports pooling of data sources connections. A connection is acquired at the time of report execution/Chart Query Execution/Cross tab Query Execution/Sub Report Query Execution etc. A client may want to change some data source property while getting the connection. So Intellicus can callback an event (i.e. afterConnectionGet) on a callback instance whenever a connection is acquired from the pool. It can also provide the connection object to the callback event. The call back code may change Connection Properties so that Intellicus receives the updated connection object to use further.
- This callback event executes each time a connection is acquired.
- This call back happens for non-repository connections only.
- This event is raised for the execution of following components.
- Chart Execution
- Crosstab Execution
- Main Report Execution
- Sub Report Execution
Event Info Hash Map
Key | Value |
CONNECTION | Entire java.sql.connection object. |
CONNECTION_NAME | Name of a Connection. |
IS_DEFAULT | Connection is default or not. |
IS_REPOSITORY | Connection is repository connection or not. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
SYS_PARAMS | Hash Map of all System Parameters passed to the Report.
KEY of each element is the name of the system parameter name and VALUE is the string of parameter value. |
USER_PARAMS | Hash Map of all user parameters passed to the report.
KEY of each element is the parameter name and VALUE is the string of parameter value. |
afterConnectionGet
public Object afterConnectionGet(Object afterConnInfo){ Connection c = (Connection)((HashMap)afterConnInfo).get("CONNECTION"); System.out.println("Connection "+c.toString()); String conName = (String)((HashMap)afterConnInfo).get("CONNECTION_NAME"); String isDefault = (String)((HashMap)afterConnInfo).get("IS_DEFAULT"); String isRepository = (String)((HashMap)afterConnInfo).get("IS_REPOSITORY"); HashMap userDetail = (HashMap)((HashMap)afterConnInfo).get("USER_INFO"); String userId = (String)((HashMap)userDetail).get("USERINFO_USERID"); String orgId = String)((HashMap)userDetail).get("USERINFO_ORGID"); System.out.println("Conn Name : "+conName); System.out.println("Is Conn Default : "+isDefault); System.out.println("Is Conn Repository : "+isRepository); System.out.println("User Id : "+userId); System.out.println("Org Id : "+orgId); return afterConnInfo; }
Place the logical code in above method.
BEFORE CONNECTION SUBMIT
To get the Connection Details before connection is submitted back to the connection pool.
The following method of the class will be called in this event.
Object beforeConnectionSubmit(Object connInfo)
Intellicus supports callback event for the operation of submitting any connection back to connection pool. As Intellicus gives access to set some properties while getting any connection from connection pool, so clients may need to reset those properties that are being set at the time of connection retrieval. Intellicus raises a callback event (i.e. beforeConnectionSubmit) on a callback instance. It also provides the connection object to the callback event. So in the call back code clients may reset Connection Properties. And Intellicus should receive the updated connection object from callback code of client.
- This call back event executes each time a connection is submitted back to connection pool.
- This call back happens for non-repository connections only.
- This event can be raised for the execution of following components.
- Chart Execution
- Crosstab Execution
- Main Report Execution
- Sub Report Execution
Event Info Hash Map
Key | Value |
CONNECTION | Entire java.sql.connection object. |
PROVIDER | Database Provider. |
CONNECTION_NAME | Name of a Connection. |
REPORT_ID | Report Id. |
REPORT_NAME | Report Name. |
CATEGORY_ID | Category Id. |
CATEGORY_NAME | Category Name. |
OBJECT_TYPE | Operation is performed for which type of object: Chart, Crosstab etc. |
OBJECT_ID | Object Id. |
USER_PARAMS | User parameters. |
IS_DEFAULT | Connection is default or not. |
IS_REPOSITORY | Connection is repository connection or not. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
USER INFO HASH MAP
Key | Value |
USERINFO_USERID | USER ID passed to Report Server for execution of report. |
USERINFO_ORGID | ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
beforeConnectionSubmit
public Object beforeConnectionSubmit(Object beforeConnInfo){ String conName = (String)((HashMap)beforeConnInfo).get("CONNECTION_NAME"); String isDefault = (String)((HashMap)beforeConnInfo).get("IS_DEFAULT"); String isRepository = (String)((HashMap)beforeConnInfo).get("IS_REPOSITORY"); HashMap userDetail = (HashMap)((HashMap)beforeConnInfo).get("USER_INFO"); String userId = (String)((HashMap)userDetail).get("USERINFO_USERID"); String orgId = (String)((HashMap)userDetail).get("USERINFO_ORGID"); System.out.println("Conn Name : "+conName); System.out.println("Is Conn Default : "+isDefault); System.out.println("Is Conn Repository : "+isRepository); System.out.println("User Id : "+userId); System.out.println("Org Id : "+orgId); return beforeConnInfo; }
Place the logical code in above method.
UMM Events
Intellicus facilitates callback events mechanism for User Management. These events will be triggered whne any User management activity like, User creation, Role creation, Organization creation or User modification takes place.
Configuration
For implementing UMM Events, EVENTSHANDLER TYPE should be: UMMEVENTS.
Following code shows the XML entry having configuration of UMM Events.
<EVENTSHANDLER TYPE=”UMMEVENTS”> <CALLBACK CALLTYPE="1"> <IMPLEMENTER TYPE="1"> <ATTRS TYPE="1"> <ATTR NAME="PATH”> <VALUE>com.mypackage.myclass</VALUE> </ATTR> </ATTRS> </IMPLEMENTER> </CALLBACK> </ EVENTSHANDLER>
During callback events process Intellicus Report Server will call these methods:
- void afterOrganizationCreate(Object orgInfo): Provide the callback event Infomation after the new Organization is created. Provide these information to the java class using HashMap as object.
- void afterRoleCreate(Object roleInfo): Provide the callback event Infomation after the new Role is created. Provide this information to the java class using HashMap as object.
- void beforeUserCreate(Object userInfo): Provide the callback event Infomation before the new User is created. Provide these information to the java class using HashMap as object.
- void afterUserCreate(Object userInfo): Provide the callback event Infomation after the new User is created. Provide this information to the java class using HashMap as object.
- void beforeUserModify(Object userInfo): Provide the callback event Infomation before any User is modified. Provide these information to the java class using HashMap as object.
- void afterUserModify(Object userModInfo): Provide the callback event Infomation after the existing User is modified. Provide this information to the java class using HashMap as object.
Sample Implementation code
import com.impetus.interaj.callback.UMMEvents;
public class SampleUMMCallbackEvent extends UMMvents {
}
AFTER ORGANIZATION CREATE
To get the Organization details when new organization is being added to Intellicus. This event is triggered After Organization is created.
The following method of the class will be called in this event.
void afterOrganizationCreate(Object orgInfo)
Intellicus supports callback event for new organization creation in Application. In Intellicus, users are allowed to create new organization. So at the time new organization is created, Intellicus raises a callback event (i.e. afterOrganizationCreate) on the call back instance. It also provides the organization related information to the callback event. So at the callback code clients may view all organization properties.
This callback event executes each time a new organization is being created in Intellicus.
Event Info Hash Map
Key | Value |
ORGANIZATION_ID | Organization Id. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
USER_INFO Hash Map
Key | Value |
USERINFO_USERID | USER ID passed to Report Server for execution of report. |
USERINFO_ORGID | ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterOranizationCreate
public void afterOrganizationCreate(Object orgInfo){ String orgId = (String)((HashMap)orgInfo).get("ORGANIZATION_ID"); System.out.println("Organization Id : "+orgId); HashMap userDetail = (HashMap) ((HashMap)orgInfo).get("USER_INFO"); System.out.println("User Id : "+userDetail.get("USERINFO_USERID")); System.out.println("Organization Id : "+userDetail.get("USERINFO_ORGID")); }
Place the logical code in above method.
AFTER ROLE CREATE
To get Role details when new Role is being added to Intellicus. This event is triggered after new role is created.
The following method of the class will be called in this event.
he logical code in above method.
void afterRoleCreate(Object roleInfo)
Intellicus supports callback event for new role creation in Application. In Intellicus, users are allowed to create new roles. So at the time new role is created, Intellicus raises a callback event (i.e. afterRoleCreate) on a callback instance. It also provides the Role related information to the callback event. So at the callback code clients may view all Role related properties.
This callback event executes each time, a new Role is being created in Intellicus.
Event Info Hash Map
Key | Value |
ROLE_ID | Role Id. |
ORGANIZATION_ID | Organization Id in which role is being added. |
USER INFO HASHMAP
Key | Value |
USERINFO_USERID | USER ID passed to Report Server for execution of report. |
USERINFO_ORGID | ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterRoleCreate
public void afterRoleCreate(Object roleInfo){ String roleId = (String)((HashMap)roleInfo).get("ROLE_ID"); String orgId = (String)((HashMap)roleInfo).get("ORGANIZATION_ID"); String rStatus= (String)((HashMap)roleInfo).get("ROLE_STATUS"); String rAdmin =(String)((HashMap)roleInfo).get("ROLE_ADMIN"); String sysPriveleges = (String)((HashMap)roleInfo).get("SYSTEM_PRIVILEGES"); System.out.println("Role -- Role Id"+roleId); System.out.println("Role -- Organization Id"+orgId); System.out.println("Role -- Role Status"+ rStatus); System.out.println("Role -- Role Admin"+ rAdmin); System.out.println("Role -- System Priveleges"+sysPriveleges); }
Place the logical code in above method.
BEFORE USER CREATE
User details when new User is being added to Intellicus. This event is triggered just before the new User is created.
The following method of the class will be called in this event.
void beforeUserCreate(Object userInfo)
Intellicus supports callback event for new user creation in Application. In Intellicus Admins /Super Admins are allowed to create new users. So at the time new user is created, Intellicus raises a callback event (i.e. beforeUserCreate) on the call back instance. It also provides the User related information i.e. User ID and Passowrd to the callback event.
This callback event executes each time before a new User is being created in Intellicus.
UserInfo Hash Map
Key | Value |
USER_ID | User Id. |
PASSWORD | User Password. |
beforeUserCreate
//This method will be used to view User Information in callback code. //This event will be raised each time before a User is created. public void beforeUserCreate(Object userInfo){ System.out.println("inside beforeUserCreate()..............."); String userId = (String)((HashMap)userInfo).get("USER_ID"); String password = (String)((HashMap)userInfo).get("PASSWORD"); System.out.println("User Id---"+userId); System.out.println("Passowrd ---"+password); }
Place the logical code in above method.
AFTER USER CREATE
User details when new User is being added to Intellicus. This event is triggered just after new User is created.
The following method of the class will be called in this event.
void afterUserCreate(Object userInfo)
Intellicus supports callback event for new user creation in Application. In Intellicus Admins /Super Admins are allowed to create new users. So at the time new user is created, Intellicus raises a callback event (i.e. afterUserCreate) on the call back instance. It also provides the User related information to the callback event. So in the call back code clients may view all User related properties or various privileges assigned to user.
This callback event executes each time a new User is being created in Intellicus.
Event Info Hash Map
Key | Value |
USER_ID | User Id. |
DESCRIPTION | User Description. |
USER_STATUS | User Status, Whether the User is Active or suspended. |
ORGANIZATION_ID | Organization Id in which User is being added. |
PASSWORD | User Password. |
IS_FIRST_LOGIN | Is user login for the first time or not? |
IS_BALNK_PASSWORD | Is the password blank or not. |
PWD_LAST_CHANGED | Date when password changed last time. |
IS_SUPER_ADMIN | Is the user is Super Admin or not. |
IS_ADMIN | Is the User is Admin or not. |
SYSTEM_PRIVILEGES | System Privileges assigned to user. |
USER_PREFERENCES | Hash Map of User Preferences set for the user. Refer to USER_PREFERENCES table below for values inside this HashMap. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
USER PREFERENCES HASHMAP
Key | Value |
DEFAULT_FORMAT | Default Format set for the user. |
LANG | Default Language set for the user. |
THEME | Default Theme set for the user. |
DEFAULT_DASHBOARD | Default Dashboard set for the user. |
SHOW_RECENT_REPORTS | Whether Recent Reports to be shown or not. |
SHOW_RECENT_REP_PUBLISHED | Whether Recent Published Reports to be shown or not. |
REPORT_CACHE_SIZE | Report Cache Size. |
Email Id of the newly added user. | |
APPID | Id of the user who is setting user preferences. |
ORGID | Organization Id of the user who is setting user preferences. |
DEFAULT_CONNECTION | Default Connection set for the user. |
RUNTIME_USER_ID | Runtime User Id of the user. |
RUNTIME_PASSWORD | Runtime Password of the user. |
TEMPLATE_NAME | Template name set for the user. |
USE_EMAIL_FOR | Returns ENUMS values for which
Email has to be sent. (0=WORKFLOW_APPROVAL, 1=ASYNCHRONOUS_REPORT_ COMPLETION, 2=MEMORY_TRIGGER, 3=EXEC_REJECT) |
USER INFO HASHMAP
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterUserCreate
public void afterUserCreate(Object userInfo){ System.out.println("inside afterUserCreate()................"); String userId = (String)((HashMap)userInfo).get("USER_ID"); String orgId = (String)((HashMap)userInfo).get("ORGANIZATION_ID"); String userStatus = (String)((HashMap)userInfo).get("USER_STATUS"); String isSuperAdmin = (String)((HashMap)userInfo).get("IS_SUPER_ADMIN"); String isAdmin = (String)((HashMap)userInfo).get("IS_ADMIN"); HashMap userPref = (HashMap) ((HashMap)userInfo).get("USER_PREFERENCES"); String defFormat = (String)((HashMap)userPref).get("DEFAULT_FORMAT"); String lang = (String)((HashMap)userPref).get("LANG"); String theme = (String)((HashMap)userPref).get("THEME"); String templateName = (String)((HashMap)userPref).get("TEMPLATE_NAME"); String repCacheSize = (String)((HashMap)userPref).get("REPORT_CACHE_SIZE"); String defDashboard = (String)((HashMap)userPref).get ("DEFAULT_DASHBOARD"); System.out.println("User Id---"+userId); System.out.println("Org Id---"+orgId); System.out.println("User Status---"+userStatus); System.out.println("Is Super Admin---"+isSuperAdmin); System.out.println("Is Admin---"+isAdmin); System.out.println("defFormat---"+defFormat); System.out.println("language---"+lang); System.out.println("Theme---"+theme); System.out.println("Template Name---"+templateName); System.out.println("Report Cache Size---"+repCacheSize); System.out.println("Default Dashboard ---"+defDashboard); }
Place the logical code in above method.
BEFORE USER MODIFY
User details when existing User is being modified in Intellicus. This event is triggered just before modifying the User details.
The following method of the class will be called in this event.
void beforeUserModify(Object userInfo)
Whenever any existing user is modified in Intellicus, in the call back code, clients will get the details of the user getting modified. User details will be available in call back as UserInfo parameter which is a hashmap that contains User Information.
The HashMap contains following values.
Key | Value |
USER_ID | User Id. |
PASSWORD | User Password. |
PWD_LAST_CHANGED | Date when password changed last time. |
IS_UPDATE_PASSWORD | True if password is changed. |
beforeUserModify
//This method will be used to view User Information in callback code. //This event will be raised each time before any existing User is modified. public void beforeUserModify(Object userInfo){ System.out.println("inside beforeUserModify()........."); String userId= (String)((HashMap)userInfo).get("USER_ID"); String password= (String)((HashMap)userInfo).get("PASSWORD"); String date=(String) ((HashMap)userInfo).get("PWD_LAST_CHANGED"); String isPsswordUpdated = (String)((HashMap)userInfo).get("IS_UPDATE_PASSWORD"); System.out.println("User Id---"+userId); System.out.println("Passowrd ---"+password); System.out.println("Passowrd Changed ---"+isPsswordUpdated); System.out.println("Password Last Changed ---"+date); }
Place the logical code in above method.
AFTER USER MODIFY
User details when existing User is being modified in Intellicus. This event is triggered just after modifying the User details.
The following method of the class will be called in this event.
void afterUserModify(Object userInfo)
Whenever any existing user is modified in Intellicus, in the call back code, clients will get all the details of the user modified. User details will be available in call back.
Key | Value |
USER_ID | User Id. |
DESCRIPTION | User Description. |
USER_STATUS | User Status, Whether the User is Active or suspended. |
ORGANIZATION_ID | Organization Id of the modified user. |
PASSWORD | User Password. |
IS_FIRST_LOGIN | Is user login for the first time or not? |
IS_BALNK_PASSWORD | Is the password blank or not. |
PWD_LAST_CHANGED | Date when password changed last time. |
IS_SUPER_ADMIN | Is the user is Super Admin or not. |
IS_ADMIN | Is the User is Admin or not. |
SYSTEM_PRIVILEGES | System Privileges assigned to user. |
USER_PREFERENCES | Hash Map of User Preferences set for the user. Refer to USER_PREFERENCES table below for values inside this HashMap. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
USER PREFERENCES HASHMAP
Key | Value |
DEFAULT_FORMAT | Default Format set for the user. |
LANG | Default Language set for the user. |
THEME | Default Theme set for the user. |
DEFAULT_DASHBOARD | Default Dashboard set for the user. |
SHOW_RECENT_REPORTS | Whether Recent Reports to be shown or not. |
SHOW_RECENT_REP_PUBLISHED | Whether Recent Published Reports to be shown or not. |
REPORT_CACHE_SIZE | Report Cache Size. |
Email Id of a user. | |
APPID | Id of the user who is setting user preferences. |
ORGID | Organization id of the user who is setting user preferences. |
DEFAULT_CONNECTION | Default Connection set for the user. |
RUNTIME_USER_ID | Runtime User Id of the user. |
RUNTIME_PASSWORD | Runtime Password of the user. |
TEMPLATE_NAME | Template name set for the user. |
USE_EMAIL_FOR | Returns ENUMS values for which
Email has to be sent. (0=WORKFLOW_APPROVAL, 1=ASYNCHRONOUS_REPORT_ COMPLETION, 2=MEMORY_TRIGGER, 3=EXEC_REJECT) |
USER INFO HASHMAP
Key | Value |
USERINFO_USERID | USER ID passed to Report Server for execution of report. |
USERINFO_ORGID | ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterUserModify
public void afterUserModify(Object modUserInfo) { System.out.println("Inside after User Modified()........."); String userId = (String)((HashMap)modUserInfo).get("USER_ID"); String orgId = (String)((HashMap)modUserInfo).get ("ORGANIZATION_ID"); String userStatus = (String)((HashMap)modUserInfo).get ("USER_STATUS"); String isSuperAdmin = (String)((HashMap)modUserInfo).get ("IS_SUPER_ADMIN"); String isAdmin= (String)((HashMap)modUserInfo).get("IS_ADMIN"); HashMap userPref=(HashMap) ((HashMap)modUserInfo).get ("USER_PREFERENCES"); String defFormat = (String)((HashMap)userPref).get ("DEFAULT_FORMAT"); String lang = (String)((HashMap)userPref).get("LANG"); String theme = (String)((HashMap)userPref).get("THEME"); String templateName = (String)((HashMap)userPref).get("TEMPLATE_NAME"); String repCacheSize = (String)((HashMap)userPref).get ("REPORT_CACHE_SIZE"); String defDashboard = (String)((HashMap)userPref).get ("DEFAULT_DASHBOARD"); System.out.println("User Id---"+userId); System.out.println("Org Id---"+orgId); System.out.println("User Status---"+userStatus); System.out.println("Is Super Admin---"+isSuperAdmin); System.out.println("Is Admin---"+isAdmin); System.out.println("defFormat---"+defFormat); System.out.println("language---"+lang); System.out.println("Theme---"+theme); System.out.println("Template Name---"+templateName); System.out.println("Report Cache Size---"+repCacheSize); System.out.println("Default Dashboard ---"+defDashboard); }
Place the logical code in above method.
REPORTMGMTEVENTS
Intellicus facilitates Auditing callback events mechanism for Report Management Operations by “calling your code” system. For this, Intellicus provides a class “ReportMgmtEvents”.
Configuration
For implementing ReportMgmtEvents, EVENTSHANDLER TYPE should be: REPORTMGMTEVENTS.
Following code shows the XML entry having configuration of UMM Events.
<EVENTSHANDLER TYPE=” REPORTMGMTEVENTS”> <CALLBACK CALLTYPE="1"> <IMPLEMENTER TYPE="1"> <ATTRS TYPE="1"> <ATTR NAME="PATH”> <VALUE>com.mypackage.myclass</VALUE> </ATTR> </ATTRS> </IMPLEMENTER> </CALLBACK> </ EVENTSHANDLER>
During callback events process Intellicus Report Server will call these methods:
- void afterCategoryAdd(Object categoryInfo): Provides the callback event Infomation after a new Category is added in Intellicus. Provides this information to the java class using HashMap as object.
- void afterCategoryModify(Object categoryInfo): Provides the callback event Infomation after any existing Category is modified in Intellicus. Provides this information to the java class using HashMap as object.
- void afterCategoryDelete(Object categoryInfo): Provides the callback event Infomation after any Category is deleted in Intellicus. Provides this information to the java class using HashMap as object.
- void afterReportAdd(Object reportInfo): Provides the callback event Infomation after a new Report is added in Intellicus. Provides this information to the java class using HashMap as object.
- void afterReportModify(Object reportInfo): Provides the callback event Infomation after any existing Report is modified in Intellicus. Provides this information to the java class using HashMap as object.
- void afterReportDelete(Object reportInfo): Provides the callback event Infomation after any Report is deleted in Intellicus. Provides this information to the java class using HashMap as object.
Sample Implementation code
import com.impetus.interaj.callback.ReportMgmtEvents;
public class ReportMgmtCallbackImpl extends AuditEvents {
}
AFTER CATEGORY ADD
To get the Category details when new Category is being added to Intellicus. This event is triggered after Category is created.
The following method of the class will be called in this event.
void afterCategoryAdd(java.lang.Object categoryInfo)
Intellicus supports callback event for new Category creation in Application. In Intellicus, users are allowed to create new Categories. So at the time new Category is created, Intellicus raises a callback event (i.e. afterCategoryAdd) on the call back instance. It also provides the Category related information to the callback event. So at the callback code clients may view all Categoryproperties.
This callback event executes each time a new Category is created in Intellicus.
Event Info Hash Map
Key | Value |
CATEGORY_OBJECT | Category (Web client’s class com.intellica.client.reportutils.
Category) object of added category. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
USER_INFO HashMap
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterCategoryAdd
public void afterCategoryAdd(Object catInfo){ System.out.println("Inside afterCategoryAdd()"); //Get the Category(com.intellica.client.reportutils.Category) //object of added category. Category catObject = (Category)((HashMap)catInfo).get ("CATEGORY_OBJECT"); System.out.println("Category Name : "+catObject.getMenuName()); System.out.println("CategoryDesc:"+catObject.getDescription()); System.out.println("Category isPublic = "+catObject.getIsPublic()); System.out.println("Created Date : "+catObject.getRepositDate()); System.out.println("Category Access Rights : "+catObject.getAccessRights()); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)catInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("End Of afterCategoryAdd()! "); }
Place the logical code in above method.
AFTER CATEGORY MODIFY
This method will be used to Audit modified Category Information in callback code. This event will be raised each time any existing category object is modified.
The following method of the class will be called in this event.
void afterCategoryModify(java.lang.Object categoryInfo)
Event Info Hash Map
Key | Value |
CATEGORY_OBJECT | Category (Web client’s class com.intellica.client.reportutils.
Category) object of modified category. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
User Info Hash Map
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterCategoryModify
public void afterCategoryModify(Object catInfo){ System.out.println("Inside afterCategoryModify() "); //Get the Category(com.intellica.client.reportutils.Category) //object of modified category. Category catObject = (Category)((HashMap)catInfo).get("CATEGORY_OBJECT"); System.out.println("Category Name : "+catObject.getMenuName()); System.out.println("Category Description : "+catObject.getDescription()); System.out.println("Category isPublic = "+catObject.getIsPublic()); System.out.println("Created Date : "+catObject.getRepositDate()); System.out.println("Category Access Rights : "+catObject.getAccessRights()); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)catInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("End Of afterCategoryModify()"); }
AFTER CATEGORY DELETE
This method will be used to Audit deleted Category Information in callback code. This event will be raised each time any category object is deleted.
The following method of the class will be called in this event.
void afterCategoryModify(java.lang.Object categoryInfo)
Event Info Hash Map
Key | Value |
CATEGORY_OBJECT | Category (Web client’s class com.intellica.client.reportutils.
Category) object of deleted category. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
User Info Hash Map
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterCategoryDelete
public void afterCategoryDelete(Object catInfo){ System.out.println("Inside afterCategoryDelete() "); //Get the Category(com.intellica.client.reportutils.Category) //object of modified category. Category catObject = (Category)((HashMap)catInfo).get("CATEGORY_OBJECT"); System.out.println("Category Name : "+catObject.getMenuName()); System.out.println("Category Description : "+catObject.getDescription()); System.out.println("Category isPublic = "+catObject.getIsPublic()); System.out.println("Created Date : "+catObject.getRepositDate()); System.out.println("Category Access Rights : "+catObject.getAccessRights()); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)catInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("End Of afterCategoryDelete()"); }
Place the logical code in above method.
AFTER REPORT ADD
This method will be used to Audit newly added Report Information in callback code. This event will be raised each time a new report is added.
The following method of the class will be called in this event.
void afterReportAdd(java.lang.Object reportInfo)
Event Info Hash Map
Key | Value |
REPORT_LAYOUT_OBJECT
|
IRL (Web client’s class com.impetus.intera.
layout.InteraReportLayout) / ARL (Web client’s com.impetus.intera.layout.adhoc. AdhocReportLayout) object of Report added. |
REPORTID | Report ID. |
REPORTNAME | Report Name. |
CATEGORYID | Id of category in which report added. |
VERSIONNO | Report Version No. |
VERSIONDATE | Report Version Date. |
DESIGNSTATUS | Design Status. |
DEPL_TYPE | Deployment Type. |
IRLVERSION | IRL version of report. |
LONGDESC | Description of report. |
TITLE | Report Title. |
PRINTSETTINGNAME | Print Settings set for the report. |
FORMAT | Default format set for the report in which report will execute. |
CONNECTION_NAME | Name of connection used for report. |
DSGN_MODE | Report design mode. |
CONTENT_TYPE | Content Type set for the report. |
REPOSITDATE | Reposit Date of an operation. |
APPID | Id of a user who added report. |
ORGID | Organization id of a user who added report. |
ISPUBLIC | Whether report is public or not. |
ISHIDDEN | Whether report is hidden or not. |
REPORT_SUMMARY | Report summary. |
PUBLISH_WORKFLOW_ID | Workflow id of a report. |
SRC_REPORTID | Id of a parent report which will be available only for link reports. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
User Info Hash Map
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID | ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterReportAdd
public void afterReportAdd(Object repInfo){ System.out.println("********** Inside afterReportAdded() *******"); System.out.println("Report ID="+((HashMap)repInfo).get("REPORTID")); System.out.println("Report Name="+((HashMap)repInfo). get("REPORTNAME")); System.out.println("Category ID="+((HashMap)repInfo).get ("CATEGORYID")); System.out.println("Version ID="+((HashMap)repInfo).get ("VERSIONID")); System.out.println("Version No.="+((HashMap)repInfo).get("VERSIONNO")); System.out.println("Version Date="+((HashMap)repInfo).get ("VERSIONDATE")); System.out.println("Design Status="+((HashMap)repInfo).get ("DESIGNSTATUS")); System.out.println("Deployment Type="+((HashMap)repInfo).get ("DEPL_TYPE")); System.out.println("IRL Version="+((HashMap)repInfo).get ("IRLVERSION")); System.out.println("Long Desc="+((HashMap)repInfo).get("LONGDESC")); System.out.println("Title = "+((HashMap)repInfo).get("TITLE")); System.out.println("Print Setting Name="+((HashMap)repInfo).get ("PRINTSETTINGNAME")); System.out.println("Report Format="+((HashMap)repInfo).get ("FORMAT")); System.out.println("Connection Name = "+((HashMap)repInfo).get("CONNECTION_NAME")); System.out.println("Design Mode = "+((HashMap)repInfo).get("DSGN_MODE")); System.out.println("Content Type = "+((HashMap)repInfo).get("CONTENT_TYPE")); System.out.println("Repository Date = "+((HashMap)repInfo).get("REPOSITDATE")); System.out.println("App ID = "+((HashMap)repInfo).get("APPID")); System.out.println("Org ID = "+((HashMap)repInfo).get("ORGID")); System.out.println("isPublic = "+((HashMap)repInfo).get("ISPUBLIC")); System.out.println("isHidden = "+((HashMap)repInfo).get("ISHIDDEN")); System.out.println("Report Summary = "+((HashMap)repInfo).get("REPORT_SUMMARY")); System.out.println("Publish Workflow Id = "+((HashMap)repInfo).get("PUBLISH_WORKFLOW_ID")); System.out.println("Source Report_ID = "+((HashMap)repInfo).get("SRC_REPORTID")); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)repInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("********** End Of afterReportAdded() *****"); }
AFTER REPORT MODIFY
This method will be used to Audit modified Report Information in callback code. This event will be raised each time any existing report is modified.
The following method of the class will be called in this event.
void afterReportModify(java.lang.Object reportInfo)
Event Info Hash Map
Key | Value |
REPORT_LAYOUT_OBJECT | IRL (Web client’s class com.impetus.intera.
layout.InteraReportLayout) / ARL (Web client’s com.impetus.intera.layout.adhoc. AdhocReportLayout) object of Report modified. If Report Design is updated, then only this attribute will contain IRL/ARL object otherwise it will contain null. |
REPORTID | Report ID. |
REPORTNAME | Report Name. |
CATEGORYID | Id of category in which report modifed. |
VERSIONNO | Report Version No. |
VERSIONDATE | Report Version Date. |
DESIGNSTATUS | Design Status. |
DEPL_TYPE | Deployment Type. |
IRLVERSION | IRL version of report. |
LONGDESC | Description of report. |
TITLE | Report Title. |
PRINTSETTINGNAME | Print Settings set for the report. |
FORMAT | Default format set for the report in which report will execute. |
CONNECTION_NAME | Name of connection used for report. |
DSGN_MODE | Report design mode. |
CONTENT_TYPE | Content Type. |
REPOSITDATE | Reposit Date of an operation. |
APPID | Id of a user who added report. |
ORGID | Organization id of a user who added report. |
ISPUBLIC | Whether report is public or not. |
ISHIDDEN | Whether report is hidden or not. |
REPORT_SUMMARY | Report summary. |
PUBLISH_WORKFLOW_ID | Workflow id of a report. |
SRC_REPORTID | Id of a parent or link report. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
User Info Hash Map
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterReportModify
public void afterReportModify (Object repInfo){ System.out.println("********** Inside afterReportModified() ****"); System.out.println("Report ID="+((HashMap)repInfo).get("REPORTID")); System.out.println("Report Name="+((HashMap)repInfo). get("REPORTNAME")); System.out.println("Category ID="+((HashMap)repInfo).get ("CATEGORYID")); System.out.println("Version ID="+((HashMap)repInfo).get ("VERSIONID")); System.out.println("Version No.="+((HashMap)repInfo).get("VERSIONNO")); System.out.println("Version Date="+((HashMap)repInfo).get ("VERSIONDATE")); System.out.println("Design Status="+((HashMap)repInfo).get ("DESIGNSTATUS")); System.out.println("Deployment Type="+((HashMap)repInfo).get ("DEPL_TYPE")); System.out.println("IRL Version="+((HashMap)repInfo).get ("IRLVERSION")); System.out.println("Long Desc="+((HashMap)repInfo).get("LONGDESC")); System.out.println("Title = "+((HashMap)repInfo).get("TITLE")); System.out.println("Print Setting Name="+((HashMap)repInfo).get ("PRINTSETTINGNAME")); System.out.println("Report Format="+((HashMap)repInfo).get("FORMAT")); System.out.println("Connection Name = "+((HashMap)repInfo).get("CONNECTION_NAME")); System.out.println("Design Mode = "+((HashMap)repInfo).get("DSGN_MODE")); System.out.println("Content Type = "+((HashMap)repInfo).get("CONTENT_TYPE")); System.out.println("Repository Date = "+((HashMap)repInfo).get("REPOSITDATE")); System.out.println("App ID = "+((HashMap)repInfo).get("APPID")); System.out.println("Org ID = "+((HashMap)repInfo).get("ORGID")); System.out.println("isPublic = "+((HashMap)repInfo).get("ISPUBLIC")); System.out.println("isHidden = "+((HashMap)repInfo).get("ISHIDDEN")); System.out.println("Report Summary = "+((HashMap)repInfo).get("REPORT_SUMMARY")); System.out.println("Publish Workflow Id = "+((HashMap)repInfo).get("PUBLISH_WORKFLOW_ID")); System.out.println("Source Report_ID = "+((HashMap)repInfo).get("SRC_REPORTID")); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)repInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("********** End Of afterReportModified() *****"); }
Place the logical code in above method.
AFTER REPORT DELETE
This method will be used to Audit deleted Report Information in callback code. This event will be raised each time any existing report is deleted.
The following method of the class will be called in this event.
void afterReportDelete(java.lang.Object reportInfo)
Event Info Hash Map
Key | Value |
Event REPORTID | Report ID. |
REPORTNAME | Report Name. |
CATEGORYID | Id of category from which report deleted. |
VERSIONNO | Report Version No. |
VERSIONDATE | Report Version Date. |
DESIGNSTATUS | Design Status. |
DEPL_TYPE | Deployment Type. |
IRLVERSION | IRL version of report. |
LONGDESC | Description of report. |
TITLE | Report Title. |
PRINTSETTINGNAME | Print Settings set for the report. |
FORMAT | Default format set for the report in which report will execute. |
CONNECTION_NAME | Name of connection used for report. |
DSGN_MODE | Report design mode. |
CONTENT_TYPE | Content Type. |
REPOSITDATE | Reposit Date of an operation. |
APPID | Id of a user who deleted report. |
ORGID | Organization id of a user who deleted report. |
ISPUBLIC | Whether report is public or not. |
ISHIDDEN | Whether report is hidden or not. |
REPORT_SUMMARY | Report summary. |
PUBLISH_WORKFLOW_ID | Workflow id of a report. |
SRC_REPORTID | Id of a parent or link report. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
User Info Hash Map
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterReportDelete
public void afterReportDelete(Object repInfo){ System.out.println("********** Inside afterReportDeleted() *******"); System.out.println("Report ID="+((HashMap)repInfo).get("REPORTID")); System.out.println("Report Name="+((HashMap)repInfo). get("REPORTNAME")); System.out.println("Category ID="+((HashMap)repInfo).get ("CATEGORYID")); System.out.println("Version ID="+((HashMap)repInfo).get ("VERSIONID")); System.out.println("Version No.="+((HashMap)repInfo).get("VERSIONNO")); System.out.println("Version Date="+((HashMap)repInfo).get ("VERSIONDATE")); System.out.println("Design Status="+((HashMap)repInfo).get ("DESIGNSTATUS")); System.out.println("Deployment Type="+((HashMap)repInfo).get ("DEPL_TYPE")); System.out.println("IRL Version="+((HashMap)repInfo).get ("IRLVERSION")); System.out.println("Long Desc="+((HashMap)repInfo).get("LONGDESC")); System.out.println("Title = "+((HashMap)repInfo).get("TITLE")); System.out.println("Print Setting Name="+((HashMap)repInfo).get ("PRINTSETTINGNAME")); System.out.println("Report Format="+((HashMap)repInfo).get ("FORMAT")); System.out.println("Connection Name = "+((HashMap)repInfo).get("CONNECTION_NAME")); System.out.println("Design Mode = "+((HashMap)repInfo).get("DSGN_MODE")); System.out.println("Content Type = "+((HashMap)repInfo).get("CONTENT_TYPE")); System.out.println("Repository Date = "+((HashMap)repInfo).get("REPOSITDATE")); System.out.println("App ID = "+((HashMap)repInfo).get("APPID")); System.out.println("Org ID = "+((HashMap)repInfo).get("ORGID")); System.out.println("isPublic = "+((HashMap)repInfo).get("ISPUBLIC")); System.out.println("isHidden = "+((HashMap)repInfo).get("ISHIDDEN")); System.out.println("Report Summary = "+((HashMap)repInfo).get("REPORT_SUMMARY")); System.out.println("Publish Workflow Id = "+((HashMap)repInfo).get("PUBLISH_WORKFLOW_ID")); System.out.println("Source Report_ID = "+((HashMap)repInfo).get("SRC_REPORTID")); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)repInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("********** End Of afterReportDeleted() *****"); }
Place the logical code in above method.
ROMGMTEVENTS
Intellicus facilitates Auditing callback events mechanism for Report Object Management Operations by “calling your code” system.
Intellicus provides a class “ReportObjectMgmtEvents”
Configuration
For implementing ROMgmtEvents, EVENTSHANDLER TYPE should be: ROMGMTEVENTS.
Following code shows the XML entry having configuration of UMM Events.
<EVENTSHANDLER TYPE=” ROMGMTEVENTS”> <CALLBACK CALLTYPE="1"> <IMPLEMENTER TYPE="1"> <ATTRS TYPE="1"> <ATTR NAME="PATH”> <VALUE>com.mypackage.myclass</VALUE> </ATTR> </ATTRS> </IMPLEMENTER> </CALLBACK> </ EVENTSHANDLER>
During callback events process Intellicus Report Server will call these methods:
- void afterReportObjectAdd(Object reportObjectInfo): Provide the callback event Infomation after a new Report Object(Query Object/Parameter Object) is added in Intellicus. Provide this information to the java class using HashMap as object.
- void afterReportObjectModify(Object reportObjectInfo): Provide the callback event Infomation after any existing Report Object(Query Object/Parameter Object) is modified in Intellicus. Provide this information to the java class using HashMap as object.
- void afterReportObjectDelete(Object reportObjectInfo): Provide the callback event Infomation after any Report Object(Query Object/Parameter Object) is deleted in Intellicus. Provide this information to the java class using HashMap as object.
Sample Implementation code
import com.impetus.interaj.callback.ROMgmtEvents;
public class ReportMgmtCallbackImpl extends ROMgmtEvents {
}
AFTER REPORTOBJECT ADD
This method will be used to Audit newly added Report Object (Query Object/Parameter Object) Information in callback code. This event will be raised each time a new report object is added.
The following method of the class will be called in this event.
void afterReportObjectAdd (java.lang.Object reportObjectInfo)
Event Info Hash Map
Key | Value |
REPORT_OBJECT | Report Object (Web client’s class com.impetus.intera.reportobjects.
ReportObject) of QO/PO added. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
User Info Hash Map
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterReportObjectAdd
public void afterReportObjectAdd(Object ROInfo){ System.out.println("********** Inside afterReportObjectAdd() ***"); //Get the object of ReportObject that is newly added. ReportObject reportObject = (ReportObject)((HashMap)ROInfo).get("REPORT_OBJECT"); System.out.println("Report Object ID : "+reportObject.getId()); System.out.println("Report Object Name : "+reportObject.getName()); System.out.println("Report Object Type = "+reportObject.getType()); System.out.println("Report Object Description : "+reportObject.getDescription()); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)ROInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("********** End Of afterReportObjectAdd() ***"); }
Place the logical code in above method.
AFTER REPORTOBJECTMODIFY
This method will be used to Audit modified Report Object (Query Object/Parameter Object) Information in callback code. This event will be raised each time any existing report object is modified.
The following method of the class will be called in this event.
void afterReportObjectModify (java.lang.Object reportInfo)
Event Info Hash Map
Key | Value |
REPORT_OBJECT | Report Object (Web client’s class com.impetus.intera.reportobjects.
ReportObject) of QO/PO modified. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
User Info Hash Map
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterReportObjectModify
public void afterReportObjectModify(Object ROInfo){ System.out.println("***** Inside afterReportObjectModify() *"); //Get the object of ReportObject that is modified. ReportObject reportObject = (ReportObject)((HashMap)ROInfo).get("REPORT_OBJECT"); System.out.println("Report Object ID : "+reportObject.getId()); System.out.println("Report Object Name : "+reportObject.getName()); System.out.println("Report Object Type = "+reportObject.getType()); System.out.println("Report Object Description : "+reportObject.getDescription()); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)ROInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("***** End Of afterReportObjectModify() ****"); }
Place the logical code in above method.
AFTER REPORTOBJECT DELETE
This method will be used to Audit deleted Report Object(Query Object/Parameter Object) Information in callback code. This event will be raised each time any report object is deleted.
The following method of the class will be called in this event.
void afterReportObjectDelete (java.lang.Object reportInfo)
Event Info Hash Map
Key | Value |
REPORT_OBJECT | Report Object (Web client’s class com.impetus.intera.reportobjects.
ReportObject) of QO/PO deleted. |
USER_INFO | Hash Map of USER_INFO.
Refer to USER_INFO table below for values inside this HashMap. |
User Info Hash Map
Key | Value |
USERINFO_USERID
|
USER ID passed to Report Server for execution of report. |
USERINFO_ORGID
|
ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
afterReportObjectDelete
public void afterReportObjectDelete(Object ROInfo){ System.out.println("******* Inside afterReportObjectDelete() ****"); //Get the object of ReportObject that is Deleted. ReportObject reportObject = (ReportObject)((HashMap)ROInfo).get("REPORT_OBJECT"); System.out.println("Report Object ID : "+reportObject.getId()); System.out.println("Report Object Name : "+reportObject.getName()); System.out.println("Report Object Type = "+reportObject.getType()); System.out.println("Report Object Description : "+reportObject.getDescription()); System.out.println("------- UserInfo details -------"); //Hash Map of USER_INFO which contains following values. HashMap userInfo = (HashMap)((HashMap)ROInfo).get("USER_INFO"); System.out.println("USERINFO_USERID === "+((HashMap)userInfo).get("USERINFO_USERID")); System.out.println("USERINFO_ORGID === "+((HashMap)userInfo).get("USERINFO_ORGID")); System.out.println("USERINFO_SESSIONID === "+((HashMap)userInfo).get("USERINFO_SESSIONID")); System.out.println("USERINFO_SD === "+((HashMap)userInfo).get("USERINFO_SECURITY_DESCRIPTOR")); System.out.println("USERINFO_CUSTOMERID === "+((HashMap)userInfo).get("USERINFO_CUSTOMERID")); System.out.println("USERINFO_LOCATION === "+((HashMap)userInfo).get("USERINFO_LOCATION")); System.out.println("USERINFO_LOCALE === "+((HashMap)userInfo).get("USERINFO_LOCALE")); System.out.println("USERINFO_DBNAME === "+((HashMap)userInfo).get("USERINFO_DBNAME")); System.out.println("USERINFO_ROLES === "+((HashMap)userInfo).get("USERINFO_ROLES")); System.out.println("USERINFO_Conn_Name === "+((HashMap)userInfo).get("USERINFO_CONNECTION_NAME")); System.out.println("****** End Of afterReportObjectDelete()******"); }
Place the logical code in above method.
DynamicQOEvents
DynamicQOEvents is to dynamically modify the existing QO or get an external QO.
This event can be implemented to Add/Delete columns and/or modify column attributes of the associated Query object, before the Report Execution.
Also, it enables fetching of external Query Object for running a Report i.e. User can create QO dynamically without saving it in Intellicus Repository.
Configuration
For implementing DynamicQOEvents, EVENTSHANDLER TYPE should be: DYNAMICQOEVENTS.
Following code shows the XML entry having configuration of UMM Events.
<EVENTSHANDLER TYPE="DYNAMICQOEVENTS"> <!-- The callback type attribute defines the call back mode implemented Supported mode is 1 which is LOCAL callback mode --> <CALLBACK CALLTYPE="1"> <!-- The callback implementer attribute defines the call back implementor type Supported mode is 1 which is JAVA callback implemeter type --> <IMPLEMENTER TYPE="1"> <ATTRS TYPE="1"> <ATTR NAME="PATH"> <!--Specify the name of the class that is extending the base class. Make sure that the class is present in the classpath of the Report Server.--> <VALUE>DynamicQOCallbackImpl</VALUE> </ATTR> </ATTRS> </IMPLEMENTER> </CALLBACK> </EVENTSHANDLER>
nbsp;
During callback events process Intellicus Report Server will call these methods:
- void getDynamicColumns(java.util.Map<java.lang.String,java.lang.Object> queryObjectInfo): This method will be used to get columns for dynamic columns.
- void getExternalQueryObject (java.util.Map<java.lang.String,java.lang.Object> queryObjectInfo): This method will be used to fetch external query object.
Sample Implementation code
import com.impetus.interaj.callback.DynamicQOEvents;
public class DynamicQOCallbackImpl extends DynamicQOEvents
{
}
Get Dynamic Columns
This method will be used to get columns for dynamic columns. The method will be called when dynamic columns are required
The following method of the class will be called in this event.
public void getDynamicColumns (java.util.Map<java.lang.String,java.lang.Object> queryObjectInfo)
throws java.lang.Exception
Parameter:
queryObjectInfo Map- This is generally a HashMap that contains Report Object Information. The HashMap contains following values:
queryObjectInfo Map
Key | Value |
QUERY_OBJECT | com.impetus.intera.reportobjects.QueryObject |
CONNECTION | java.sql.connection class object => The connection used to execute the report. |
USER_INFO HashMap | Hash Map of USER_INFO which contains following values. |
SYS_PARAMS | Hash Map of all System Parameters passed to the Report. KEY of each element is the name of system parameter and VALUE is the string of parameter value |
USER_PARAMS | Hash Map of all user parameters passed to the report.
KEY of each element is the parameter name and VALUE is the string of parameter value. |
USER_INFO HashMap
Key | Value |
USERINFO_USERID | USER ID passed to Report Server for execution of report |
USERINFO_ORGID | ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
getDynamicColumns
public void getDynamicColumns(Map<String,Object> queryObjectInfo) throws Exception { System.out.println("Inside getDynamicColumns"); //Get query object QueryObject queryObject = (QueryObject) queryObjectInfo.get("QUERY_OBJECT"); // Suppose a query object contains below columns // CUSTOMER.CUST_NO, CUSTOMER.CUSTOMER, CUSTOMER.STATUS, // CUSTOMER.COMMENTS, CUSTOMER.TYPE // Then // Remove CUSTOMER.COMMENTS & CUSTOMER.TYPE dynamically by call back queryObject.removeColumn("TYPE"); System.out.println("removed Column : TYPE"); queryObject.removeColumn("COMMENTS"); System.out.println("removed Column : COMMENTS"); System.out.println("End of getDynamicColumns"); }
Place the logical code in above method.
Get External Query Object
This method will be used to fetch external query object. The following method of the class will be called in this event.
public void getExternalQueryObject(java.util.Map<java.lang.String,java.lang.Object> queryObjectInfo)
throws java.lang.Exception
Parameter:
queryObjectInfo Map- This is generally a HashMap that contains Report Object Information. The HashMap contains following values:
queryObjectInfo Map
Key | Value |
QUERY_ID: String | Query Object ID |
QUERY_NAME: String | Query Object Name |
QUERY_OBJECT | com.impetus.intera.reportobjects.QueryObject |
CONNECTION: java.sql.connection | class object => The connection used to execute the report. |
CONNECTION_NAME: String | The Intellicus connection name used in query object. |
USER_INFO HashMap | Hash Map of USER_INFO which contains following values. |
SYS_PARAMS | Hash Map of all System Parameters passed to the Report. KEY of each element is the name of system parameter and VALUE is the string of parameter value. |
USER_PARAMS | Hash Map of all user parameters passed to the report.
KEY of each element is the parameter name and VALUE is the string of parameter value.
|
USER_INFO HashMap
Key | Value |
USERINFO_USERID | USER ID passed to Report Server for execution of report |
USERINFO_ORGID | ORGID passed to Report Server for execution of report. |
USERINFO_SESSIONID | Session id. |
USERINFO_SECURITY_DESCRIPTOR | Security Descriptor string. |
USERINFO_CUSTOMERID | Customer id, for Service Provider deployments. |
USERINFO_LOCATION | Location. |
USERINFO_LOCALE | Locale setting of browser. |
USERINFO_TIMESTAMP | Time of request in Java time stamp milliseconds. |
USERINFO_DBNAME | String: Data base name. |
USERINFO_ROLES | Roles granted to the user. |
USERINFO_CONNECTION_NAME | Connection name requested to use for the report. |
getExternalQueryObject
public void getExternalQueryObject(Map<String,Object> queryObjectInfo) throws Exception { System.out.println("Inside getExternalQueryObject"); //set the query object ID & name String queryObjectID = "QueryObjectDel"; String queryObjectName = "QueryObjectDel"; //create SQL query String sqlQuery = "select COUNTRY.* from COUNTRY"; System.out.println("Query Id = "+queryObjectID); System.out.println("Query Name = "+queryObjectName); System.out.println("SQL Query = "+sqlQuery); //get the connection to execute query Connection connection = (Connection)queryObjectInfo.get("CONNECTION"); String connectionName = (String)queryObjectInfo.get("CONNECTION_NAME"); System.out.println("connectionName = "+connectionName); if(connectionName==null) { connectionName=""; } IResultSet iResultSet = this.executeQuery(sqlQuery, connection); //Create Query Object QueryObject qo = QueryObject.createQueryObject(queryObjectName, Transformation.FetchStep.Source.SQL, sqlQuery, null, connectionName, null, iResultSet); qo.setId(queryObjectID); //set the qo in info map queryObjectInfo.put("QUERY_OBJECT", qo); System.out.println("End of getExternalQueryObject"); }
Place the logical code in above method.
Note: Please refer sample code available at
<Intellicus_Install_Path>SampleCodesCallBack APIsCallBack Events