MicroStrategy ONE

Importing a Package

You can programmatically import a package into MicroStrategy Web. In this context, a package is a binary file (representing an object) that Intelligence Server understands but MicroStrategy Web does not. If there is an object in the package whose definition is composed of other objects, those other component objects must either be in the package or already exist in the target metadata. Otherwise, the package will fail to import. Examples of a package would be a single report or document, multiple reports and documents, or a dashboard and its datasets, filters, prompts, attributes, and metrics.

You import a package using the following methods in the WebSourceManipulator interface:

  • createObjectDeltaPackage  
  • applyDeltaPackage

Setting a flag to generate the log instead of performing the import 

You can also set a flag that lets you view the results of an import action without performing the actual import, using the setFlag method in the WebSourceManipulator interface. This allows you to perform a dry run of the import, similar to the "Generate log only" option in Object Manager. Use the code shown below to set the flag to generate only the log file:

setFlag(EnumDSSXMLSourceManipulatorFlags.DssSourceManipulatorLogOnly);
 

When you set this flag, the objects are not copied but you can see the steps that would be performed during the import action in the DSSErrors.log file.

Setting the inherited ACL

You can set the inherited ACL on objects before the package is imported. Use code like the code shown below to set the inherited ACL:

setInheritACL(EnumDSSXMLSourceManipulatorInheritACL.DssSourceManipulatorInheritACLNormal);
 

You can use the following values from the enumeration, EnumDSSXMLSourceManipulatorInheritACL, to set the inherited ACL.

  • DssSourceManipulatorInheritACLOriginal =0x00000001

This setting copies ACLs from the original object to the object that is being saved.

  • DssSourceManipulatorInheritACLInherit =0x00000002

    This setting allows the object that is being saved to inherit ACLs from the folder into which it is saved.

  • DssSourceManipulatorInheritACLUserFullControl =0x00000004

    This setting adds an ACL that gives the user invoking the manipulation full control (and ownership).

  • DssSourceManipulatorInheritACLNormal =DssSourceManipulatorInheritACLOriginal | DssSourceManipulatorInheritACLInherit

    The saved object uses the ACL from the original object and inheritable ACLs from its folder. This is the expected setting used for applying a delta file.

  • DssInheritACLAll =DssSourceManipulatorInheritACLNormal | DssSourceManipulatorInheritACLUserFullControl

    This setting inherits everything.  

  • DssInheritACLInheritableFolderOnly =DssSourceManipulatorInheritACLInherit

    This setting provides an alternative name (for backward compatibility).  

The following value is forbidden, since it would result in an object with an empty ACL

  • DssSourceManipulatorInheritACLReserved =0