Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSScriptProcessor Interface Reference

List of all members.

Detailed Description

[This is preliminary documentation and is subject to change in the future]

The IDSSScriptProcessor is the primary functional interface of the DSSScriptProcessor component. The script processor parses a project definition script (PDS file) and is capable of creating objects that are defined in the script.
A PDS file is written in XML 1.0 format. It defines first-class objects in a human readable text format. The common use of a PDS file is to store the definition of predefined system objects that are created with a new project or a configuration. It is also used to carry definition of new or updated function packages, DBMS objects etc.


Public Member Functions

HRESULT CreateObjects ([in] IDSSFolder *pFolder,[in, optional] IDSSUserRuntime *pUserRuntime)
 Create and save objects defined in the script The CreateObjects method creates all objects defined in the PDS script and saves them to a supplied folder.
HRESULT CreateObjectsInCollection ([in] IDSSSource *pSource,[in, optional] IDSSUserRuntime *pUserRuntime,[out, retval] IDSSCollection ppCollection)
 Create objects defined in the script in memory The CreateObjectsInCollection method creates objects defined in the PDS script in memory.
HRESULT GetObjectInfo ([in] Int32 Index,[out] EnumDSSObjectType *ObjectType,[out] BSTR *ObjectID,[out] BSTR *ObjectName)
 Obtain the information about an object defined in the script GetObjectInfo returns information about an object defined in the PDS script.
HRESULT Load ([in] BSTR ScriptPath,[in, optional] BSTR RootTagName)
 Method to initialize the script processor with a PDS script The Load method initializes the script processor with a project definition script (PDS file).
HRESULT ObjectCount ([out, retval] Int32 *Count)
 The number of DSS objects defined in the script The Count method returns the number of objects defined in the PDS script.
HRESULT PopulateSQLPatterns ([in] IDSSDBMS *pDBMS,[in, optional] IDSSSource *pSource)
 Update function SQL patterns for a DBMS object The PopulateSQLPatterns method updates a DBMS object with function pattern information provided in a PDS script.
HRESULT SymbolID ([in] BSTR Symbol,[in] BSTR SymbolID)
 Property to get/set the mapping between Object ID and ID Symbol in the PDS script.
HRESULT SymbolID ([in] BSTR Symbol,[out, retval] BSTR *pSymbolID)
 Property to get/set the mapping between Object ID and ID Symbol in the PDS script.


Member Function Documentation

HRESULT IDSSScriptProcessor::CreateObjects [in] IDSSFolder pFolder,
[in, optional] IDSSUserRuntime pUserRuntime
 

Create and save objects defined in the script The CreateObjects method creates all objects defined in the PDS script and saves them to a supplied folder.

Folder hierarchies defined in the PDS script are preserves and they become folder subtrees under the supplied folder.

Parameters:
pFolder Objects is saved under this folder. Folder must be user folder or system folder. Search folder cannot be used
pUserRuntime Runtime of the user that initiated the request
Returns:
Usual COM result code:
  • S_OK Success
  • DSSCOM_E_NOTINITIALIZED The script processor has not been successfully initialized

HRESULT IDSSScriptProcessor::CreateObjectsInCollection [in] IDSSSource pSource,
[in, optional] IDSSUserRuntime pUserRuntime,
[out, retval] IDSSCollection   ppCollection
 

Create objects defined in the script in memory The CreateObjectsInCollection method creates objects defined in the PDS script in memory.

These objects are returned in a DSSCollection object. Objects are not saved and folder hierarchies defined in the PDS script are not preserved.

Parameters:
pSource The object source to create new objects in
pUserRuntime Runtime of user that initiates the request
ppCollection Returned collection that contains all the instantiated objects
Returns:
Usual COM result code:
  • S_OK success
  • DSSCOM_E_NOTINITIALIZED The script processor has not been successfully initialized

HRESULT IDSSScriptProcessor::GetObjectInfo [in] Int32  Index,
[out] EnumDSSObjectType ObjectType,
[out] BSTR *  ObjectID,
[out] BSTR *  ObjectName
 

Obtain the information about an object defined in the script GetObjectInfo returns information about an object defined in the PDS script.

It returns the type, ID and name of an object. An index of the object must be given. The index is the numeric order in which the object appears in the script.

Parameters:
Index Index of the object. Index starts from 0.
ObjectType Type of the object
ObjectID ID of the indexed object
ObjectName Name of the indexed object
Returns:
Usual COM result code:
  • S_OK Success
  • E_PONTER One of the out parameters is NULL
  • DSSCOM_E_INDEX_OUTOFRANGE Index is not between 0 and ObjectCount -1
  • DSSCOM_E_NOTINITIALIZED The script processor has not been successfully initialized

HRESULT IDSSScriptProcessor::Load [in] BSTR  ScriptPath,
[in, optional] BSTR  RootTagName
 

Method to initialize the script processor with a PDS script The Load method initializes the script processor with a project definition script (PDS file).

A script processor must be properly initialized before any other methods/property can be used.

Parameters:
ScriptPath Path to the PDS file. Can be a absolute (including UNC) path or a relative path to current working directory. Can also be an accessible URL.
RootTagName If provided, the PDS file's root tag name must match this string; otherwise an error is reported and initialization does not succeed.
Returns:
Usual COM result code:
  • S_OK Success
  • SCR_E_INVALID_ROOT_TAG_NAME The name of the root tag of the PDS file does not match parameter RootTagName.
  • SCR_E_SCRIPT_URL Path or URL to the script is incorrect or inaccessible.
  • SCR_E_SCRIPT_FORMAT The provided file is not in proper XML format; or the XML parser has reported a runtime error.
  • DSSCOM_E_FAIL_COCREATEINSTANCE The XML parser cannot be instantiated. The machine environment may not be correctly configured.
  • DSSCOM_E_NOTINITIALIZED The script processor did not successfully initialize.

HRESULT IDSSScriptProcessor::ObjectCount [out, retval] Int32 *  Count  ) 
 

The number of DSS objects defined in the script The Count method returns the number of objects defined in the PDS script.

Parameters:
Count Number of objects defined in the script
Returns:
Usual COM result code:
  • S_OK Success
  • DSSCOM_E_NOTINITIALIZED The script processor did not successfully initialize

HRESULT IDSSScriptProcessor::PopulateSQLPatterns [in] IDSSDBMS pDBMS,
[in, optional] IDSSSource pSource
 

Update function SQL patterns for a DBMS object The PopulateSQLPatterns method updates a DBMS object with function pattern information provided in a PDS script.

The PDS script is expected to contain database-specific SQL function pattern information for one or more warehouse platforms. This method extracts the information relevant to the passed-in DBMS object and updates it.

The updated DBMS object is not saved. It is the caller's responsibility to save the object if so desired.
Parameters:
pDBMS DBMS object to update
pSource Pointer to the Source. If provided, it is used in place of the DBMS object's own source
Returns:
Usual COM result code:
  • S_OK Success

HRESULT IDSSScriptProcessor::SymbolID [in] BSTR  Symbol,
[in] BSTR  SymbolID
 

Property to get/set the mapping between Object ID and ID Symbol in the PDS script.

The PDS scripts uses ID Aliases to map an Object ID to a symbolic name. The SymbolID property reads or sets the Object ID that maps to an ID symbol.

If an ID symbol is undefined, get_Symbol ID will return an empty string.
Parameters:
Symbol Name of the ID symbol used in the PDS file
SymbolID DSS_ID that the symbol maps to
Returns:
Usual COM result code:
  • S_OK Success
  • DSSCOM_E_NOTINITIALIZED The script processor has not been successfully initialized

HRESULT IDSSScriptProcessor::SymbolID [in] BSTR  Symbol,
[out, retval] BSTR *  pSymbolID
 

Property to get/set the mapping between Object ID and ID Symbol in the PDS script.

The PDS scripts uses ID Aliases to map an Object ID to a symbolic name. The SymbolID property reads or sets the Object ID that maps to an ID symbol.

If an ID symbol is undefined, get_Symbol ID will return an empty string.
Parameters:
Symbol Name of the ID symbol used in the PDS file
pSymbolID DSS_ID that the symbol maps to
Returns:
Usual COM result code:
  • S_OK Success
  • DSSCOM_E_NOTINITIALIZED The script processor has not been successfully initialized


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.