com.sap.netweaver.bc.uwl.substitution

Class SubstitutionResult

java.lang.Object
  extended by com.sap.netweaver.bc.uwl.substitution.SubstitutionResult

public final class SubstitutionResult
extends Object

This class contains the result set from IProviderSubstitutionManager that involves multiple records in the result, like methods createSubstitutions(), removeSubstitutions(). This can clearly presents both the successful and bad results when multiple actions are carried out.

See Also:
com.sap.netweaver.bc.uwl.connect.IProviderSubstitutionManager

Field Summary
static int TYPE_ALL_BAD
          Indicates that none of the requested records can be processed
static int TYPE_ALL_GOOD
          Indicates that all the requested records are processed successfully
static int TYPE_PARTIAL
          Indicates that only part of the requested records are processed successfully while part of them are not
static int TYPE_UNKNOWN
           
 
Method Summary
 void addToBadResult(List badList)
          Append to the bad substitution result list
 void addToGoodResult(List goodList)
          Append to the good substitution result list
static SubstitutionResult createBadResult(List badSubs, ProviderStatus stat)
          Creates a totally failed substitution result set
static SubstitutionResult createGoodResult(List goodSubs, ProviderStatus stat)
          Creates a totally successful substitution result set
static SubstitutionResult createResults(List goodSubs, List badSubs, ProviderStatus stat)
          Creates a result set capturing info about both successful and unsuccessful results.
 List getbadSubstitutions()
           
 List getGoodSubstitutions()
           
 Date getSystemTimestamp()
           
 boolean hasError()
          For Create & switchON: return true if not doable in ALL systems.
 boolean isResultAllBad()
           
 boolean isResultAllGood()
           
 boolean isResultPartial()
           
 boolean isResultUnknown()
           
 void setResultKnownProblem()
           
 void setSystemTimestamp(Date time)
          Provider substitution manager could retreive the timestamp from a particular host system and set here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_ALL_GOOD

public static final int TYPE_ALL_GOOD
Indicates that all the requested records are processed successfully

See Also:
Constant Field Values

TYPE_ALL_BAD

public static final int TYPE_ALL_BAD
Indicates that none of the requested records can be processed

See Also:
Constant Field Values

TYPE_PARTIAL

public static final int TYPE_PARTIAL
Indicates that only part of the requested records are processed successfully while part of them are not

See Also:
Constant Field Values

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN
See Also:
Constant Field Values
Method Detail

createResults

public static SubstitutionResult createResults(List goodSubs,
                                               List badSubs,
                                               ProviderStatus stat)
Creates a result set capturing info about both successful and unsuccessful results. Either one of the list should be non-null or non-empty, otherwise, UNKNOWN type will be created with empty list

Parameters:
goodSubs - list of good substitutions
badSubs - list of bad substitutions
stat - can be null
Returns:
not null

createGoodResult

public static SubstitutionResult createGoodResult(List goodSubs,
                                                  ProviderStatus stat)
Creates a totally successful substitution result set

Parameters:
goodSubs - list of all good substitutions
stat - could be null
Returns:
not null

createBadResult

public static SubstitutionResult createBadResult(List badSubs,
                                                 ProviderStatus stat)
Creates a totally failed substitution result set

Parameters:
badSubs - list of all bad substitutions
stat - could be null
Returns:
not null

addToGoodResult

public void addToGoodResult(List goodList)
Append to the good substitution result list


addToBadResult

public void addToBadResult(List badList)
Append to the bad substitution result list


isResultAllBad

public boolean isResultAllBad()
Returns:
true if result is of type ALL_BAD

isResultAllGood

public boolean isResultAllGood()
Returns:
true if result is of type ALL_GOOD

isResultPartial

public boolean isResultPartial()
Returns:
true if result is of type partially good

isResultUnknown

public boolean isResultUnknown()
Returns:
true if result is unknown...internal error

getGoodSubstitutions

public List getGoodSubstitutions()
Returns:
requested substitutions that are successfully processed, not null

getbadSubstitutions

public List getbadSubstitutions()
Returns:
requested substitutions that are not successfully processed, not null

getSystemTimestamp

public Date getSystemTimestamp()
Returns:
could be null

setSystemTimestamp

public void setSystemTimestamp(Date time)
Provider substitution manager could retreive the timestamp from a particular host system and set here. This timestamp can be used next time to another call to the provider. It is optional for the provider to set this timestamp.

Parameters:
time - java time value , that is number of milliseconds since 1970 Jan 1.

setResultKnownProblem

public void setResultKnownProblem()

hasError

public boolean hasError()
For Create & switchON: return true if not doable in ALL systems. Check isResultPartial().
For Remove & switchOFF: return true as long as there is known problem that definition cannot be removed or turned off in AT LEAST 1 system. Refresh is recommended

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] UWLJWF [sap.com] tc/kmc/bc.uwl/api - EP-BC-UWL
[sap.com] UWLJWF [sap.com] tc/kmc/bc.uwl/api default EP-BC-UWL


Copyright 2011 SAP AG Complete Copyright Notice