org.glassfish.api.admin
Interface ParameterBridge

All Known Implementing Classes:
ParameterBridge.NoMapper

public interface ParameterBridge

A parameter mapper acts as a bridge between supplied parameters (by the user on the command line for instance) and expected parameters by a action.

For example, a command execution requires parameters from the command line while a supplemented command may require a different set of parameter names which can be either discovered or translated from the originally supplied list.

Author:
Jerome Dochez

Nested Class Summary
static class ParameterBridge.NoMapper
          Provided mapper that does not change parameters names or values from the input set.
 
Method Summary
 java.util.List<java.lang.String> get(ParameterMap map, java.lang.String resourceName)
          Returns the parameter values as expected by the injection code when a dependency injection annotated field or method (for instance, annotated with @Param or @Inject) needs to be resolved.
 java.lang.String getOne(ParameterMap map, java.lang.String resourceName)
          Returns the parameter value as expected by the injection code when a dependency injection annotated field or method (for instance, annotated with @Param or @Inject) needs to be resolved.
 

Method Detail

getOne

java.lang.String getOne(ParameterMap map,
                        java.lang.String resourceName)
Returns the parameter value as expected by the injection code when a dependency injection annotated field or method (for instance, annotated with @Param or @Inject) needs to be resolved.

Parameters:
map - is the original set of parameters as used to inject the supplemented command.
resourceName - the name of the resource as defined by the action
Returns:
the value used to inject the parameter identified by its resourceName

get

java.util.List<java.lang.String> get(ParameterMap map,
                                     java.lang.String resourceName)
Returns the parameter values as expected by the injection code when a dependency injection annotated field or method (for instance, annotated with @Param or @Inject) needs to be resolved.

Parameters:
map - is the original set of parameters as used to inject the supplemented command.
resourceName - the name of the resource as defined by the action
Returns:
a list of values used to inject the parameter identified by its resourceName


Copyright © 2012 GlassFish Community. All Rights Reserved.