MicroStrategy ONE

Displaying the TinyURL Version of an Object Link on the Properties Dialog

By default, when you view the properties of an object on a Folder Browsing page, the value of the link on the properties dialog contains the full URL used to access the object in MicroStrategy Web. In many cases, you may want to copy this link and send it to someone in an e-mail or use it in a blog or a discussion board. However, this link is often quite long which can cause problems when you try to cut and paste the link. For example, when you place a long link in a discussion board, the link may have carriage returns in it.

The properties editor is opened by right-clicking an object on a  Folder Browsing page and choosing Properties from the context menu. To copy the link on the Properties dialog, you can right-click the link and choose Copy Shortcut from the context menu.

tinyURL.com is a web site that provides short aliases to redirect long URLs, giving users a shortened version of a link that is much easier to use. In this customization scenario, you modify the properties dialog so that it displays the tinyURL version of the object link in place of the full URL. To accomplish this, you create a custom transform that uses the tinyURL.com web site to create a shortened link to the object. More information about tinyURL can be obtained at http://tinyurl.com. After you have made these changes, when you right-click an object on a Folder Browsing page (for example, when you right-click on an object (that is, a report, document, or folder) on the Shared Reports page), the value of the link will be a shortened version created by the tinyURL utility.

Because this customization uses the tinyURL web site, MicroStrategy Web users must have access to the Internet. In addition, anyone trying to use the resulting link must also have access to the Internet.

Before customization:

After customization:

This customization can be accomplished using either of the following methods:

Deploying the plug-in provided with MicroStrategy SDK

MicroStrategy SDK provides a plug-in (ZIP file) that can simply be extracted to thepluginsfolder to view the customization in MicroStrategy Web. The following steps guide you in locating the plug-in and deploying it.

  1. Access the plug-in: JSP version or ASP .NET version.

  2. Extract the plug-in to the plugins subfolder inside the MicroStrategy Web installation folder.

  3. Launch MicroStrategy Web to view the customization.

Using the Web Customization Editor to create a plug-in

MicroStrategy SDK provides a Web Customization Editor that can be used to create a customization plug-in. The following steps guide you in creating the plug-in and deploying it.

  1. Launch the Web Customization Editor.

  2. Click on MicroStrategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations.

  3. Right-click Styles and select Create Transform to launch the Transform Creation Wizard.

  4. Click Browse... next to the Source folder text field to select the src folder and click OK.

  1. Enter the following information for the rest of the text fields.
    Package
    : com.microstrategy.sdk.samples.transforms
    Name
    : TinyURLObjectManipulationDialogTransform
    Transform description
    : This transform displays the Tiny URL for an object.
    Superclass
    : com.microstrategy.web.app.transforms.ObjectManipulationDialogTransform

  2. Click Next.

  3. Click the radio button for Uncheck all methods.

  4. Click Next

  5. Click Finish. TinyURLObjectManipulationDialogTransform.java opens in the editor. The sample, TinyURLObjectManipulationDialogTransform.java, contains the entire code for this custom transform. You can use this code in TinyURLObjectManipulationDialogTransform.java that is open for editing.

  6. Save your changes.

  7. Navigate to Styles->ObjectManipulationDialogStyle.

  8. Double-click ObjectManipulationDialogStyle to launch the Style Properties editor in the right frame.

  9. Click Change to select a new transform.

  10. Enter TinyURLObjectManipulationDialogTransform in the text field.

  11. Select TinyURLObjectManipulationDialogTransform from your project and click OK.

  12. Save your changes.

  13. Launch MicroStrategy Web to view the customization.