Intellicus Enterprise Reporting and Business Insights 19.0

Report Management

0 views June 28, 2020 0

Categories
Import

import com.intellica.client.common.UserInfo;

import com.intellica.client.layout.LayoutManager;

import com.intellica.client.reportutils.Category;

import com.intellica.client.exception.

LayoutHandlerException;

import java.util.Vector;

import java.util.HashMap;

Get Category List

This Java API retrieves the list of all categories from the Intellicus repository.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Category Management/ GetCategoryList.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Get the list of all Categories in Repository.

Method: getCategoryList

public java.util.Vector getCategoryList(UserInfo requestorUserInfo) throws LayoutHandlerException

This method returns a vector of Category objects. The method requests report server and returns the report categories present in the report repository, both public and private to requestor user. The public categories will be restricted to those categories that the requestorUserInfo has access to read. Each category object provides getIsPublic boolean method to identify the scope of category.

Parameters:

  • RequestorUserInfo: UserInfo for authorization. Pass getEmptyInstance() in case of report server runs in Security-Off mode.

Returns:

Vector of Category objects.

Vector vecCatList= new Vector();

vecCatList=lm.getCategoryList(requestorUserInfo);

The other three APIs for getting Category List are-

  1. Returns a vector of categories from the report server on the basis of filters

public Vector getCategoryList(Filter filter,UserInfo userInfo)

  1. Returns a vector of report categories from the report server with given access rights

public Vector getCategoryList(int accessRight, UserInfo userInfo)

  1. Returns a vector of categories from the report server on the basis of filters

public Vector getCategoryList(com.impetus.intera.layout.adhoc.data.Filters filters,UserInfo userInfo)

All these returns Vector containing Category objects.

Add a new Category

This Java API is used to add a new Category in the Intellicus Repository.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Category Management/ CreateNewCategory.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Create an instance of Category i.e to be added in Repository and set its various attributes of Categories.

String catName = “NewDemoCategory”;

String catDescription = “This is the new category just created”;

String catId = “123456”;

Category newCategory = new Category(catName);

//Set the various properties of the Category

newCategory.setIsPublic(true);

newCategory.setIsHidden(false);

newCategory.setDescription(catDescription);

//To set the category id

newCategory.setCategoryId(catId);

newCategory.setMenuName(catName);

  1. Add this Category in the Repository.

Method: addCategory

public Category addCategory(Category category,

UserInfo userInfo)

throws LayoutHandlerException

This method adds new category to the Intellicus repository.

//Adds new category to the Intellicus repository.

lm.addCategory(newCategory,requestorUserInfo);

Delete Category

This Java API is used to delete an Existing Category from the Intellicus repository along with the Reports present in that Category.User need to provide the Category ID of the Category which is to be deleted.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Category Management/ DeleteCategory.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Delete the Category with given Category Id.

This method is used to delete the existing category from the report engine’s report layout repository along with the reports contained in it.

Method: deleteCategory

public void deleteCategory(java.lang.String catId,  boolean unConditional, UserInfo userInfo)

throws LayoutHandlerException

 Parameters:

  • CatId: Category ID of the Existing Category that is to be deleted.
  • UnConditional: If true than deletes the category even if report layouts are present in the category along with all its reports.
  • UserInfo: UserInfo object authorization.

//Category ID of the Category that is to be deleted.

String categoryID=”DemoCategory”;

lm.deleteCategory(categoryID, true, requestorUserInfo);

GetSubCategories

This Java API is used to delete an Existing Category from the Intellicus repository along with the Reports present in that Category.User need to provide the Category ID of the Category which is to be deleted.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Category Management/DeleteCategory.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm = new LayoutManager();

  1. Get the sub categories for given Category Id.

This method is used to delete the existing category from the report engine’s report layout repository along with the reports contained in it.

Method: getSubCategories

public LinkedHashMap getSubCategories() throws LayoutHandlerException

Parameters:

  • CatId: Category ID of the Category whose categories are to be obtained
  • UserInfo: UserInfo object authorization.

//Category ID of the Category that is to be deleted.

String categoryID = “DemoCategory”;

categoryObj = lm.getCategory(categoryID, requestorUserInfo);

//now, fill the sub-categories in the category object.

Filter filter = new Filter();

filter.setFilterField(“ENTITYTYPE”, “CATEGORY”);

lm.populateEntityListForCategory(categoryObj,filter,requestorUserInfo);

LinkedHashMap subcategories = categoryObj.getSubCategories();

The other related APIs for Category Management are-

  1. Public void deleteSubCategory(String subCategoryId)
  2. public void setSubCategories(LinkedHashMap subCategories)
  3. public Category getParentCategory()
  4. public void setParentCategory(Category parentCategory)
Report Operations
Import

import com.intellica.client.common.UserInfo;

import com.intellica.client.layout.LayoutManager;

import com.intellica.client.reportutils.Report;

import com.intellica.client.exception.LayoutHandlerException;

import java.util.Vector;

import java.util.HashMap;

Run Report

This Java API is used to execute a Report with given Report Id.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Operations/ RunReport.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create an instance of reportExecuter i.e. a class having methods for executing a report.

ReportExecutor report = new ReportExecutor();

  1. Set the System Parameters required for running the Report.

//Instantiate a collection object for setting system parameters

HashContainer hcSysParams = new HashContainer();

//fill up the system parameter values

//Report ID which is required to run

String reportId = “Customer Report”;

 

// This will set Id of the report.

hcSysParams.put(“REPORT_ID”,reportId);

// In database mode only reportId needed.don’t prefix //category id

// This will set the output format for the report.report //format can be PDF/XLS/HTML

hcSysParams.put(“REPORT_FORMAT”,InteraConstants.ReportFormats.PDF);

  1. Set the User/Business Parameters

//Instantiate a collection object for setting user/business //parameters

HashContainer hcUserParams = new HashContainer();

String countryName = “Australia”;

String roleId = “3818”;

// fill up the user params if report contains any parameter

hcUserParams.put(“Country”, countryName);

// Parameter Name as created in the report layout(IRL)

hcUserParams.put(“Role_ID”, roleId);

  1. Instantiate the Byte Array Output Stream object.

ByteArrayOutputStream reportData = new ByteArrayOutputStream();

  1. Run the Report.

Method: runReport

public void runReport(UserInfo userInfo,

HashContainer systemParameterHash,

HashContainer userParameterHash,

IStreamCallback pCallback,

java.io.ByteArrayOutputStream reportData,

boolean isPublic)

throws ClientException

This method executes a report by taking the values of system-defined parameters (and report parameters) in parameters as HashContainer and gives the generated report data in the passed outputStream.  This method generates the complete report, and then returns the control to the calling code. In this case, the calling code must catch the exceptions right at the calling place. The calling code can use the output stream after the method call.

Parameters:

  • UserInfo: userInfo object will be used for passing user information to the Report Engine. Can be left as null when application is not using Intellica Security Module.
  • SystemParameterHash: HashContainer instance, Contains the values of system parameters.
  • UserParameterHash: HashContainer instance, Contains the values of Report parameters. Can be left as null when there are no parameters in the report.
  • PCallback: IStreamCallback instance, For future usage.
  • ReportData: The RefByteArrayOutputStream instance required for the report output.The report output in the form of byte array is added in this output stream.

report.runReport(requestorUserInfo,hcSysParams,hcUserParams,null,reportData,true);

Get the list of Published Reports of a particular report

This Java API is used to get the list of all published reports corresponding to given Report Id.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Operations/ GetPublishedReport.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm = new LayoutManager();

  1. Set the filter for getting Saved Report List.

The various filter settings could be:

Enums.Filters.SavedReportList.CATID

Enums.Filters.SavedReportList.ENTITY_PROPERTIES

Enums.Filters.SavedReportList.FROMDATE

Enums.Filters.SavedReportList.GENERATOR_ID

Enums.Filters.SavedReportList.GENERATOR_TYPE

Enums.Filters.SavedReportList.ISPUBLIC

Enums.Filters.SavedReportList.ORGID

Enums.Filters.SavedReportList.ORPHANED

Enums.Filters.SavedReportList.PUBLISHSTATUS

Enums.Filters.SavedReportList.REPORTID

Enums.Filters.SavedReportList.WORKFLOW_STATE

Enums.Filters.SavedReportList.TODATE

Enums.Filters.SavedReportList.USERID

Filter filterObj = new Filter();

String reportId=”SalesReport”;

filterObj.setFilterField(Enums.Filters.SavedReportList.REPORTID,reportId);

  1. Get the List of Saved Reports based on the filters applied.

Method: getViewSavedReport

public void getViewSavedReport(SavedReport savedReport,

java.io.ByteArrayOutputStream reportData, HashContainer sysParams, userInfo)

throws LayoutHandlerException

This method is used to get the saved report with in the ByteArrayOutputStream passed as a parameter.

Parameters:

  • SavedReport: Saved report object SavedReport.
  • ReportData: ByteArrayOutputStream contains the Report data.
  • SysParams: HashContainer for report system parameters.
  • UserInfo: UserInfo For authorization.

Vector vecPublishedReportList = lm.getSavedReportList(filterObj,requestorUserInfo);

Report Layout Management
Import

import com.intellica.client.common.UserInfo;

import com.intellica.client.layout.LayoutManager;

import com.intellica.client.reportutils.Report;

import com.intellica.client.exception.LayoutHandlerException;

import java.util.Vector;

import java.util.HashMap;

GetAllReportList

This Java API is used to get the complete list of all the Reports from the Intellicus Repository.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Layout Management/ GetAllReportList.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Get the Report List

Method : getReportList

public java.util.Vector getReportList(UserInfo userInfo) throws LayoutHandlerException

Returns a vector of all report names from the report server The list will be restricted to accessible reports by this user (Applies to report server enterprise edition only)

Parameters:

  • UserInfo: UserInfo for authorization.

Returns:

Vector of all report names from the report server.

Part of Sample Code implementing “getReportList”:

//Vector that will be used to store the Report List

Vector vecReportList= new Vector();

//This method returns a vector of all report names from the report server

vecReportList=lm.getReportList(requestorUserInfo);

The other APIs for getting Report List are-

  1. Returns a vector of report objects from the report server on the basis of requesting filters.

public Vector getReportList(Filter,UserInfo)

  1. Returns a vector of all report names from the report server. The list will be restricted to accessible reports by this user

public Vector getReportList(int categoryAccessRight, int reportAccessRight,UserInfo userInfo)

  1. Returns a vector of all report names from the report server. The list will be restricted to accessible reports by this user

public Vector getReportList(int reportAccessRight,UserInfo userInfo)

  1. This method gets the list of reports based on filters (request details ) specified in ReportListRequest

public Vector getReportList(ReportListRequest reportListRequest,UserInfo userInfo)

MoveReport

This Java API is used to move an existing report to another Destination Category.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Layout Management/ MoveReport.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Pass the Source ReportId which is to be copied and the destination category Id , to which it is copied so as to move the Report.

Method: moveReport

public void moveReport(java.lang.String sourceReportId, java.lang.String destinationCategoryId,

Report report, UserInfo userInfo) throws LayoutHandlerException

Method to Move a report to the new category.

Parameters:

  • SourceReportId: source report id, mandatory argument for moving the report.
  • DestinationCategoryId: destination category id,where new report has to be moved.if this is null then report objects’s category id will be taken as destination category.
  • Report: instance of Report class for move.
  • UserInfo: UserInfo object for authorization.

//ReportID of the Report that is to be moved to new Category

String reportID=”234CBC33-EC19-E754-7490-43DA2A24728C”;

//CategoryID of the Destination Category where the report needs to be moved

String destCategoryID=”61FCA109-7E0D-D023-A19C-A054A38FC9B6″;

//Method to copy the report to anther Category

lm.moveReport(reportID, destCategoryID, r,requestorUserInfo);

Get Report List For Category

This Java API is used to get the complete list of Reports in given Category.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Layout Management/ GetReportListForCategory.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Pass the Category Id whose Reports are to be listed.

Method : getReportListForCategory

public java.util.Vector getReportListForCategory(java.lang.String categoryId, UserInfo requestorUserInfo)

throws LayoutHandlerException

Method returns a vector of Report objects. The method requests report server and returns the reports present in the report repository under given report category, both public and private to requestor user. The public reports will be restricted to those reports that the requestorUserInfo has access to read. Each report object provides getIsPublic boolean method to identify the scope of report.

Parameters:

  • CategoryId: The category Id of the category from which, the report layout list is requested. Intellicus allows category ids upto 256 charecters long.
  • RequestorUserInfo: UserInfo for authorization. Pass getEmptyInstance() in case of report server runs in Security-Off mode.

Returns:

Vector of Reports.
Vector vecCatList= new Vector();

String categoryId = “01-Sales”;

vecCatList=lm.getReportListForCategory

(categoryId , requestorUserInfo);

The other related APIs for getting Report List For Category are-

  1. Returns a vector of all report names from the report server.The list will be restricted to accessible reports by this user.

public Vector getReportListForCategoryAccessRight(int categoryAccessRight,UserInfo userInfo)

  1. Returns a vector of all report names from the report server.The list will be restricted to accessible reports by this user.
    • @param categoryId: The category Id for which the report layout list is requested.
    • @param reportAccessRight masked value of the access right.

public Vector getReportListForCategoryWithAccessRights(String categoryId,int categoryAccessRight, int reportAccessRight, UserInfo userInfo)

  1. Returns a vector of all report names from the report server.The list will be restricted to accessible reports by this user.
    • @param categoryId: The category Id for which the report layout list is requested.
    • @param categoryAccessRight masked value of the access right.

public Vector getReportListForCategoryWithCategoryRight(String categoryId,int categoryAccessRight,UserInfo userInfo)

  1. The method requests report server and returns the reports present in the report repository under given report category, both public and private to requestor user.

public Vector getReportListForCategoryWithReportRight(String categoryId, int reportAccessRight,UserInfo userInfo)

Get Saved Report List

This Java API is used to get the list of Saved Reports in a particular Category/Report.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Layout Management/GetSavedReportList.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Pass the Category Id/Report Id whose Saved Reports are to be listed.

Method : getSavedReportList

public java.util.Vector getSavedReportList (Filter filter, UserInfo requestorUserInfo)

throws LayoutHandlerException

Method returns a vector of Report objects. The method requests report server and returns the saved reports present in the report repository under given report category/Report, both public and private to requestor user.

Parameters:

  • filter: Filter can set the values of CATID and REPORTID.
  • RequestorUserInfo: UserInfo for authorization.

Returns:

Vector of Saved Reports.

//Cat ID of the Category whose Reports are required to be Listed

String catId = “4F9245A7-D639-4F99-604D-F32641B77725″; //category id to be set in filter

String reportId=”All Country Sales – Linked Prompt”;//Report Id to be set in filter

Filter filter = new Filter();

filter.setFilterField(com.intellica.client.common.Enums.Filters.SavedReportList.CATID, catId);

filter.setFilterField(com.intellica.client.common.Enums.Filters.SavedReportList.REPORTID, reportId);

The other related APIs fro Saved Reports are:

  1. public LinkedHashMap getSavedReportsMap()
  2. public void setSavedReportsMap(LinkedHashMap savedReportsMap)
  3. public void deleteSavedReport(String reportOId,String reportOutputId,
  4. UserInfo userInfo)
  5. public void updateSavedReport(SavedReport savedReport, UserInfo userInfo)
  6. public void addSavedReport(SavedReport savedReport)
Add Report Layout to Category

This Java API is used to add a report to an existing Category in the Intellicus repository. This would require User to provide the Category ID, and the details related to the Report i.e. to be added.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Layout Management/ AddReportLayoutToCategory.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm = new LayoutManager();

  1. Create an instance of Report i.e. to be added in the Category. Also, set the various attributes of report.

String file = "C:/UploadAll Country Sales.irl";
//Read the contents from the given file
InputStream is = new FileInputStream(file);
// Get the size of the file
long length = file.length();
if (length > Integer.MAX_VALUE) {
  // File is too large
  throw new Exception("File is too Large");
}
else {
  // Create the byte array to hold the data
  byte[] bytes = new byte[(int) length];

  // Read in the bytes
  int offset = 0;
  int numRead = 0;

  while (offset < bytes.length && (numRead = is.read(bytes, offset, bytes.length- offset)) >= 0) {
    offset += numRead;
  }
  //Ensure all the bytes have been read in
  if (offset < bytes.length) {
    throw new IOException("Could not completely read the file ");
  }
  is.close();

  String reportName = "Sample_Report";
  String reportID = "Sample Report";

  Report reportToAdd = new Report(reportName, reportID, bytes);
  String categoryID = "Demo";
  reportToAdd.setCategoryId(categoryID);
}

 

  1. Upload the Report.

Method : uploadReport

public void uploadReport(Report report, UserInfo userInfo)

throws LayoutHandlerException

This method uploads a report by taking the Report object as parameter. This method internally validates the Report object for report paramaters.
The method also varifies if report already exists in the specified category.In case report object is not validated and varified the method throws LayoutHandlerException exception.The calling code must catch the exception right at the calling place.

Parameters:

  • Report: Report class instance containing the report layout metadata and the byte array of report layout itself.
  • UserInfo: UserInfo object use to validate the user against the application.

lm.uploadReport(reportToAdd, requestorUserInfo);

Copy Report

This Java API is used to copy an existing report to another destination category.

User needs to provide the ReportID that is to be copied and the destination category ID where it is to be copied.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Layout Management/ CopyReport.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Set the attributes for copied report.

Report r=new Report();

String rep_Name = “Copied_Report”;

r.setMenuName(rep_Name);

  1. Pass the Source Report Id to be copied and the destination Category where it is to be copied.

Method : copyReport

public void copyReport(java.lang.String sourceReportId,

java.lang.String destinationCategoryId,

Report report,

UserInfo userInfo)

throws LayoutHandlerException

This method is used to make a copy of the existing report attributes.

Parameters:

  • SourceReportId: source report id, mandatory argument for copying the report.
  • DestinationCategoryId: destination category id, where new report has to be copied.if this is null then source report’s category id will be taken as destination category.
  • Report: instance of Report class for copy.
  • UserInfo: UserInfo object for authorization.

Part of Sample Code implementing “copyReport”:

String sourceReportId = “787F11B1-74E7-6792-9ACB-408753C0470F”;

String destCategoryId = “61FCA109-7E0D-D023-A19C-A054A38FC9B6”;

lm.copyReport(sourceReportId, destCategoryId, r, requestorUserInfo);

Get Report Details

This Java API is used to get Report Details corresponding to the given Reoprt Id from the Intellicus Repository.

Refer to <Intellicus_Install_Path>/SampleCodes/Java APIs/Report Layout Management/ GetReportDetails.java for sample code of this use case.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Get the Report Detail for given Report Id.

Method: getReportDetails

public Report getReportDetails(java.lang.String reportId, UserInfo userInfo)

throws LayoutHandlerException

This method returns an object of Report class obtained from the report server.

Parameters:

  • Reported: The report id whoes details should be obtained.
  • UserInfo: UserInfo for authorization.

Returns:

An object of Report class obtained from the report server.

Report reportDetail=new Report();

String reportId = “91FEE269-3AEE-C23D-6F04-7A9979BEBE09”;

reportDetail=lm.getReportDetails(reportId,requestorUserInfo);

Other related APIs for Report Layout Management are:

  1. public LinkedHashMap getReportsMap()
  2. public void setReportsMap(LinkedHashMap reportsMap)
  3. public void updateReport(Report oldReport,Report newReport,UserInfo userInfo)
  4. public void updateReport(Vector reportVector, UserInfo userInfo)
  5. public void addReport(Report report)
Mass Operations

User is allowed to select more than one entity and perform the selected operation on those Entities. This could be done using below APIs.

Import

import com.intellica.client.common.UserInfo;

import com.intellica.client.layout.LayoutManager;

import com.intellica.client.reportutils.Report;

import com.intellica.client.exception.

LayoutHandlerException;

import java.util.Vector;

import java.util.ArrayList;

import java.util.HashMap;

Copy Entities

This API is used to copy entities to another location. It returns modified object with new destination location.

Let’s consider here, Queries are to be copied from one Category to Destination Category.

User needs to provide the Query IDs that are to be copied and the destination category ID where they are to be copied.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Set the Query Ids that are to be copied.

String queryIds[] = new String”12607729345009203129192910671882″, “12603516809689203129192914431493”,”12587032332324192168102289583904″};

  1. Create the EntityOperation object and set Query Entities for above given Query Ids and add in an ArrayList i.e. entityList.

ArrayList entityList = new ArrayList();
EntityOperation entityObj = null;

for(int i=0;i< queryIds.length;i++)
{
	entityObj = new EntityOperation();
	//Entity Type could be REPORT /CATEGORY /QUERY /DASHBOARD2/ 	PARAMETER /SAVEDREPORT /DASHBOARD_WIDGET /CUBEOBJECT    
	entityObj.setEntityType("QUERY");
	entityObj.setEntityId(queryIds[i]);
	entityList.add(entityObj);
}

 

  1. Pass the arraylist of entities that are to be copied in the destination Category.

Method: copyEntities

public ArrayList copyEntities(ArrayList entityList, String targetCatId, UserInfo userInfo)

throws LayoutHandlerException{

This method is used to copy entites in the destination Category.

Parameters:

  • entityList : ArrayList of {@link com.intellica.client.common.EntityOperation} class instance.
  • targetCatId: Destination location where this entity should be copied.
  • UserInfo: UserInfo object for authorization.

Part of Sample Code implementing “copyEntities”:

String destCategoryId = “DataLoader”;

lm.copyEntities(entityList, destCategoryId, requestorUserInfo);

Delete Entities

This API is used to delete entities from the Repository.

Let’s consider here, “Categories” are to be deleted from the Repository.

User needs to provide the Category IDs that are to be deleted.

Steps:

  1. Initialize Report Client.
  2. Initialize Requestor UserInfo.
  3. Create a Layout Manager class object for report layout management related operations.

LayoutManager lm= new LayoutManager();

  1. Set the Category Ids that are to be deleted.

String categoryIds[] = new String “Demo”, “Sales_Category”};

  1. Create the EntityOperation object and set Category Entities for above given Category Ids and add in an ArrayList i.e. entityList.

ArrayList entityList = new ArrayList();
EntityOperation entityObj = null;

for(int i=0;i< queryIds.length;i++)
{
	entityObj = new EntityOperation();
	
	//Entity Type could be REPORT /CATEGORY /QUERY /DASHBOARD2/ 	PARAMETER /SAVEDREPORT /DASHBOARD_WIDGET /CUBEOBJECT    
	entityObj.setEntityType("CATEGORY");

	entityObj.setEntityId(categoryIds [i]);
	entityList.add(entityObj);
}

 

  1. Pass the arraylist of entities that are to be deleted from the Repository.

Method: deleteEntities

public ArrayList deleteEntities(ArrayList entityList, UserInfo userInfo)

throws LayoutHandlerException

This method is used to delete entities.

Parameters:

  • entityList: ArrayList of {@link com.intellica.client.common.EntityOperation} class instance.
  • UserInfo: UserInfo object for authorization.

Part of Sample Code implementing “copyEntities”:

String destCategoryId = “DataLoader”;

lm. deleteEntities(entityList, requestorUserInfo);

Following are the APIs related to Mass Operation-

  1. public ArrayList deleteEntities(ArrayList entityList, UserInfo userInfo)
  2. public ArrayList copyEntities(ArrayList entityList, String destinationCatId, UserInfo userInfo)
  3. public ArrayList copyLinkEntities(ArrayList entityList,String destinationCatId, UserInfo userInfo)
  4. public ArrayList deLinkEntities(ArrayList entityList, UserInfo userInfo)
  5. public ArrayList moveEntities(ArrayList entityList, String destinationCatId, UserInfo userInfo)