|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the mapping information between a master alert service and a master service. Alert Engine generates the notification message content by invoking a service. Hence, each master alert service has to be mapped to a service that will be used for generating the content. Also, it is possible to pass data that is available to the alert engine at runtime to the service. For this purpose, master alert service input/output parameters can be mapped to the service input arguments. At runtime, values will be passed to the service using this parameter mapping.<BR/><BR/> Sample Usage:
//Locate the existing master notification service MasterAlertService mAS = s.lookupMobileMasterAlertService("StockNotification");<BR/> //Locate the existing stock trade master service MasterService masterService = s.lookupMasterService("/master/examples/StockTradeMasterService");<BR/> //Create the mapping definition between the notification service and master service MAlertServiceMapping map = mAS.createMapping(masterService, "StockNotificationMapping");<BR/> //Retrieve input arguments for the master service Arguments args = masterService.getInputArguments(); InputArgument inpArgTicker = args.getInput("symbol"); InputArgument inpArgPrice = args.getInput("price");<BR/> //Retrieve notification parameters (including input and output) AlertParameterMeta[] alertParams = mAS.getParameters(); //returns symbol, price<BR/> //Map notification master service parameter "symbol" to stock trade input argument "ticker? map.addChainParameter(alertParams[0], inpArgTicker);<BR/> //Map notification master service parameter "price" to stock trade input argument "price" map.addChainParameter(alertParams[1], inpArgPrice);<BR/> //This invocation has to be performed in ?personalized content mode?, for each user separately map.setInvocationType(false);<BR/> //Commit changes mAS.save();
AlertChainParamMeta
Field Summary | |
static boolean |
MASS_INVOKE |
static boolean |
SEPARATE_INVOKE |
Method Summary | |
AlertChainParamMeta |
addChainParameter(AlertParameterMeta alertParam, InputArgument serviceParam) Add a parameter chaining for this mapping with the provided alert and service parameters. |
AlertChainParamMeta[] |
getChainParameters() Get meta data for all chained parameters |
long |
getId() Get the id for this mapping object |
boolean |
getInvocationType() Get invocation type |
MasterAlertService |
getMAlert() Get the MasterAlertService object that this mapping is created for |
java.lang.String |
getMappingName() Get the name for this mapping object |
MasterService |
getMasterService() Get the MasterService object that this mapping is created for |
boolean |
isChanged() Is this mapping definition changed after the last save |
void |
remove() Marks this mapping definiton as removed so that it can be removed at the next save() call. |
void |
removeChainParameter(AlertChainParamMeta param) Remove the specified chain parameter meta data from this mapping |
void |
save() Applies changes to the persistent store. |
void |
setInvocationType(boolean massInvocation) Sets the service invocation type. |
void |
setMappingName(java.lang.String mapName) Set the name of this mapping object |
Field Detail |
public static final boolean MASS_INVOKE
public static final boolean SEPARATE_INVOKE
Method Detail |
public AlertChainParamMeta addChainParameter(AlertParameterMeta alertParam, InputArgument serviceParam) throws PanamaException
alertParam
- Source parameter retrieved from the master alertserviceParam
- Target parameter retrieved from the master servicePanamaException
public AlertChainParamMeta[] getChainParameters() throws PanamaException
PanamaException
public long getId()
public boolean getInvocationType()
public MasterAlertService getMAlert()
MasterAlertService
public java.lang.String getMappingName()
public MasterService getMasterService()
MasterService
public boolean isChanged()
public void remove()
save()
call.public void removeChainParameter(AlertChainParamMeta param) throws PanamaException
param
- Chain parameter meta data to removePanamaException
public void save() throws PanamaException
PanamaException
- exception thrown when save failespublic void setInvocationType(boolean massInvocation)
massInvocation
- true if the master service can be invoked for once in behalf of many userspublic void setMappingName(java.lang.String mapName)
mapName
- Name for this mapping.
|
Oracle Application Server Wireless Java API Reference B14043-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |