The following code sample can be used in an addon for the document pages (oivm & rwb) to output all document-level WebProperty values available through the Strategy Java Web API:
/**
* Strategy SDK Sample
*
* Copyright © 2011 Strategy Incorporated. All Rights Reserved.
*
* Strategy MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
* SUITABILITY OF THIS SAMPLE CODE, EITHER EXPRESS OR IMPLIED, INCLUDING
* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. Strategy SHALL NOT
* BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
* MODIFYING OR DISTRIBUTING THIS SAMPLE CODE OR ITS DERIVATIVES.
*
*
*/
package com.techsupp;
import java.util.Enumeration;
import com.Strategy.web.app.addons.AbstractAppAddOn;
import com.Strategy.web.app.beans.PageComponent;
import com.Strategy.web.beans.*;
import com.Strategy.web.objects.*;
import com.Strategy.web.objects.rw.*;
import com.Strategy.webapi.EnumDSSXMLWidthScenario;
public class OutputDocumentFlags extends AbstractAppAddOn {
public String getAddOnDescription() {
return "";
}
public void preCollectData(PageComponent page) {
System.out.println("preCollectData");
RWBean rwb = (RWBean) page.getChildByClass(RWBean.class);
System.out.println("rwb? "+rwb);
if (rwb == null)
return;
try {
rwb.collectData();
RWInstance rwi = rwb.getRWInstance();
// Avoid null pointer issue with prompted docs.
if(rwi.getDocumentProperties() == null){
System.out.println("doc props = null");
return;
}
WebPropertyGroup props = rwi.getDocumentProperties();
WebPropertySet wps = null;
Enumeration enumeration = props.elements();
while(enumeration.hasMoreElements()){
wps = (WebPropertySet) enumeration.nextElement();
System.out.println("====== " + wps.getName());
for(int x=0; x<wps.size(); x++){
System.out.println("=== " + x + ":" + wps.get(x).getName()+ " : value = "+wps.get(x).getValue());
}
}
} catch (WebBeanException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (WebObjectsException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return;
}
}preCollectData rwb? com.Strategy.web.beans.RWBeanImpl@1ad27f29 ====== RWDocumentProperties === 0:ZoomFactor : value = 1.17 === 1:DefaultPageByExportMode : value = 0 === 2:PromptUserForPagebyExport : value = -1 === 3:AllowToggleThresholds : value = 0 === 4:ExecutionFullScreenMode : value = 0 === 5:CtlAutoSubmit : value = -1 === 6:DefaultsVersion : value = 4 === 7:EmbeddedFonts : value = === 8:CalculateDocWidth : value = 0 === 9:ShowFloatingToolbars : value = -1 === 10:EnableDocumentCaching : value = -2147483648 === 11:ExportRange : value = 1 === 12:ExcelEmbedImages : value = 0 === 13:ExcelGraphFormat : value = 0 === 14:CreateDocumentCache : value = 0 === 15:ZoomType : value = 1 === 16:ShowTabsForSingleLayout : value = -1 === 17:PreLoadAllPanels : value = 0 === 18:SelectorBehavior : value = 1 === 19:layoutBarStyle : value = 0 === 20:layoutBarPosition : value = 1 === 21:ViewModeInteractivityLevel : value = 2 === 22:enableGraphTooltips : value = 0 === 23:SaveExportResultForRWD : value = -1 === 24:ShowHiddenObjects : value = 1 === 25:AllowMobileTemporaryCaching : value = -1 === 26:ExcelEnableShapes : value = 0 === 27:ApplyGBToAllLayouts : value = 2 === 28:EnablePartialCSS : value = -1 === 29:LayoutTabPosition : value = 0 === 30:IsNavigationDocument : value = 0 === 31:ExcelExportDocumentURL : value = === 32:PDFExportDocumentURL : value = === 33:DocumentExecOptimization : value = 0 === 34:ShowingBarsTemporarily : value = -1 === 35:SmartClientDoc : value = 0 === 36:DocumentVersion : value = === 37:OfflineOnCube : value = 0 === 38:PreserveTranslations : value = 0 ====== Mobile === 0:View : value = 2 === 1:FontSize : value = -1 === 2:ShowTitle : value = -1 === 3:ShowCellInfo : value = -1 === 4:EnableZoom : value = -1 === 5:RefreshFrequency : value = -1 === 6:EnableCopyForText : value = 0 === 7:EnableCopyForGridCell : value = 0 === 8:EnableExport : value = 0 === 9:DocumentThemeColor : value = 0 === 10:EnableSwipingToSwitchLayout : value = -1 ====== FormattingPage === 0:PageHeight : value = 8.5 === 1:PageWidth : value = 11 === 2:Orientation : value = 1 === 3:PaperType : value = 18 === 4:MarginTop : value = 0.5 === 5:MarginBottom : value = 0.5 === 6:MarginLeft : value = 0.5 === 7:MarginRight : value = 0.5 === 8:Scaling : value = 1 === 9:ScalePercentage : value = 100 === 10:ScalePagesWide : value = 1 === 11:ScalePagesTall : value = 1 === 12:BlackAndWhite : value = 0 === 13:PrintHeaderOn : value = 0 === 14:PrintFooterOn : value = 0 === 15:ExpandToFit : value = 0 === 16:SectionHorizontalOverflow : value = 0 === 17:ScalePageHeaderFooter : value = 0 === 18:DefaultGridStyle : value = B602F80647F25CBC1995C990712A588E === 19:GraphQualityDPI : value = 288 === 20:GraphFormat : value = 0 === 21:IncludeBookmarks : value = -1 === 22:EmbedFonts : value = 0 === 23:EditableViewMode : value = 0 === 24:ShowBookmarks : value = -1 === 25:UsePageWidthAsLayoutWidth : value = -1 === 26:DefaultViewMode : value = 1 === 27:AvailableViewModes : value = 117 === 28:UseOneSheetPerLayout : value = 0 === 29:UseOneSheetPerGroupElement : value = 0 ====== FormattingBorder === 0:HInsideStyle : value = 1 === 1:VInsideStyle : value = 1 === 2:TopStyle : value = 0 === 3:LeftStyle : value = 0 === 4:BottomStyle : value = 0 === 5:RightStyle : value = 0 === 6:HInsideColor : value = 0 === 7:VInsideColor : value = 0 === 8:TopColor : value = 0 === 9:LeftColor : value = 0 === 10:BottomColor : value = 0 === 11:RightColor : value = 0 === 12:Border3DStyle : value = 0 === 13:Border3DWeight : value = 2 ====== AnalyticalEngineProperties === 0:RemoveNullGroups : value = -1 === 1:TrimEmptySections : value = 0 === 2:AutoSelectionForUnset : value = 1 === 3:SingleSourceGrid : value = 0 === 4:RemoveMissingUnits : value = -1 === 5:UseOldRWDBehavior : value = 0 === 6:CSIGlobalOptimization : value = 3 === 7:KeepControlTargetsConsistent : value = 0 ====== FlashCompatibility === 0:CanStagger : value = 1 === 1:CanDropLabelsCategory : value = 0 === 2:CanDropLabelsLinear : value = 1 === 3:AddButtonBarPadding : value = 0 === 4:ShowGaugeLabel : value = 1 === 5:UseGaugeDefaultSeriesColors : value = 1 === 6:MaxPieLabelRadius : value = 0.3 === 7:SliderAutomaticStyle : value = 0 === 8:MultiSliderAlignment : value = 1 === 9:SingleSliderAlignment : value = 1 === 10:EnableGridPadding : value = 1 === 11:SliderFitToContents : value = 1 ====== FilterDetailsFormatProperties === 0:FilterDetailsFormat : value = ====== FormattingPatterns === 0:FillColor : value = 16777215 === 1:PatternColor : value = 8650752 === 2:PatternStyle : value = 1 === 3:FillStyle : value = 0 === 4:GradientColor : value = 16777215 === 5:GradientAngle : value = 0 === 6:GradientXOffset : value = 0 === 7:GradientYOffset : value = 0 ====== GeneralReportProperties === 0:CanBeScheduled : value = -1 === 1:AllowUsersToSubscribe : value = -1 ====== TableOfContents === 0:Enabled : value = 0 === 1:BeforeLayout : value = 1 === 2:Title : value = === 3:ShowTabLeader : value = -1 === 4:FontName : value = Arial === 5:FontBold : value = 0 === 6:FontItalic : value = 0 === 7:FontSize : value = 10 === 8:FontStrikeout : value = 0 === 9:FontUnderline : value = 0 === 10:FontColor : value = 0 === 11:FontScript : value = 0 === 12:IncludePageHeaderFooter : value = 0 === 13:TitleAlignment : value = 0 === 14:LeftIndent : value = 0 === 15:RightIndent : value = 0 === 16:TopStyle : value = 0 === 17:LeftStyle : value = 0 === 18:BottomStyle : value = 0 === 19:RightStyle : value = 0 === 20:TopColor : value = 0 === 21:LeftColor : value = 0 === 22:BottomColor : value = 0 === 23:RightColor : value = 0 === 24:UserSeparateStyleForTitle : value = 0 === 25:TitleFontName : value = Arial === 26:TitleFontBold : value = 0 === 27:TitleFontItalic : value = 0 === 28:TitleFontSize : value = 10 === 29:TitleFontStrikeout : value = 0 === 30:TitleFontUnderline : value = 0 === 31:TitleFontColor : value = 0 === 32:TitleFontScript : value = 0 === 33:TitleFillColor : value = 16777215 === 34:TilteTopStyle : value = 0 === 35:TitleLeftStyle : value = 0 === 36:TitleBottomStyle : value = 0 === 37:TitleRightStyle : value = 0 === 38:TitleTopColor : value = 0 === 39:TitleLeftColor : value = 0 === 40:TitleBottomColor : value = 0 === 41:TitleRightColor : value = 0 === 42:FillColor : value = 16777215 === 43:BorderStyle : value = 0 === 44:BorderColor : value = 0 === 45:BorderWeight : value = 1 === 46:FillStyle : value = 1 === 47:TitleFillStyle : value = 1 ====== Visualization === 0:VisualizationsEnabled : value = 0 === 1:ViewMode : value = 0 === 2:VisualizationList : value = === 3:SelectedVisualization : value = === 4:FileName : value = === 5:CustomProps : value = === 6:VisProps : value = === 7:IncludeMDProperties : value = 0 === 8:IPhoneVisualization : value = === 9:IPadVisualization : value = === 10:APhoneVisualization : value = === 11:ATabletVisualization : value = ====== WatermarkProperties === 0:WatermarkType : value = 0 === 1:Text : value = === 2:FontName : value = Arial === 3:FontBold : value = 0 === 4:FontItalic : value = 0 === 5:FontSize : value = 10 === 6:FontStrikeout : value = 0 === 7:FontUnderline : value = 0 === 8:FontColor : value = 0 === 9:FontScript : value = 0 === 10:AutoFontSize : value = -1 === 11:TextWashout : value = -1 === 12:TextOrientation : value = 0 === 13:ImageSource : value = === 14:ImageScale : value = -1 ====== VLDB Select === 0:Join Across Datasets : value = 0