Package com.microstrategy.web.objects
Interface WebReportManipulation
-
- All Superinterfaces:
WebResultSetManipulation
public interface WebReportManipulation extends WebResultSetManipulation
The report manipulation interface allows the user to apply a set of manipulations to the associated report instance. This interface is obtained from, and connected to, aWebReportInstance
object. In addition, this interface contains many methods relating to derived metric manipulations.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description WebReportInstance
addDerivedMetric(java.lang.String formulae, int position)
Adds a new derived metric to the report.WebReportInstance
addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias)
Adds a new derived metric to the report.WebReportInstance
addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream)
Adds a new derived metric to the report.WebReportInstance
addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream, boolean isPassThrough, java.lang.String metricFormatType)
WebReportInstance
addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias, java.lang.Boolean aggFromBase)
Adds a new derived metric to the report.WebReportInstance
addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias, java.lang.Boolean aggFromBase, boolean isPassThrough)
WebReportInstance
addPercentToTotalMetric(WebPercentToTotalMetric metric)
Adds a percent to total metric to the Report.WebReportInstance
addQuickCalculationGroup(java.lang.String deName, java.lang.String attId, int depth, int[] ordinals, int function)
Deprecated.WebReportInstance
addQuickCalculationGroup(java.lang.String deName, java.lang.String attId, int depth, int[] ordinals, int function, WebDerivedElements target)
WebReportInstance
addQuickListGroup(java.lang.String deName, java.lang.String attId, int depth, int[] ordinals)
Deprecated.WebReportInstance
addQuickListGroup(java.lang.String deName, java.lang.String attId, int depth, int[] ordinals, WebDerivedElements target)
WebReportInstance
addRankMetric(WebRankMetric metric)
Adds a rank metric to the Report.WebReportInstance
addShortcutMetric(int functionType, int functionType2, java.util.List<WebObjectInfo> unitsInfo)
WebReportInstance
addTransformationMetric(WebTransformationMetric metric)
Adds a transformation metric to the Report.WebReportInstance
applyChangeForReplaceObjects(java.util.List<org.apache.commons.lang3.tuple.Pair<WebObjectInfo,WebObjectInfo>> listOfWebObjectsToReplace, int clearAlias, int clearFormats, int clearFilter)
Creates XML request either to remove or replace objects from different data source.WebReportInstance
applyChanges()
Sends all changes to the template and filter to the Intelligence Server.WebReportInstance
applyChanges(java.lang.String deltaXML)
Sends the given report manipulation XML to the Intelligence Server.WebReportInstance
applyChanges(java.lang.String deltaXML, int requestTimeout)
Sends the given report manipulation XML to the Intelligence Server.WebReportInstance
applyChanges(java.lang.String deltaXML, int requestTimeout, StringWrapper resultXML)
Sends the given report manipulation XML to the Intelligence Server.WebReportInstance
applyStyleByID(java.lang.String id)
Apply a style by style DSSID.WebReportInstance
applyStyleByName(java.lang.String name)
Apply a style by style name.WebReportInstance
changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias)
This changes the formula or alias of the derived metric.WebReportInstance
changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream)
This changes the formula or alias of the derived metric.WebReportInstance
changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream, boolean isPassThrough, java.lang.String metricFormatType)
WebReportInstance
changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias, java.lang.Boolean aggFromBase)
This changes the formula or alias of the derived metric.WebReportInstance
changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias, java.lang.Boolean aggFromBase, boolean isPassThrough)
WebReportInstance
changeDerivedMetric(java.lang.String objectID, java.lang.String formula, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream, boolean isPassThrough)
This changes the formula or alias of the derived metric.WebReportInstance
changeDerivedMetricAggFromBase(java.lang.String formulae, int position, java.lang.String alias, java.lang.Boolean aggFromBase)
This changes the formula or alias of the derived metric.WebReportInstance
changeDerivedMetricAggFromBase(java.lang.String formulae, int position, java.lang.String alias, java.lang.Boolean aggFromBase, java.lang.Boolean isTokenStream)
This changes the formula or alias of the derived metric.WebReportInstance
changeEmmaSourceTablesExecutionAction(java.util.Map<java.lang.String,java.lang.Integer> tbs)
Change EMMA source tables execution action flagsEnumDSSXMLTableStateExecutionAction
according to the policy, suggest to pass all the source tables with its policy together.WebReportInstance
changeEmmaSourceTablesPolicy(java.util.Map<java.lang.String,java.lang.Integer> tbs)
Change EMMA source tables policy, suggest to pass all the source tables with its policy togetherWebReportInstance
changeMapping(java.lang.String tableID, java.lang.String tableName, java.util.List<MappingOperation> mappings)
change mappingWebReportInstance
clearDiscoverCache(java.lang.String tableId)
clear discover cacheWebReportInstance
createPickTable(java.lang.String tableID, java.lang.String xdaType, java.lang.String dict, java.lang.String tableName, java.lang.String dbTableName, java.lang.String nameSpace, java.lang.String dbrID)
Create pick tableWebReportInstance
createPushDataTables(java.util.List<java.lang.String> tableNames)
create pushdatatablesWebReportInstance
createSourceTable(java.lang.String tableId, java.lang.String tableName, java.lang.String xdaType, java.lang.String connectorType)
create tableWebReportInstance
customMappingForEmmaSourceTable(java.lang.String tableName, MappingCreator mappingCreator)
custom mapping for EMMA source tableWebReportInstance
customMappingForEmmaSourceTables(java.util.List<MappingCreator> mappingCreators)
customMapping for EmmaSourceTablesWebReportInstance
drill(java.lang.String drillKey, java.lang.String[] drillElements, java.util.Map drillProperties)
Drills on the current report instance using the drill path key and settings passed as arguments.WebReportInstance
editEMMASourceTable(java.lang.String srcTableID, java.lang.String tableName, java.lang.String tableFormatLeft, java.lang.String tableFormatTop, java.lang.String tableFormatWidth, java.lang.String tableFormatHeight, java.lang.String executionFlag, java.lang.String isImportBinary, java.lang.String refreshType)
edit editEMMASourceTableWebReportInstance
editEMMASourceTables(JSONArray commands)
edit editEMMASourceTables in batchWebReportInstance
editFreeFormSQL(java.lang.String expdef, java.lang.String emmaSourceTableId)
edit FreeFormSQLWebReportInstance
editRelationship(java.lang.String tableName, java.util.List<MappingRelationship> relationships)
edit relationshipWebReportInstance
filterOnSelections(java.lang.String[] drillElements, java.util.Map drillProperties)
boolean
getAcceptSQLManipulation()
Returns the value of the acceptSQLManipulation flag.java.lang.String
getDeltaXML()
Returns the delta XML which would be sent to the Intelligence Server upon calling applyChanges().int
getExecutionFlags()
Returns the current setting of execution flags.int
getExecutionFlagsExtension()
Returns the current setting of execution flags extension.WebGraphProperties
getGraphProperties()
Return aWebGraphProperties
object, which can be used to set the web graph properties.int
getManipulationType()
Returns the manipulation type of a submission of changes to a report instance.WebPercentToTotalMetric
getNewPercentToTotalMetric(WebMetric metric)
Returns a new instance of theWebPercentToTotalMetric
object.WebRankMetric
getNewRankMetric(WebMetric metric)
Returns a new instance of theWebRankMetric
object.WebTransformationMetric
getNewTransformationMetric(WebMetric metric, WebObjectInfo transformationRole)
Returns a new instance of theWebTransformationMetric
object.int
getPreviewRows()
Returns the number of preview rows.WebProperties
getReportProperties()
Return current setting for WebProperties.int
getResultFlags()
Returns the result flags which will be sent upon calling applyChanges.WebResultWindow
getResultWindow()
Returns the result window which can be used to set the result window to be passed to the Intelligence server upon calling applyChanges.int
getValidationLevel()
Returns the validation level of a submission of changes to a report instance.boolean
isInstanceModified()
This method will return whether the submission of the changes to the report instance so far will cause a new report instance to be created.WebReportInstance
makeTabular()
WebReportInstance
raExpandCollapse(java.lang.String attId, int axis, int ordinal, int depth, boolean expand)
WebReportInstance
refresh(boolean rePrompt)
refreshes the report results.WebReportInstance
refresh(boolean rePrompt, IntWrapper jobId)
refreshes the report results which updates the jobId.WebReportInstance
refresh(java.lang.String promptAnswerXML)
refreshes the report results.WebReportInstance
refreshEmmaCubeTablesWithExtParam(java.lang.String extParam)
Refresh EMMA cube with extended parametersboolean
requiresNewInstance()
Determines whether the changes made to the filter and template of this report will cause a new report instance (and thus, a reexecution of SQL).WebReportInstance
resetChanges()
Return a new WebReportInstanceWebReportInstance
which is the same as this report instance, except that the returned report instsance does not have any manipulation having been done for this report instance.void
setAcceptSQLManipulation(boolean acceptSQLManipulation)
Sets the value of the acceptSQLManipulation flag.WebReportInstance
setCurrentPageByElement(java.lang.String elementID, int elementStatus, boolean applyChanges)
WebReportInstance
setDataImportInfo(java.lang.String tbID, java.lang.String dbRoleID, java.lang.String sourceAccountID, java.lang.String url, java.lang.String userDisplayName, java.lang.String reportAddress, java.lang.String reportDesc, java.lang.String reportMimetype, java.lang.String reportName, java.lang.String shtIx, java.lang.String fileType, java.lang.String sparkURL)
set DataImportInfovoid
setExecutionFlags(int executionFlags)
Sets the execution flags property.void
setExecutionFlagsExtension(int executionFlagsExtension)
Sets the execution flags extension property.void
setPreviewRows(int previewRows)
Sets the number of preview rows.void
setResultFlags(int resultFlags)
Allows the user to set the result flags which will be sent upon calling applyChanges.WebReportInstance
showAllThresholds(boolean show)
Show all thresholds for all metrics.WebReportInstance
showAllThresholds(boolean show, WebMetric metric)
Show all thresholds for a specific metric.WebReportInstance
syncModel(java.lang.String modelJSON, int serveMode)
edit syncModelWebReportInstance
syncModel(java.lang.String modelJSON, int serveMode, java.util.List<TableAction> tableActions)
edit syncModelWebReportInstance
toggleDatasetServerMode(int serverMode)
Toggle dataset server modejava.lang.String
validateExpression(java.lang.String tokenStreamXML, boolean isForMetric, int outFlags, int baseFormType)
-
Methods inherited from interface com.microstrategy.web.objects.WebResultSetManipulation
getAcceptPartialResults, setAcceptPartialResults
-
-
-
-
Method Detail
-
getAcceptSQLManipulation
boolean getAcceptSQLManipulation()
Returns the value of the acceptSQLManipulation flag. This flag determines whether to allow the Intelligence Server to perform a SQL manipulation in response to an applyChanges call. By default, this flag is true.- Returns:
- The current value of the acceptSQLManipulation flag.
- See Also:
setAcceptSQLManipulation(boolean)
-
setAcceptSQLManipulation
void setAcceptSQLManipulation(boolean acceptSQLManipulation)
Sets the value of the acceptSQLManipulation flag. This flag determines whether to allow the Intelligence Server to perform a SQL manipulation in response to an applyChanges call.- Parameters:
acceptSQLManipulation
- The new value for the acceptSQLManipulation flag.- See Also:
getAcceptSQLManipulation()
-
applyChanges
WebReportInstance applyChanges() throws WebObjectsException, WebReportValidationException
Sends all changes to the template and filter to the Intelligence Server. Returns a WebReportInstance object. The returned object will be the same as the object which applyChanges was called upon, with the difference of the state ID being increased by 1, if it was not necessary to generate a new report instance. If a new report instance was necessary (i.e. the report changes caused SQL generation), then this method will return a new WebReportInstance object with the new message ID. Finally, note that this method will update the manipulation type and validation level properties on this object.- Returns:
- The resultant WebReportInstance object from applying the changes.
- Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
applyChanges
WebReportInstance applyChanges(java.lang.String deltaXML) throws WebObjectsException, WebReportValidationException
Sends the given report manipulation XML to the Intelligence Server. Returns a WebReportInstance object. The returned object will be the same as the object which applyChanges was called upon, with the difference of the state ID being increased by 1, if it was not necessary to generate a new report instance. If a new report instance was necessary (i.e. the report changes caused SQL generation), then this method will return a new WebReportInstance object with the new message ID. Finally, note that this method will update the manipulation type and validation level properties on this object.- Parameters:
deltaXML
- The report manipulation delta XML to send to the Intelligence Server.- Returns:
- The resultant WebReportInstance object from applying the changes.
- Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
applyChanges
WebReportInstance applyChanges(java.lang.String deltaXML, int requestTimeout) throws WebObjectsException, WebReportValidationException
Sends the given report manipulation XML to the Intelligence Server. Returns a WebReportInstance object. The returned object will be the same as the object which applyChanges was called upon, with the difference of the state ID being increased by 1, if it was not necessary to generate a new report instance. If a new report instance was necessary (i.e. the report changes caused SQL generation), then this method will return a new WebReportInstance object with the new message ID. Finally, note that this method will update the manipulation type and validation level properties on this object.- Parameters:
deltaXML
- The report manipulation delta XML to send to the Intelligence Server.requestTimeout
- The session request timeout value. It is used to override the default session request timeout.- Returns:
- The resultant WebReportInstance object from applying the changes.
- Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
applyChanges
WebReportInstance applyChanges(java.lang.String deltaXML, int requestTimeout, StringWrapper resultXML) throws WebObjectsException, WebReportValidationException
Sends the given report manipulation XML to the Intelligence Server. Returns a WebReportInstance object. The returned object will be the same as the object which applyChanges was called upon, with the difference of the state ID being increased by 1, if it was not necessary to generate a new report instance. If a new report instance was necessary (i.e. the report changes caused SQL generation), then this method will return a new WebReportInstance object with the new message ID. Finally, note that this method will update the manipulation type and validation level properties on this object.- Parameters:
deltaXML
- The report manipulation delta XML to send to the Intelligence Server.requestTimeout
- The session request timeout value. It is used to override the default session request timeout.resultXML
- The manipulation result XML returned- Returns:
- The resultant WebReportInstance object from applying the changes.
- Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
getReportProperties
WebProperties getReportProperties()
Return current setting for WebProperties. Its default one is from WebReportSource (TBD). If there is no setting, an empty WebProperties object will be return. Then through WebProperties interface, property can be added/removed/changed. The properties in this WebProperties object will be used when re-execute the report.?- Returns:
- the current
WebProperties
in this instance.
-
getGraphProperties
WebGraphProperties getGraphProperties()
Return aWebGraphProperties
object, which can be used to set the web graph properties. The user can use the methods exposed by WebGraphProperties interface to add and manipulate the properties inside it.- Returns:
- Return a
WebGraphProperties
object to represent current settings of WebGraphProperties.
-
isInstanceModified
boolean isInstanceModified() throws WebObjectsException
This method will return whether the submission of the changes to the report instance so far will cause a new report instance to be created. Note that this method will NOT cause the actual execution of the changes made to the report instance. This method will also update the manipulation type and validation level properties with more information on the type of change that the operation would cause.- Specified by:
isInstanceModified
in interfaceWebResultSetManipulation
- Returns:
- Whether the report instance change submission would cause a new report instance to be created.
- Throws:
WebObjectsException
- Thrown if the server could not be contacted or another fatal error occurs.
-
getDeltaXML
java.lang.String getDeltaXML() throws WebObjectsException
Returns the delta XML which would be sent to the Intelligence Server upon calling applyChanges(). This XML will be derived from the changes made to the template and filters of the owner report instance.- Specified by:
getDeltaXML
in interfaceWebResultSetManipulation
- Returns:
- The delta XML string for the current state of the report instance.
- Throws:
WebObjectsException
- Signals that the delta XML could not be determined.
-
requiresNewInstance
boolean requiresNewInstance() throws WebObjectsException
Determines whether the changes made to the filter and template of this report will cause a new report instance (and thus, a reexecution of SQL).- Specified by:
requiresNewInstance
in interfaceWebResultSetManipulation
- Returns:
- True if the changes made will cause a reexecution of SQL, false if they will not cause SQL to be executed.
- Throws:
WebObjectsException
- Signals an error when contacting the Intelligence Server.
-
getManipulationType
int getManipulationType()
Returns the manipulation type of a submission of changes to a report instance. This variable is updated after calling applyChanges or requiresNewInstance. The return value comes fromEnumDSSXMLManipulationType
.- Returns:
- The manipulation type of the last report manipulation sent to the Intelligence Server.
-
getValidationLevel
int getValidationLevel()
Returns the validation level of a submission of changes to a report instance. This variable is updated after calling applyChanges or requiresNewInstance. The return value comes fromEnumDSSXMLValidationLevel
.- Returns:
- The validation level of the last report manipulation sent to the Intelligence Server.
-
getNewPercentToTotalMetric
WebPercentToTotalMetric getNewPercentToTotalMetric(WebMetric metric) throws java.lang.IllegalArgumentException, WebObjectsException
Returns a new instance of theWebPercentToTotalMetric
object. This derived metric is based on the specified metric on the template or working set.- Parameters:
metric
- TheWebMetric
object used to create the derived metric.- Returns:
- the
WebPercentToTotalMetric
object created. - Throws:
java.lang.IllegalArgumentException
- thrown if the metric is null or does not exist in the template or in the working set.WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.
-
getNewRankMetric
WebRankMetric getNewRankMetric(WebMetric metric) throws java.lang.IllegalArgumentException, WebObjectsException
Returns a new instance of theWebRankMetric
object. This derived metric is based on the specified metric on the template or working set.- Parameters:
metric
- TheWebMetric
object used to create the derived metric.- Returns:
- The
WebRankMetric
object created. - Throws:
java.lang.IllegalArgumentException
- thrown if the metric is null or does not exist in the template or in the working set.WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.
-
getNewTransformationMetric
WebTransformationMetric getNewTransformationMetric(WebMetric metric, WebObjectInfo transformationRole) throws java.lang.IllegalArgumentException, WebObjectsException
Returns a new instance of theWebTransformationMetric
object. This derived metric is based on the specified metric on the template or working set.- Parameters:
metric
- TheWebMetric
object used to create the derived metric.transformationRole
- aWebObjectInfo
object that should have a type of DssXmlTypeRole and a subtype of DssXmlSubTypeRoleTransformation fromEnumDSSXMLObjectSubTypes
.- Returns:
- The
WebTransformationMetric
object created. - Throws:
java.lang.IllegalArgumentException
- thrown if the metric is null or does not exist in the template or in the working set. Also thrown if the transformation role object does not have the correct type and subtype.WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.
-
addDerivedMetric
WebReportInstance addDerivedMetric(java.lang.String formulae, int position) throws WebObjectsException, WebReportValidationException
Adds a new derived metric to the report. This method will call addDerivedMetric with the same parameters but adding an empty alias name.- Parameters:
formulae
- The formula of the derived metric that can be understood by the parser.position
- The position for the metric on the metrics template unit.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
addDerivedMetric
WebReportInstance addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias) throws WebObjectsException, WebReportValidationException
Adds a new derived metric to the report.- Parameters:
formulae
- The formula of the derived metric that can be understood by the parser.position
- The position for the metric on the metrics template unit.alias
- The display name for the metric.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
addDerivedMetric
WebReportInstance addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias, java.lang.Boolean aggFromBase) throws WebObjectsException, WebReportValidationException
Adds a new derived metric to the report.- Parameters:
formulae
- The formula of the derived metric that can be understood by the parser.position
- The position for the metric on the metrics template unit.alias
- The display name for the metric.aggFromBase
- flag to indicate whether the metric should aggregate from base.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
addDerivedMetric
WebReportInstance addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias, java.lang.Boolean aggFromBase, boolean isPassThrough) throws WebObjectsException, WebReportValidationException
-
addDerivedMetric
WebReportInstance addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream) throws WebObjectsException, WebReportValidationException
Adds a new derived metric to the report.- Parameters:
formulae
- The formula of the derived metric that can be understood by the parser.position
- The position for the metric on the metrics template unit.alias
- The display name for the metric.aggFromBase
- flag to indicate whether the metric should aggregate from base.stFromBase
- flag to indicate whether the metric should subtotal from base.isTokenStream
- flag to indicate whether the formula is a token stream.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
addDerivedMetric
WebReportInstance addDerivedMetric(java.lang.String formulae, int position, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream, boolean isPassThrough, java.lang.String metricFormatType) throws WebObjectsException, WebReportValidationException
-
changeDerivedMetricAggFromBase
WebReportInstance changeDerivedMetricAggFromBase(java.lang.String formulae, int position, java.lang.String alias, java.lang.Boolean aggFromBase) throws WebObjectsException, WebReportValidationException
This changes the formula or alias of the derived metric. If the key of the metric that is passed in does not correspond to a derived metric and a formula is passed in, then the existing metric is replaced by a derived metric with the given formula and alias- Parameters:
key
- key of the metric for which changes need to be made. The key can be obtained usingWebTemplateMetric.getKey()
formula
- The formula of the derived metric that can be understood by the parser.alias
- The display name for the metric.aggFromBase
- flag to indicate whether the metric should aggregate from base.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
WebReportValidationException
-
changeDerivedMetricAggFromBase
WebReportInstance changeDerivedMetricAggFromBase(java.lang.String formulae, int position, java.lang.String alias, java.lang.Boolean aggFromBase, java.lang.Boolean isTokenStream) throws WebObjectsException, WebReportValidationException
This changes the formula or alias of the derived metric. If the key of the metric that is passed in does not correspond to a derived metric and a formula is passed in, then the existing metric is replaced by a derived metric with the given formula and alias- Parameters:
key
- key of the metric for which changes need to be made. The key can be obtained usingWebTemplateMetric.getKey()
formula
- The formula of the derived metric that can be understood by the parser.alias
- The display name for the metric.aggFromBase
- flag to indicate whether the metric should aggregate from base.isTokenStream
- flag to indicate whether the formula is a token stream.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
WebReportValidationException
-
changeDerivedMetric
WebReportInstance changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias) throws WebObjectsException, WebReportValidationException
This changes the formula or alias of the derived metric. If the key of the metric that is passed in does not correspond to a derived metric and a formula is passed in, then the existing metric is replaced by a derived metric with the given formula and alias- Parameters:
key
- key of the metric for which changes need to be made. The key can be obtained usingWebTemplateMetric.getKey()
formula
- The formula of the derived metric that can be understood by the parser.alias
- The display name for the metric.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
WebReportValidationException
- Since:
- MicroStrategy Web 8.0.0
-
changeDerivedMetric
WebReportInstance changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias, java.lang.Boolean aggFromBase) throws WebObjectsException, WebReportValidationException
This changes the formula or alias of the derived metric. If the key of the metric that is passed in does not correspond to a derived metric and a formula is passed in, then the existing metric is replaced by a derived metric with the given formula and alias- Parameters:
key
- key of the metric for which changes need to be made. The key can be obtained usingWebTemplateMetric.getKey()
formula
- The formula of the derived metric that can be understood by the parser.alias
- The display name for the metric.aggFromBase
- flag to indicate whether the metric should aggregate from base.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
WebReportValidationException
-
changeDerivedMetric
WebReportInstance changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias, java.lang.Boolean aggFromBase, boolean isPassThrough) throws WebObjectsException, WebReportValidationException
-
changeDerivedMetric
WebReportInstance changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream) throws WebObjectsException, WebReportValidationException
This changes the formula or alias of the derived metric. If the key of the metric that is passed in does not correspond to a derived metric and a formula is passed in, then the existing metric is replaced by a derived metric with the given formula and alias- Parameters:
key
- key of the metric for which changes need to be made. The key can be obtained usingWebTemplateMetric.getKey()
formula
- The formula of the derived metric that can be understood by the parser.alias
- The display name for the metric.aggFromBase
- flag to indicate whether the metric should aggregate from base.stFromBase
- flag to indicate whether the metric should subtotal from base.isTokenStream
- flag to indicate whether the formula is a token stream.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
WebReportValidationException
-
changeDerivedMetric
WebReportInstance changeDerivedMetric(int key, java.lang.String formula, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream, boolean isPassThrough, java.lang.String metricFormatType) throws WebObjectsException, WebReportValidationException
-
changeDerivedMetric
WebReportInstance changeDerivedMetric(java.lang.String objectID, java.lang.String formula, java.lang.String alias, int aggFromBase, int stFromBase, java.lang.Boolean isTokenStream, boolean isPassThrough) throws WebObjectsException, WebReportValidationException
This changes the formula or alias of the derived metric.- Parameters:
objectID
- The DSS ID of the metric for which changes need to be made.formula
- The formula of the derived metric that can be understood by the parser.alias
- The display name for the metric.aggFromBase
- flag to indicate whether the metric should aggregate from base.stFromBase
- flag to indicate whether the metric should subtotal from base.isTokenStream
- flag to indicate whether the formula is a token stream.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
WebReportValidationException
-
addPercentToTotalMetric
WebReportInstance addPercentToTotalMetric(WebPercentToTotalMetric metric) throws java.lang.IllegalArgumentException, WebObjectsException, WebReportValidationException
Adds a percent to total metric to the Report.- Parameters:
metric
- theWebPercentToTotalMetric
to be added to the report.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.java.lang.IllegalArgumentException
- if the metric to be added is null.
-
addRankMetric
WebReportInstance addRankMetric(WebRankMetric metric) throws java.lang.IllegalArgumentException, WebObjectsException, WebReportValidationException
Adds a rank metric to the Report.- Parameters:
metric
- theWebRankMetric
to be added to the report.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.java.lang.IllegalArgumentException
- if the metric to be added is null.
-
addTransformationMetric
WebReportInstance addTransformationMetric(WebTransformationMetric metric) throws java.lang.IllegalArgumentException, WebObjectsException, WebReportValidationException
Adds a transformation metric to the Report.- Parameters:
metric
- theWebTransformationMetric
to be added to the report.- Returns:
- A
WebReportInstance
object with the applied changes. - Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.java.lang.IllegalArgumentException
- if the metric to be added is null.
-
applyStyleByName
WebReportInstance applyStyleByName(java.lang.String name) throws java.lang.IllegalArgumentException, WebObjectsException, WebReportValidationException
Apply a style by style name.- Parameters:
name
- the name of the style to be applied.- Returns:
- A
WebReportInstance
object with the applied style. - Throws:
java.lang.IllegalArgumentException
- Thrown when the name is null or empty string.WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
applyStyleByID
WebReportInstance applyStyleByID(java.lang.String id) throws java.lang.IllegalArgumentException, WebObjectsException, WebReportValidationException
Apply a style by style DSSID.- Parameters:
id
- the DSSID of the style object to be applied.- Returns:
- A
WebReportInstance
object with the applied style. - Throws:
java.lang.IllegalArgumentException
- Thrown when id is null or empty string.WebObjectsException
- Singals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
showAllThresholds
WebReportInstance showAllThresholds(boolean show) throws WebObjectsException, WebReportValidationException
Show all thresholds for all metrics.- Parameters:
show
- true to show all thresholds for all metrics, false to hide the thresholds for all metrics- Returns:
- The resultant WebReportInstance object
- Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.
-
showAllThresholds
WebReportInstance showAllThresholds(boolean show, WebMetric metric) throws java.lang.IllegalArgumentException, WebObjectsException, WebReportValidationException
Show all thresholds for a specific metric.- Parameters:
show
- true to show thresholds, false to hide thresholds.metric
- theWebMetric
object, whose thresholds will be affected.- Returns:
- The resultant WebReportInstance object
- Throws:
WebObjectsException
- Signals an error when sending the changes to the Intelligence Server.WebReportValidationException
- Signals a report validation error from the Intelligence Server.java.lang.IllegalArgumentException
- if parameter metric is null
-
getResultWindow
WebResultWindow getResultWindow()
Returns the result window which can be used to set the result window to be passed to the Intelligence server upon calling applyChanges.- Returns:
- The
WebResultWindow
object which can be used to send a window to the Server upon calling the applyChanges.
-
resetChanges
WebReportInstance resetChanges()
Return a new WebReportInstanceWebReportInstance
which is the same as this report instance, except that the returned report instsance does not have any manipulation having been done for this report instance. This is an opposite operation of applyChanges(). The returned WebReportInstance is identical to current WebReportInstance, except that all manipulations have been cleared.- Returns:
- WebReportInstance A new WebReportInstance.
-
getExecutionFlags
int getExecutionFlags()
Returns the current setting of execution flags. This flag value tells the Intelligence Server the settings to use when executing a report.- Returns:
- The current execution flags, from
EnumDSSXMLExecutionFlags
. - See Also:
setExecutionFlags(int)
-
setExecutionFlags
void setExecutionFlags(int executionFlags)
Sets the execution flags property. This flag value tells the Intelligence Server the settings to use when executing a report.- Parameters:
executionFlags
- The new value of execution flags, a value which is the bitwise or (|) from values inEnumDSSXMLExecutionFlags
.- See Also:
getExecutionFlags()
-
getExecutionFlagsExtension
int getExecutionFlagsExtension()
Returns the current setting of execution flags extension. This flag value tells the Intelligence Server the settings to use when executing a report.- Returns:
- The current execution flags extension, form
EnumDSSXMLExecutionFlagsExtension
. - See Also:
setExecutionFlagsExtension(int)
-
setExecutionFlagsExtension
void setExecutionFlagsExtension(int executionFlagsExtension)
Sets the execution flags extension property. This flag value tells the Intelligence Server the settings to use when executing a report.- Parameters:
executionFlagsExtension
- The new value of execution flags extension, a value which is the bitwise or (|) from values inEnumDSSXMLExecutionFlagsExtension
- See Also:
getExecutionFlagsExtension()
-
getPreviewRows
int getPreviewRows()
Returns the number of preview rows. This field value tells the Intelligence Server to use the number of rows for data preview.- Returns:
- The number of rows of preview data.
- See Also:
setPreviewRows(int)
-
setPreviewRows
void setPreviewRows(int previewRows)
Sets the number of preview rows. This field value tells the Intelligence Server the set the number of rows for data preview.- Parameters:
previewRows
- The number of rows of preview data.- See Also:
getPreviewRows()
-
getResultFlags
int getResultFlags()
Returns the result flags which will be sent upon calling applyChanges.- Returns:
- The result flag value sent upon calling applyChanges. This will be
the bitwise or (|) of values from
EnumDSSXMLResultFlags
. - See Also:
setResultFlags(int)
-
setResultFlags
void setResultFlags(int resultFlags)
Allows the user to set the result flags which will be sent upon calling applyChanges.- Parameters:
resultFlags
- The result flags which will be used upon calling applyChanges, from the bitwise or (|) of values fromEnumDSSXMLResultFlags
.- See Also:
getResultFlags()
-
drill
WebReportInstance drill(java.lang.String drillKey, java.lang.String[] drillElements, java.util.Map drillProperties) throws WebObjectsException
Drills on the current report instance using the drill path key and settings passed as arguments.- Parameters:
drillKey
- This is the key to the drill path to be used for drilling. The drill key can be obtained fromWebDrillPath.getKey()
drillElements
- This is a string array of the drill elements representing the user filter. Each drill element is represented by an identifier (String) that can be obtained fromWebHeader.getDrillElement()
drillProperties
- This should be a map of drill settings that the user wants to override while drilling. The keys in the map should be fromEnumWebDrillProperties
. Based on the type of drill property (int/boolean), following are the object types that can be passed as values in the Map :
[1] For a drill property that can have integer values, an Integer or String object, wrapping the (integer) value, should be set.
[2] For a drill property that can have only boolean values, a Boolean or String object representing the (boolean) value should be set. The String object should have values {"true", "false", "1", "0"} only.- Returns:
- the new instance upon drilling.
- Throws:
WebObjectsException
- signal error encountered by IServer while executing the drill.- Since:
- MicroStrategy Web 8.0.0
-
filterOnSelections
WebReportInstance filterOnSelections(java.lang.String[] drillElements, java.util.Map drillProperties) throws WebObjectsException
- Throws:
WebObjectsException
- Since:
- MicroStrategy Web 9.0.0
-
refresh
WebReportInstance refresh(boolean rePrompt) throws WebObjectsException
refreshes the report results.- Parameters:
rePrompt
- should be sent to true, if prompts need to be re-answered.- Returns:
- new report instance upon refresh.
- Throws:
WebObjectsException
- thrown if server encountered an error while refreshing the results.- Since:
- MicroStrategy Web 8.0.0
-
refresh
WebReportInstance refresh(boolean rePrompt, IntWrapper jobId) throws WebObjectsException
refreshes the report results which updates the jobId.- Parameters:
rePrompt
- should be sent to true, if prompts need to be re-answered.jobId
- the jobId of IServer job- Returns:
- new report instance upon refresh.
- Throws:
WebObjectsException
-
refresh
WebReportInstance refresh(java.lang.String promptAnswerXML) throws WebObjectsException
refreshes the report results.- Parameters:
promptAnswerXML
- the answer xml for the prompts.- Returns:
- new report instance upon refresh.
- Throws:
WebObjectsException
- thrown if server encountered an error while refreshing the results.
-
makeTabular
WebReportInstance makeTabular() throws WebObjectsException, WebReportValidationException
- Throws:
WebObjectsException
WebReportValidationException
- Since:
- MicroStrategy Web 8.1.0
-
addQuickListGroup
@Deprecated WebReportInstance addQuickListGroup(java.lang.String deName, java.lang.String attId, int depth, int[] ordinals) throws WebObjectsException, WebReportValidationException
Deprecated.- Throws:
WebObjectsException
WebReportValidationException
- Since:
- MicroStrategy Web 9.0.0
-
addQuickListGroup
WebReportInstance addQuickListGroup(java.lang.String deName, java.lang.String attId, int depth, int[] ordinals, WebDerivedElements target) throws WebObjectsException, WebReportValidationException
-
addQuickCalculationGroup
@Deprecated WebReportInstance addQuickCalculationGroup(java.lang.String deName, java.lang.String attId, int depth, int[] ordinals, int function) throws WebObjectsException, WebReportValidationException
Deprecated.- Throws:
WebObjectsException
WebReportValidationException
- Since:
- MicroStrategy Web 9.0.0
-
addQuickCalculationGroup
WebReportInstance addQuickCalculationGroup(java.lang.String deName, java.lang.String attId, int depth, int[] ordinals, int function, WebDerivedElements target) throws WebObjectsException, WebReportValidationException
-
setCurrentPageByElement
WebReportInstance setCurrentPageByElement(java.lang.String elementID, int elementStatus, boolean applyChanges) throws WebObjectsException, WebReportValidationException
-
addShortcutMetric
WebReportInstance addShortcutMetric(int functionType, int functionType2, java.util.List<WebObjectInfo> unitsInfo) throws WebObjectsException, WebReportValidationException
-
raExpandCollapse
WebReportInstance raExpandCollapse(java.lang.String attId, int axis, int ordinal, int depth, boolean expand) throws WebReportValidationException, WebObjectsException
-
validateExpression
java.lang.String validateExpression(java.lang.String tokenStreamXML, boolean isForMetric, int outFlags, int baseFormType) throws WebObjectsException
- Throws:
WebObjectsException
-
toggleDatasetServerMode
WebReportInstance toggleDatasetServerMode(int serverMode) throws WebObjectsException, WebReportValidationException
Toggle dataset server mode- Parameters:
serverMode
-EnumDSSXMLDatasetServeMode
- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
changeEmmaSourceTablesPolicy
WebReportInstance changeEmmaSourceTablesPolicy(java.util.Map<java.lang.String,java.lang.Integer> tbs) throws WebObjectsException, WebReportValidationException
Change EMMA source tables policy, suggest to pass all the source tables with its policy together- Parameters:
tbs
- Key indicates source table IDs, and Value indicates policiesEnumDSSXMLCubeRefreshType
- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
changeEmmaSourceTablesExecutionAction
WebReportInstance changeEmmaSourceTablesExecutionAction(java.util.Map<java.lang.String,java.lang.Integer> tbs) throws WebObjectsException, WebReportValidationException
Change EMMA source tables execution action flagsEnumDSSXMLTableStateExecutionAction
according to the policy, suggest to pass all the source tables with its policy together.For the tables we changed their policy, we will set it's action to Force Execution.
For the tables we ignored, we will set it's action to Ignore.,
- Parameters:
tbs
- Key indicates source table IDs, and Value indicates execution actionEnumDSSXMLCubeRefreshType
- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
refreshEmmaCubeTablesWithExtParam
WebReportInstance refreshEmmaCubeTablesWithExtParam(java.lang.String extParam) throws WebObjectsException
Refresh EMMA cube with extended parameters- Parameters:
extParam
-- Returns:
- Throws:
WebObjectsException
-
customMappingForEmmaSourceTable
WebReportInstance customMappingForEmmaSourceTable(java.lang.String tableName, MappingCreator mappingCreator) throws WebObjectsException, WebReportValidationException
custom mapping for EMMA source table- Parameters:
tableName
-mappingsJson
-relationshipsJson
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
createPickTable
WebReportInstance createPickTable(java.lang.String tableID, java.lang.String xdaType, java.lang.String dict, java.lang.String tableName, java.lang.String dbTableName, java.lang.String nameSpace, java.lang.String dbrID) throws WebObjectsException, WebReportValidationException
Create pick table- Parameters:
tableID
-xdaType
-dict
-tableName
-dbTableName
-nameSpace
-dbrID
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
changeMapping
WebReportInstance changeMapping(java.lang.String tableID, java.lang.String tableName, java.util.List<MappingOperation> mappings) throws WebObjectsException, WebReportValidationException
change mapping- Parameters:
tableID
-tableName
-cubeRepublishBehavior
-changeMappingsJson
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
editRelationship
WebReportInstance editRelationship(java.lang.String tableName, java.util.List<MappingRelationship> relationships) throws WebObjectsException, WebReportValidationException
edit relationship- Parameters:
tableName
-relationships
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
createSourceTable
WebReportInstance createSourceTable(java.lang.String tableId, java.lang.String tableName, java.lang.String xdaType, java.lang.String connectorType) throws WebObjectsException, WebReportValidationException
create table- Parameters:
tableId
-tableName
-xdaType
-connectorType
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
editFreeFormSQL
WebReportInstance editFreeFormSQL(java.lang.String expdef, java.lang.String emmaSourceTableId) throws WebObjectsException, WebReportValidationException
edit FreeFormSQL- Parameters:
expdef
-emmaSourceTableId
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
setDataImportInfo
WebReportInstance setDataImportInfo(java.lang.String tbID, java.lang.String dbRoleID, java.lang.String sourceAccountID, java.lang.String url, java.lang.String userDisplayName, java.lang.String reportAddress, java.lang.String reportDesc, java.lang.String reportMimetype, java.lang.String reportName, java.lang.String shtIx, java.lang.String fileType, java.lang.String sparkURL) throws WebObjectsException, WebReportValidationException
set DataImportInfo- Parameters:
tbID
-dbRoleID
-sourceAccountID
-url
-userDisplayName
-reportAddress
-reportDesc
-reportMimetype
-reportName
-shtIx
-fileType
-sparkURL
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
syncModel
WebReportInstance syncModel(java.lang.String modelJSON, int serveMode) throws WebObjectsException, WebReportValidationException
edit syncModel- Parameters:
modelJSON
-serveMode
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
syncModel
WebReportInstance syncModel(java.lang.String modelJSON, int serveMode, java.util.List<TableAction> tableActions) throws WebObjectsException, WebReportValidationException
edit syncModel- Parameters:
modelJSON
-serveMode
-tableActions
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
editEMMASourceTable
WebReportInstance editEMMASourceTable(java.lang.String srcTableID, java.lang.String tableName, java.lang.String tableFormatLeft, java.lang.String tableFormatTop, java.lang.String tableFormatWidth, java.lang.String tableFormatHeight, java.lang.String executionFlag, java.lang.String isImportBinary, java.lang.String refreshType) throws WebObjectsException, WebReportValidationException
edit editEMMASourceTable- Parameters:
srcTableID
-tableName
-tableFormatLeft
-tableFormatTop
-tableFormatWidth
-tableFormatHeight
-executionFlag
-isImportBinary
-refreshType
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
editEMMASourceTables
WebReportInstance editEMMASourceTables(JSONArray commands) throws WebObjectsException, WebReportValidationException
edit editEMMASourceTables in batch- Parameters:
commands
- {did: srcTableId, exef: executeAction}- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
createPushDataTables
WebReportInstance createPushDataTables(java.util.List<java.lang.String> tableNames) throws WebObjectsException, WebReportValidationException
create pushdatatables- Parameters:
tableNames
-tableIds
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
customMappingForEmmaSourceTables
WebReportInstance customMappingForEmmaSourceTables(java.util.List<MappingCreator> mappingCreators) throws WebObjectsException, WebReportValidationException
customMapping for EmmaSourceTables- Parameters:
mappingCreators
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
clearDiscoverCache
WebReportInstance clearDiscoverCache(java.lang.String tableId) throws WebObjectsException, WebReportValidationException
clear discover cache- Parameters:
tableId
-- Returns:
- the new instance
- Throws:
WebObjectsException
WebReportValidationException
-
applyChangeForReplaceObjects
WebReportInstance applyChangeForReplaceObjects(java.util.List<org.apache.commons.lang3.tuple.Pair<WebObjectInfo,WebObjectInfo>> listOfWebObjectsToReplace, int clearAlias, int clearFormats, int clearFilter) throws WebObjectsException, WebReportValidationException
Creates XML request either to remove or replace objects from different data source. clr_a: controls whether to clear the alias. Default value is 0. If it is set to non-zero value, then during reconciliation, server will clear alias from template attribute and template metric. clr_f: controls whether to clear the formats. Default value is 0. If it is set to non-zero value, then during reconciliation, server will clear both grid and header formats from template attribute and template metric. clr_fs: controls whether to clear the expression from view filter or metric limit. Default value is 1. If non-zero value is passed or the parameter is not passed, server will try to clear a part of the expression from the view filter or metric limit if the expression is going to be changed.- Parameters:
listOfWebObjectsToReplace
- List of pair containing source WebObjectInfo, target WebObjectInfoclearAlias
- clr_a: controls whether to clear the alias. Default value is 0. If it is set to non-zero value, then during reconciliation, server will clear alias from template attribute and template metric.clearFormats
- clr_f: controls whether to clear the formats. Default value is 0. If it is set to non-zero value, then during reconciliation, server will clear both grid and header formats from template attribute and template metric.clearFilter
- controls whether to clear the expression from view filter or metric limit. Default value is 1. If non-zero value is passed or the parameter is not passed, server will try to clear a part of the expression from the view filter or metric limit if the expression is going to be changed.- Returns:
- Throws:
WebObjectsException
WebReportValidationException
-
-