Software AG Products 10.7 | CentraSite for Developers | Custom Reporting Searches | Writing Your Own Reporting Search | Uploading Custom Reporting Search through Command Line
 
Uploading Custom Reporting Search through Command Line
Pre-requisites:
To upload a custom reporting search through the CentraSite Command Line Interface, you must have the CentraSite Administrator role.
After you create the XQuery search module and search XML file, you must upload them to the CentraSite repository.
CentraSite provides a command tool named add Search for this purpose.
Important:CentraSite relies on file extensions to determine a file's type. When you upload a saved search XML file or an XQuery module from your local machine using the command line, be sure you specify the name of the file along with its extension (.xml or .xquery) so that CentraSite can determine the file's type and mark it correctly in the repository.
*To upload a custom reporting search
*Run the command add Search.
The syntax is of the format: C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd add search [-url <CENTRASITE-URL>] -user <USER-ID> -password <PASSWORD> [-module <XQUERY-MODULE>] [-overwrite <CONFIRM-OVERWRITE>] [-scope <SCOPE>] -savedSearchFile <SAVED-SEARCH-FILE>
The input parameters are:
Parameter
Description
CENTRASITE-URL
(Optional). The URL of the CentraSite registry. For example, http://localhost:53307/CentraSite/CentraSite.
USER-ID
The user ID of a registered CentraSite user who has the CentraSite Administrator role. For example, Administrator.
PASSWORD
The password for the registered CentraSite user identified by the parameter USER-ID.
XQUERY-MODULE
The absolute or relative path to the XQuery module.
CONFIRM-OVERWRITE
Specifies whether to overwrite an existing report XQuery module with the new XQuery module.
The possible values:
*true - Overwrite existing XQuery module.
*false - Do not overwrite existing XQuery module.
SCOPE
The folder to store the newly added saved search in CentraSite.
The possible values are:
*global - This option stores the search information in "Default Organization" folder.
*org - This option stores the search information in the user's organization folder.
*user (default value) - This option stores the search information in the user folder.
SAVED-SEARCH-FILE
Name of the XML file which contains the saved search.
Example (all in one line):
C:\SoftwareAG\CentraSite\utilities>CentraSiteCommand.cmd add Search -url http://localhost:53307/CentraSite/CentraSite -user Administrator -password manage -savedSearchFile MySearch.xml -module MyPortlet.xquery -overwrite true -scope org
The response to this command could be:
Executing the command : add Search

Successfully executed the command : add Search
After the command executes successfully, the newly created portlet, MyPortlet, is displayed in the Data Feed list in Add New Portlet dialog box.