com.sap.mdm.publishing2.commands
Class GetFormattedMDSFieldValuesCommand

java.lang.Object
  extended bycom.sap.mdm.commands.AbstractCommandBase
      extended bycom.sap.mdm.commands.AbstractCommand
          extended bycom.sap.mdm.publishing2.commands.GetFormattedMDSFieldValuesCommand
All Implemented Interfaces:
Command, PassportSupport

public class GetFormattedMDSFieldValuesCommand
extends AbstractCommand

This command gets string values for a requested collection of fields. NOTE: This command requires connection already established.

Since:
7.1
See Also:
ConnectionPool, ConnectionPoolFactory

Constructor Summary
GetFormattedMDSFieldValuesCommand(Repository repository, String mdsPassword)
          Creates a new instance of this command.
 
Method Summary
 void addRecordAndField(LiidPivotContextWrapper liidContext)
          Adds a field and its records for retrieving their values.
 void execute()
          Retrieves values from MDS after all the fields and records and provided.
 String getValue(LiidPivotContextWrapper qualifiedLiid)
          Retrieves values from MDS after all the fields and records and provided.
 RecordResultSet getValues()
          Gets a very complex structure with all the values This method is for MDS API experts only, otherwise, please, use getValue method instead.
 void reset()
          Clears all the fields and records from a collection of retrievable values.
 boolean validateLiid(LiidPivotContextWrapper liidContext)
          Validates is a value can be requested for a particular field type
 
Methods inherited from class com.sap.mdm.commands.AbstractCommand
getSession, setSession
 
Methods inherited from class com.sap.mdm.commands.AbstractCommandBase
getPassport, isCommandComplete, setPassport
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetFormattedMDSFieldValuesCommand

public GetFormattedMDSFieldValuesCommand(Repository repository,
                                         String mdsPassword)
Creates a new instance of this command.

Parameters:
repository - an instance of a Repository Object, with an established connection and session
mdsPassword - password to connect to MDS Server.
Method Detail

reset

public void reset()
Clears all the fields and records from a collection of retrievable values. After this call, at least one call to addRecordAndField method is required


validateLiid

public boolean validateLiid(LiidPivotContextWrapper liidContext)
Validates is a value can be requested for a particular field type

Returns:
false, if this value type is not supported, otherwise - true.

addRecordAndField

public void addRecordAndField(LiidPivotContextWrapper liidContext)
                       throws IllegalArgumentException
Adds a field and its records for retrieving their values.

Throws:
an - Exception is that field didn't pass a validation (see: validateLiid method)
IllegalArgumentException

execute

public void execute()
             throws CommandException
Retrieves values from MDS after all the fields and records and provided.

Specified by:
execute in interface Command
Overrides:
execute in class AbstractCommandBase
Throws:
a - CommandException if the MDS server call didn't succeed
CommandException

getValues

public RecordResultSet getValues()
Gets a very complex structure with all the values This method is for MDS API experts only, otherwise, please, use getValue method instead. This command must be called only after executeOnMds command has successfully finished.


getValue

public String getValue(LiidPivotContextWrapper qualifiedLiid)
                throws CommandException,
                       IllegalArgumentException,
                       SessionException,
                       ConnectionException
Retrieves values from MDS after all the fields and records and provided. This command must be called only after executeOnMds command has successfully finished. Otherwise a null will be returned.

Parameters:
qualifiedLiid - a LayoutItem in a form of LiidPivotContextWrapper
Returns:
a value converted to a string
Throws:
ConnectionException
SessionException
CommandException
IllegalArgumentException


Copyright 2004-2007 by SAP AG. All Rights Reserved.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.