com.ibm.mashups.enabler.model.state
Interface ShareableParameterSetAccessor

All Superinterfaces:
Accessor

public ShareableParameterSetAccessor
extends Accessor

Interface representing a ShareableParameterSetAccessor.


Method Summary
 String getId()
           Returns the id of ShareableParamterSet
 String getScope()
           Returns the scope of ShareableParamterSet or null, if this accessor represents the global scope.
 String[] getAllNames()
           Returns an array of all Shareable Parameter names within this Shareable Parameter Set
 Boolean setItemValue(String itemName, String value)
           Set the value of a required item.
 Boolean confirmSetItemValue(String itemName, String value)
           Confirm if it's possible to set the value of a required item.
 Boolean removeItem(String itemName)
           Remove the required item
 Boolean confirmRemoveItem(String itemName)
           confirm if it's possible to remove the required item
 String getItemValue(String itemName)
           Returns the value of required item name
 String registerListener(Function listener)
           Register listener so listener will be notified when an item set is updated
 Boolean removeListener(String listenerId)
           Remove the listener given a listener id
 Boolean confirmRemoveListener(String listenerId)
           Confirm if it's possible to remove the listener given a listener id
 

Method Detail

getId

String getId()
Returns the id of ShareableParamterSet

Returns:
name of ShareableParameterSet

getScope

String getScope()
Returns the scope of ShareableParamterSet or null, if this accessor represents the global scope.

Returns:
name of the scope

getAllNames

String[] getAllNames()
Returns an array of all Shareable Parameter names within this Shareable Parameter Set

Returns:
array of all the ShareableParameterSet

setItemValue

Boolean setItemValue(String itemName,
                     String value)
Set the value of a required item. It will replace the old value. If the value is a serialized version of complex data type, it's recommended for the widget to get the original value, update the complex object and serialize again before calling this api.

Parameters:
itemName - The name of the required parameter
value - The value of the required parameter
Returns:
return true if item is updated or created successfully.

confirmSetItemValue

Boolean confirmSetItemValue(String itemName,
                            String value)
Confirm if it's possible to set the value of a required item. It will replace the old value. If the value is a serialized version of complex data type, it's recommended for the widget to get the original value, update the complex object and serialize again before calling this api.

Parameters:
itemName - The name of the required parameter
value - The value of the required parameter
Returns:
return true if it's possible to set the value

removeItem

Boolean removeItem(String itemName)
Remove the required item

Parameters:
itemName - The name of the required parameter that needs to be removed
Returns:
return true if item is removed successfully.

confirmRemoveItem

Boolean confirmRemoveItem(String itemName)
confirm if it's possible to remove the required item

Parameters:
itemName - The name of the required parameter that needs to be removed
Returns:
return true if it's possible to remove item

getItemValue

String getItemValue(String itemName)
Returns the value of required item name

Parameters:
itemName - the name of the required parameter
Returns:
value of the required item

registerListener

String registerListener(Function listener)
Register listener so listener will be notified when an item set is updated

Parameters:
listener - which is a js function that's already scoped properly.
Returns:
listener id

removeListener

Boolean removeListener(String listenerId)
Remove the listener given a listener id

Parameters:
listenerId - id of the listener that will be removed.
Returns:
return true if listener is removed successfully

confirmRemoveListener

Boolean confirmRemoveListener(String listenerId)
Confirm if it's possible to remove the listener given a listener id

Parameters:
listenerId - id of the listener that will be removed.
Returns:
return true if it's possible to remove Listener


Copyright IBM Corp. 2010 All Rights Reserved.