Intellicus Java APIs can be used for performing activities like User Management, Report Management, etc.
To use the Java APIs of Intellicus, following jars should be placed in class path of the web application.
These jars are provided with intellicus setup. Following is given the path for jar file:
<Intellicus Install path>APIs
The Java Doc for the APIs is available at FTP locaton: ftp://demo:firstname.lastname@example.org/api/
Mandatory Step to Use Java APIs
Initialize Report Client
Intellicus client JAVA APIs are configured by a file “ReportClient.properties”.
This file must be present in the JAVA CLASS_PATH variable of the host java application.
During initialization action, the report client component reads the configuration file and keeps the configuration in memory.
Host java application class has to import the following classes, to initialize the Report Client.
The initialization action is to be performed once in the lifetime of application.The initialization would be done according to the configurations set in the ReportClient.properties file
Init method is used to initialize the Intellica client SDK with the values from the ReportClient.properties file. This properties file contains configurations for Report Engine Interface.
InputStream is= new BufferedInputStream (new FileInputStream (“<ReportClient.properties_AbsolutePath>”));
If it is required to create the logs at desired location, set the absolute or relative path in the INTERA_HOME property of the ReportClient.Properties file.
Eg- If ReportClient.properties is placed at location c://client/config/, (i.e. client complete folder is copied down in c:// drive),
InputStream is= new BufferedInputStream(new FileInputStream(“C://client/config/ReportClient.properties”));
then INTERA_HOME property should be set as:
//setting absolute path for logs
//setting relative path for logs
(This path is basically relative to jakarta/bin/, therefore, if we consider that intellicus is installed at loc- c://program files/intellicus/jakarta/bin, then relative path for logs(i.e. C://client/logs/ ) with respect to bin would be ../../../client)
Initialize Requestor User context
A Requestor User is the user, who is requesting any action to the Intellicus system.
A com.intellica.client.common.UserInfo class object represents a user in Intellicus.
The UserInfo class has the following attributes:
|securityDescriptor||Security Descriptor string|
|customerId||Customer ID for service provide deployments|
Intellicus mode of authentication uses User ID, Password and Org ID as mandatory attributes to authenticate a user and authorize that user’s actions.
A host application that takes over authentication responsibilities can use any of the above attributes to authenticate.
Java Application class has to import the following class to store the login user information and check for Authorization.
The UserInfo object acts as a carrier to all above attributes in such case.
So, in all the use cases discussed below, host application has to create an object of UserInfo class and pass it in all the method calls.
UserInfo requestorUserInfo = new UserInfo(“John”,”john”,”Org1″);
Note: For performing any admin activity like user management at Intellicus, requestor user should be admin user at Intellicus.