|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPolicyState
This interface is used by service policy extenders to save the state of there policies. Note: extenders do not need to worry about if these changes are committed or discarded. This is handled by the framework. For example if an extender makes a number of calls to the putValue method and at some point ServicePolicyPlatform.discard() is called, the framework will handle the discarding of the changes made by the putValue method calls. Note: this data will eventually be stored in Eclipse with the following key: servicePolicyId + "." + key where servicePolicyId is the unique id for this service policy and the key is the key specified in the putValue method.
Field Summary | |
---|---|
static java.lang.String |
DefaultValueKey
|
Method Summary | |
---|---|
void |
addPolicyStateChangeListener(IPolicyStateChangeListener listener,
boolean notifyOnlyOnCommit)
Adds a policy state change listener to this service policy. |
java.lang.String |
getValue(java.lang.String key)
This method gets some state for a service policy. |
boolean |
isMutable()
Returns whether the state of this policy is mutible or not. |
void |
putDefaultValue(java.lang.String key,
java.lang.String defaultValue,
boolean overrideExisting)
This method sets the default for a particular key. |
void |
putValue(java.lang.String key,
java.lang.String value)
This method sets some state for a service policy. |
void |
removePolicyStateChangeListener(IPolicyStateChangeListener listener)
Removes a policy state change listener from this service policy. |
void |
setMutable(boolean mutable)
|
Field Detail |
---|
static final java.lang.String DefaultValueKey
Method Detail |
---|
boolean isMutable()
void setMutable(boolean mutable)
mutable
- sets whether this policy is mutable or not. Note:
if the service policy for this IPolicyState object is predefined calling
this method will have no effect.void putValue(java.lang.String key, java.lang.String value)
key
- a key for this policy state.value
- the value of the policy state.java.lang.String getValue(java.lang.String key)
key
- a key for this service policy.
void putDefaultValue(java.lang.String key, java.lang.String defaultValue, boolean overrideExisting)
key
- the keydefaultValue
- the default value.overrideExisting
- indicates if a existing default value should be overridden.void addPolicyStateChangeListener(IPolicyStateChangeListener listener, boolean notifyOnlyOnCommit)
listener
- the listenernotifyOnlyOnCommit
- indicates if this listener should be
called for all state changes or only when the state data is
committed.void removePolicyStateChangeListener(IPolicyStateChangeListener listener)
listener
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |