|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.carma.ui.action.custom.CustomActionParameterManager
public class CustomActionParameterManager
This Class is used to manage the storing of retrieval of CustomParameters for CARMA actions.
There is a cache which stores recently made calls so that the preference store isn't hit unless
it's necessary to do so. Typically this class is used in the following way:
CustomActionParameterManager manager = CustomActionParameterManager.getManager();
Object[] parameters = null;
if (manager.isPromptNeeded(resource, ActionIdentifier.LOCK)) {
//fill out parameters for lock action through some means,
//typically using the CustomActionParameterDialog is the common method
//but if one is doing that, they should probably use CustomActionUtil.getCustomParameters() instead
parameters = fillUserParameters();
manager.setUserStoreParamValues(resource.getRepository(),
resource.findActionFor(ActionIdentifier.LOCK));
}
parameters = manager.getCustomParameters(resource, ActionIdentifier.LOCK);
resource.lock(monitor, parameters);
This class is not intended to be subclassed
CustomActionParameterDialog,
CustomActionUtil,
ActionIdentifier| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.ibm.carma.ui.property.ICarmaPreferenceConstants |
|---|
ICarmaPreferenceConstants.ParameterOrder |
| Field Summary | |
|---|---|
static java.lang.String |
COPYRIGHT
|
| Constructor Summary | |
|---|---|
CustomActionParameterManager()
|
|
| Method Summary | |
|---|---|
void |
clearAllUserStoredParamValues()
This method clears all of the user store parameters values from CARMA's memory. |
java.lang.Object[] |
getCustomParameters(CustomActionAccepter resource,
java.lang.String actionId)
This will return the correct customer parameters for the given action on the given resource. |
static CustomActionParameterManager |
getManager()
|
java.lang.Object[] |
getUserStoredParamValues(CustomActionAccepter accepter,
Action action)
This method can be used to directly access what the user stored values are. |
boolean |
isPromptNeeded(CustomActionAccepter resource,
java.lang.String actionId)
|
void |
setUserStoredParamValues(RepositoryInstance repository,
Action action,
java.lang.Object[] values)
This method can be used to directly set the user stored values for a specific action against a specific repository |
void |
setUserStoredParamValues(RepositoryManager repositoryManager,
Action action,
java.lang.Object[] values)
This method can be used to directly set the user stored values for a specific action against a specific repository |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COPYRIGHT
| Constructor Detail |
|---|
public CustomActionParameterManager()
| Method Detail |
|---|
public static CustomActionParameterManager getManager()
public boolean isPromptNeeded(CustomActionAccepter resource,
java.lang.String actionId)
throws NotSynchronizedException
resource - actionId -
false if there are no custom parameters, or (all of the parameters are filled in
and the preference to always prompt isn't set). true otherwise.
NotSynchronizedException - if the actions aren't available from the RepositoryManager
The caller needs to execute resource.getRespository().getRepositoryManager().connection and
try again
public java.lang.Object[] getCustomParameters(CustomActionAccepter resource,
java.lang.String actionId)
throws NotSynchronizedException
resource - the CARMA resource being executed onactionId - the Id being executed
NotSynchronizedException - if the actions aren't available from the RepositoryManager
The caller needs to execute resource.getRespository().getRepositoryManager().connection and
try again
public java.lang.Object[] getUserStoredParamValues(CustomActionAccepter accepter,
Action action)
This method may be called directly, but more often clients should call getCustomParameters() as it references user preference and is more likely to produce values that the user expects.
accepter - the resource you'd like to check for the values against.action - The Action to locate stored parameters for
public void setUserStoredParamValues(RepositoryManager repositoryManager,
Action action,
java.lang.Object[] values)
repositoryManager - The repositoryManager to store the parameters values for.action - The Action to store the paremter values for.values - The values to store.
public void setUserStoredParamValues(RepositoryInstance repository,
Action action,
java.lang.Object[] values)
repository - The repository to store the parameters values for.action - The Action to store the paremter values for.values - The values to store, where only non-null values are stored.public void clearAllUserStoredParamValues()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||