geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jensde...@apache.org
Subject [28/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-17
Date Thu, 25 Feb 2016 20:27:16 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5c01d5f4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/ConfigCommandsController.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/ConfigCommandsController.java
index 0000000,fae54d8..89c74ee
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/ConfigCommandsController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/ConfigCommandsController.java
@@@ -1,0 -1,214 +1,222 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.management.internal.web.controllers;
+ 
+ import java.io.IOException;
++import java.util.Properties;
+ import java.util.concurrent.Callable;
+ 
+ import com.gemstone.gemfire.internal.lang.StringUtils;
+ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
++import com.gemstone.gemfire.management.internal.web.controllers.support.EnvironmentVariablesHandlerInterceptor;
+ import com.gemstone.gemfire.management.internal.web.util.ConvertUtils;
+ 
+ import org.springframework.http.HttpStatus;
+ import org.springframework.http.ResponseEntity;
+ import org.springframework.stereotype.Controller;
+ import org.springframework.web.bind.annotation.PathVariable;
+ import org.springframework.web.bind.annotation.RequestMapping;
+ import org.springframework.web.bind.annotation.RequestMethod;
+ import org.springframework.web.bind.annotation.RequestParam;
+ import org.springframework.web.bind.annotation.ResponseBody;
+ import org.springframework.web.multipart.MultipartFile;
+ 
+ /**
+  * The ConfigCommandsController class implements GemFire Management REST API web service endpoints for the Gfsh
+  * Config Commands.
+  * <p/>
+  * @author John Blum
+  * @see com.gemstone.gemfire.management.internal.cli.commands.ConfigCommands
+  * @see com.gemstone.gemfire.management.internal.web.controllers.AbstractMultiPartCommandsController
+  * @see org.springframework.stereotype.Controller
+  * @see org.springframework.web.bind.annotation.PathVariable
+  * @see org.springframework.web.bind.annotation.RequestMapping
+  * @see org.springframework.web.bind.annotation.RequestMethod
+  * @see org.springframework.web.bind.annotation.RequestParam
+  * @see org.springframework.web.bind.annotation.ResponseBody
+  * @since 8.0
+  */
+ @Controller("configController")
+ @RequestMapping(AbstractCommandsController.REST_API_VERSION)
+ @SuppressWarnings("unused")
+ public class ConfigCommandsController extends AbstractMultiPartCommandsController {
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/config")
+   @ResponseBody
+   public String alterRuntime(@RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__GROUP, required = false) final String group,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__MEMBER, required = false) final String memberNameId,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT, required = false) final Integer archiveDiskSpaceLimit,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT, required = false) final Integer archiveFileSizeLimit,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, required = false) final Integer logDiskSpaceLimit,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__LOG__FILE__SIZE__LIMIT, required = false) final Integer logFileSizeLimit,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__LOG__LEVEL, required = false) final String logLevel,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE, required = false) final String statisticsArchiveFile,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLE__RATE, required = false) final Integer statisticsSampleRate,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLING__ENABLED, required = false) final Boolean enableStatistics,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__COPY__ON__READ, required = false) final Boolean copyOnRead,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__LOCK__LEASE, required = false) final Integer lockLease,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__LOCK__TIMEOUT, required = false) final Integer lockTimeout,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__MESSAGE__SYNC__INTERVAL, required = false) final Integer messageSyncInterval,
+                              @RequestParam(value = CliStrings.ALTER_RUNTIME_CONFIG__SEARCH__TIMEOUT, required = false) final Integer searchTimeout)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.ALTER_RUNTIME_CONFIG);
+ 
+     if (hasValue(memberNameId)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__MEMBER, memberNameId);
+     }
+ 
+     if (hasValue(group)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__GROUP, group);
+     }
+ 
+     if (hasValue(archiveDiskSpaceLimit)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT, Integer.toString(archiveDiskSpaceLimit));
+     }
+ 
+     if (hasValue(archiveFileSizeLimit)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT, Integer.toString(archiveFileSizeLimit));
+     }
+ 
+     if (hasValue(logDiskSpaceLimit)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT, Integer.toString(logDiskSpaceLimit));
+     }
+ 
+     if (hasValue(logFileSizeLimit)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__FILE__SIZE__LIMIT, Integer.toString(logFileSizeLimit));
+     }
+ 
+     if (hasValue(logLevel)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOG__LEVEL, logLevel);
+     }
+ 
+     if (hasValue(statisticsArchiveFile)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE, statisticsArchiveFile);
+     }
+ 
+     if (hasValue(statisticsSampleRate)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLE__RATE, Integer.toString(statisticsSampleRate));
+     }
+ 
+     if (hasValue(enableStatistics)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLING__ENABLED, Boolean.toString(enableStatistics));
+     }
+ 
+     if (hasValue(copyOnRead)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__COPY__ON__READ, Boolean.toString(copyOnRead));
+     }
+ 
+     if (hasValue(lockLease)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOCK__LEASE, Integer.toString(lockLease));
+     }
+ 
+     if (hasValue(lockTimeout)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__LOCK__TIMEOUT, Integer.toString(lockTimeout));
+     }
+ 
+     if (hasValue(messageSyncInterval)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__MESSAGE__SYNC__INTERVAL, Integer.toString(messageSyncInterval));
+     }
+ 
+     if (hasValue(searchTimeout)) {
+       command.addOption(CliStrings.ALTER_RUNTIME_CONFIG__SEARCH__TIMEOUT, Integer.toString(searchTimeout));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/members/{member}/config")
+   @ResponseBody
+   public String describeConfig(@PathVariable("member") final String memberNameId,
+                                @RequestParam(value = CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS, defaultValue = "true") final Boolean hideDefaults)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESCRIBE_CONFIG);
+ 
+     command.addOption(CliStrings.DESCRIBE_CONFIG__MEMBER, decode(memberNameId));
+     command.addOption(CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS, String.valueOf(hideDefaults));
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/config")
+   public Callable<ResponseEntity<String>> exportConfig(@RequestParam(value = CliStrings.EXPORT_CONFIG__GROUP, required = false) final String[] groups,
+                                                        @RequestParam(value = CliStrings.EXPORT_CONFIG__MEMBER, required = false) final String[] members,
+                                                        @RequestParam(value = CliStrings.EXPORT_CONFIG__DIR, required = false) final String directory)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXPORT_CONFIG);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.EXPORT_CONFIG__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.EXPORT_CONFIG__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(directory)) {
+       command.addOption(CliStrings.EXPORT_CONFIG__DIR, decode(directory));
+     }
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/config/cluster")
+   public Callable<ResponseEntity<String>> exportClusterConfig(@RequestParam(CliStrings.EXPORT_SHARED_CONFIG__FILE) final String zipFileName,
+                                                              @RequestParam(value = CliStrings.EXPORT_SHARED_CONFIG__DIR, required = false) final String directory)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXPORT_SHARED_CONFIG);
+ 
+     command.addOption(CliStrings.EXPORT_SHARED_CONFIG__FILE, zipFileName);
+ 
+     if (hasValue(directory)) {
+       command.addOption(CliStrings.EXPORT_SHARED_CONFIG__DIR, directory);
+     }
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/config/cluster")
+   public Callable<ResponseEntity<String>> importClusterConfig(@RequestParam(RESOURCES_REQUEST_PARAMETER) final MultipartFile[] zipFileResources,
+                                                              @RequestParam(value = CliStrings.IMPORT_SHARED_CONFIG__ZIP) final String zipFileName)
+     throws IOException
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.IMPORT_SHARED_CONFIG);
+ 
+     command.addOption(CliStrings.IMPORT_SHARED_CONFIG__ZIP, zipFileName);
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString(), ConvertUtils.convert(zipFileResources)), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), ConvertUtils.convert(zipFileResources), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5c01d5f4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DataCommandsController.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DataCommandsController.java
index 0000000,2e81272..ed9ae9c
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DataCommandsController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DataCommandsController.java
@@@ -1,0 -1,241 +1,251 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.management.internal.web.controllers;
+ 
++import java.util.Properties;
+ import java.util.concurrent.Callable;
+ 
+ import com.gemstone.gemfire.internal.lang.StringUtils;
+ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
++import com.gemstone.gemfire.management.internal.web.controllers.support.EnvironmentVariablesHandlerInterceptor;
+ 
+ import org.springframework.http.HttpStatus;
+ import org.springframework.http.ResponseEntity;
+ import org.springframework.stereotype.Controller;
+ import org.springframework.web.bind.annotation.PathVariable;
+ import org.springframework.web.bind.annotation.RequestMapping;
+ import org.springframework.web.bind.annotation.RequestMethod;
+ import org.springframework.web.bind.annotation.RequestParam;
+ import org.springframework.web.bind.annotation.ResponseBody;
+ import org.springframework.web.context.request.WebRequest;
+ 
+ /**
+  * The DataCommandsController class implements GemFire Management REST API web service endpoints for the
+  * Gfsh Data Commands.
+  * <p/>
+  * @author John Blum
+  * @see com.gemstone.gemfire.management.internal.cli.commands.DataCommands
+  * @see com.gemstone.gemfire.management.internal.web.controllers.AbstractCommandsController
+  * @see org.springframework.stereotype.Controller
+  * @see org.springframework.web.bind.annotation.PathVariable
+  * @see org.springframework.web.bind.annotation.RequestMapping
+  * @see org.springframework.web.bind.annotation.RequestMethod
+  * @see org.springframework.web.bind.annotation.RequestParam
+  * @see org.springframework.web.bind.annotation.ResponseBody
+  * @since 8.0
+  */
+ @Controller("dataController")
+ @RequestMapping(AbstractCommandsController.REST_API_VERSION)
+ @SuppressWarnings("unused")
+ public class DataCommandsController extends AbstractCommandsController {
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/regions/{region}/data")
+   @ResponseBody
+   public String get(@PathVariable("region") final String regionNamePath,
+                     @RequestParam(CliStrings.GET__KEY) final String key,
+                     @RequestParam(value = CliStrings.GET__KEYCLASS, required = false) final String keyClassName,
+                     @RequestParam(value = CliStrings.GET__VALUEKLASS, required = false) final String valueClassName,
+                     @RequestParam(value= CliStrings.GET__LOAD, defaultValue = "true") final Boolean loadOnCacheMiss)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.GET);
+ 
+     command.addOption(CliStrings.GET__REGIONNAME, decode(regionNamePath));
+     command.addOption(CliStrings.GET__KEY, key);
+     command.addOption(CliStrings.GET__LOAD, String.valueOf(Boolean.TRUE.equals(loadOnCacheMiss)));
+ 
+     if (hasValue(keyClassName)) {
+       command.addOption(CliStrings.GET__KEYCLASS, keyClassName);
+     }
+ 
+     if (hasValue(valueClassName)) {
+       command.addOption(CliStrings.GET__VALUEKLASS, valueClassName);
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.PUT, value = "/regions/{region}/data")
+   @ResponseBody
+   public String put(@PathVariable("region") final String regionNamePath,
+                     @RequestParam(CliStrings.PUT__KEY) final String key,
+                     @RequestParam(value = CliStrings.PUT__KEYCLASS, required = false) final String keyClassName,
+                     @RequestParam(CliStrings.PUT__VALUE) final String value,
+                     @RequestParam(value = CliStrings.PUT__VALUEKLASS, required = false) final String valueClassName,
+                     @RequestParam(value = CliStrings.PUT__PUTIFABSENT, defaultValue = "false") final Boolean putIfAbsent)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.PUT);
+ 
+     command.addOption(CliStrings.PUT__REGIONNAME, decode(regionNamePath));
+     command.addOption(CliStrings.PUT__KEY, key);
+     command.addOption(CliStrings.PUT__VALUE, decode(value));
+ 
+     if (hasValue(keyClassName)) {
+       command.addOption(CliStrings.PUT__KEYCLASS, keyClassName);
+     }
+ 
+     if (hasValue(valueClassName)) {
+       command.addOption(CliStrings.PUT__VALUEKLASS, valueClassName);
+     }
+ 
+     command.addOption(CliStrings.PUT__PUTIFABSENT, String.valueOf(putIfAbsent));
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.DELETE, value = "/regions/{region}/data")
+   @ResponseBody
+   public String remove(@PathVariable("region") final String regionNamePath,
+                        @RequestParam(value = CliStrings.REMOVE__ALL, defaultValue = "false") final Boolean allKeys,
+                        @RequestParam(value = CliStrings.REMOVE__KEY, required = false) final String key,
+                        @RequestParam(value = CliStrings.REMOVE__KEYCLASS, required = false) final String keyClassName) {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.REMOVE);
+ 
+     command.addOption(CliStrings.REMOVE__REGION, decode(regionNamePath));
+     command.addOption(CliStrings.REMOVE__ALL, String.valueOf(allKeys));
+ 
+     if (hasValue(key)) {
+       command.addOption(CliStrings.REMOVE__KEY, key);
+     }
+ 
+     if (hasValue(keyClassName)) {
+       command.addOption(CliStrings.REMOVE__KEYCLASS, keyClassName);
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/members/{member}/regions/{region}/data")
+   public Callable<ResponseEntity<String>> exportData(@PathVariable("member") final String memberNameId,
+                                                      @PathVariable("region") final String regionNamePath,
+                                                      @RequestParam(CliStrings.EXPORT_DATA__FILE) final String file)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXPORT_DATA);
+ 
+     command.addOption(CliStrings.EXPORT_DATA__MEMBER, decode(memberNameId));
+     command.addOption(CliStrings.EXPORT_DATA__REGION, decode(regionNamePath));
+     command.addOption(CliStrings.EXPORT_DATA__FILE, decode(file));
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/members/{member}/regions/{region}/data")
+   public Callable<ResponseEntity<String>> importData(@PathVariable("member") final String memberNameId,
+                                                      @PathVariable("region") final String regionNamePath,
+                                                      @RequestParam(CliStrings.IMPORT_DATA__FILE) final String file)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.IMPORT_DATA);
+ 
+     command.addOption(CliStrings.IMPORT_DATA__MEMBER, decode(memberNameId));
+     command.addOption(CliStrings.IMPORT_DATA__REGION, decode(regionNamePath));
+     command.addOption(CliStrings.IMPORT_DATA__FILE, decode(file));
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/regions/{region}/data/location")
+   @ResponseBody
+   public String locateEntry(@PathVariable("region") final String regionNamePath,
+                             @RequestParam(CliStrings.LOCATE_ENTRY__KEY) final String key,
+                             @RequestParam(value = CliStrings.LOCATE_ENTRY__KEYCLASS, required = false) final String keyClassName,
+                             @RequestParam(value = CliStrings.LOCATE_ENTRY__VALUEKLASS, required = false) final String valueClassName,
+                             @RequestParam(value = CliStrings.LOCATE_ENTRY__RECURSIVE, defaultValue = "false") final Boolean recursive)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.LOCATE_ENTRY);
+ 
+     command.addOption(CliStrings.LOCATE_ENTRY__REGIONNAME, decode(regionNamePath));
+     command.addOption(CliStrings.LOCATE_ENTRY__KEY, key);
+ 
+     if (hasValue(keyClassName)) {
+       command.addOption(CliStrings.LOCATE_ENTRY__KEYCLASS, keyClassName);
+     }
+ 
+     if (hasValue(valueClassName)) {
+       command.addOption(CliStrings.LOCATE_ENTRY__VALUEKLASS, valueClassName);
+     }
+ 
+     command.addOption(CliStrings.LOCATE_ENTRY__RECURSIVE, String.valueOf(recursive));
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/regions/data/query")
+   public Callable<ResponseEntity<String>> query(final WebRequest request,
+                                                 @RequestParam(CliStrings.QUERY__QUERY) final String oql,
+                                                 @RequestParam(value = CliStrings.QUERY__STEPNAME, defaultValue = CliStrings.QUERY__STEPNAME__DEFAULTVALUE) final String stepName,
+                                                 @RequestParam(value = CliStrings.QUERY__INTERACTIVE, defaultValue = "true") final Boolean interactive)
+   {
+     //logRequest(request);
+ 
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.QUERY);
+ 
+     command.addOption(CliStrings.QUERY__QUERY, decode(oql));
+     command.addOption(CliStrings.QUERY__STEPNAME, stepName);
+     command.addOption(CliStrings.QUERY__INTERACTIVE, String.valueOf(Boolean.TRUE.equals(interactive)));
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/regions/data", params = "op=rebalance")
+   public Callable<ResponseEntity<String>> rebalance(@RequestParam(value = CliStrings.REBALANCE__INCLUDEREGION, required = false) final String[] includedRegions,
+                                                     @RequestParam(value = CliStrings.REBALANCE__EXCLUDEREGION, required = false) final String[] excludedRegions,
+                                                     @RequestParam(value = CliStrings.REBALANCE__SIMULATE, defaultValue = "false") final Boolean simulate,
+                                                     @RequestParam(value = CliStrings.REBALANCE__TIMEOUT, defaultValue = "-1") final Long timeout)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.REBALANCE);
+ 
+     if (hasValue(includedRegions)) {
+       command.addOption(CliStrings.REBALANCE__INCLUDEREGION, StringUtils.concat(includedRegions,
+         StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(excludedRegions)) {
+       command.addOption(CliStrings.REBALANCE__EXCLUDEREGION, StringUtils.concat(excludedRegions,
+         StringUtils.COMMA_DELIMITER));
+     }
+ 
+     command.addOption(CliStrings.REBALANCE__SIMULATE, String.valueOf(simulate));
+     command.addOption(CliStrings.REBALANCE__TIMEOUT, String.valueOf(timeout));
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5c01d5f4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DiskStoreCommandsController.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DiskStoreCommandsController.java
index 0000000,e537a29..0812058
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DiskStoreCommandsController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DiskStoreCommandsController.java
@@@ -1,0 -1,177 +1,184 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.management.internal.web.controllers;
+ 
++import java.util.Properties;
+ import java.util.concurrent.Callable;
+ 
+ import com.gemstone.gemfire.internal.lang.StringUtils;
+ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
++import com.gemstone.gemfire.management.internal.security.CLIOperationContext;
++import com.gemstone.gemfire.management.internal.web.controllers.support.EnvironmentVariablesHandlerInterceptor;
+ 
+ import org.springframework.http.HttpStatus;
+ import org.springframework.http.ResponseEntity;
+ import org.springframework.stereotype.Controller;
+ import org.springframework.web.bind.annotation.PathVariable;
+ import org.springframework.web.bind.annotation.RequestMapping;
+ import org.springframework.web.bind.annotation.RequestMethod;
+ import org.springframework.web.bind.annotation.RequestParam;
+ import org.springframework.web.bind.annotation.ResponseBody;
+ 
+ /**
+  * The DiskStoreCommandsController class implements GemFire Management REST API web service endpoints for the
+  * Gfsh Disk Store Commands.
+  * <p/>
+  * @author John Blum
+  * @see com.gemstone.gemfire.management.internal.cli.commands.DiskStoreCommands
+  * @see com.gemstone.gemfire.management.internal.web.controllers.AbstractCommandsController
+  * @see org.springframework.stereotype.Controller
+  * @see org.springframework.web.bind.annotation.PathVariable
+  * @see org.springframework.web.bind.annotation.RequestMapping
+  * @see org.springframework.web.bind.annotation.RequestMethod
+  * @see org.springframework.web.bind.annotation.RequestParam
+  * @see org.springframework.web.bind.annotation.ResponseBody
+  * @since 8.0
+  */
+ @Controller("diskStoreController")
+ @RequestMapping(AbstractCommandsController.REST_API_VERSION)
+ @SuppressWarnings("unused")
+ public class DiskStoreCommandsController extends AbstractCommandsController {
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/diskstores")
+   @ResponseBody
+   public String listDiskStores() {
+     return processCommand(CliStrings.LIST_DISK_STORE);
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/diskstores", params = "op=backup")
+   public Callable<ResponseEntity<String>> backupDiskStore(@RequestParam(value = CliStrings.BACKUP_DISK_STORE__DISKDIRS) final String dir,
+                                                           @RequestParam(value = CliStrings.BACKUP_DISK_STORE__BASELINEDIR, required = false) final String baselineDir)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.BACKUP_DISK_STORE);
+ 
+     command.addOption(CliStrings.BACKUP_DISK_STORE__DISKDIRS, decode(dir));
+ 
+     if (hasValue(baselineDir)) {
+       command.addOption(CliStrings.BACKUP_DISK_STORE__BASELINEDIR, decode(baselineDir));
+     }
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/diskstores/{name}", params = "op=compact")
+   public Callable<ResponseEntity<String>> compactDiskStore(@PathVariable("name") final String diskStoreNameId,
+                                                            @RequestParam(value = CliStrings.COMPACT_DISK_STORE__GROUP, required = false) final String[] groups)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.COMPACT_DISK_STORE);
+ 
+     command.addOption(CliStrings.COMPACT_DISK_STORE__NAME, decode(diskStoreNameId));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.COMPACT_DISK_STORE__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/diskstores")
+   @ResponseBody
+   public String createDiskStore(@RequestParam(CliStrings.CREATE_DISK_STORE__NAME) final String diskStoreNameId,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__DIRECTORY_AND_SIZE) final String[] directoryAndSizes,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__ALLOW_FORCE_COMPACTION, defaultValue = "false") final Boolean allowForceCompaction,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__AUTO_COMPACT, defaultValue = "true") final Boolean autoCompact,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__COMPACTION_THRESHOLD, defaultValue = "50") final Integer compactionThreshold,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__MAX_OPLOG_SIZE, defaultValue = "1024") final Integer maxOplogSize,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__QUEUE_SIZE, defaultValue = "0") final Integer queueSize,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__TIME_INTERVAL, defaultValue = "1000") final Long timeInterval,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__WRITE_BUFFER_SIZE, defaultValue = "32768") final Integer writeBufferSize,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__DISK_USAGE_WARNING_PCT, defaultValue = "90") final Float diskUsageWarningPercentage,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__DISK_USAGE_CRITICAL_PCT, defaultValue = "99") final Integer diskUsageCriticalPercentage,
+                                 @RequestParam(value = CliStrings.CREATE_DISK_STORE__GROUP, required = false) final String[] groups)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_DISK_STORE);
+ 
+     command.addOption(CliStrings.CREATE_DISK_STORE__NAME, diskStoreNameId);
+     command.addOption(CliStrings.CREATE_DISK_STORE__DIRECTORY_AND_SIZE, StringUtils.concat(directoryAndSizes, StringUtils.COMMA_DELIMITER));
+     command.addOption(CliStrings.CREATE_DISK_STORE__ALLOW_FORCE_COMPACTION, String.valueOf(Boolean.TRUE.equals(allowForceCompaction)));
+     command.addOption(CliStrings.CREATE_DISK_STORE__AUTO_COMPACT, String.valueOf(Boolean.TRUE.equals(autoCompact)));
+     command.addOption(CliStrings.CREATE_DISK_STORE__COMPACTION_THRESHOLD, String.valueOf(compactionThreshold));
+     command.addOption(CliStrings.CREATE_DISK_STORE__MAX_OPLOG_SIZE, String.valueOf(maxOplogSize));
+     command.addOption(CliStrings.CREATE_DISK_STORE__QUEUE_SIZE, String.valueOf(queueSize));
+     command.addOption(CliStrings.CREATE_DISK_STORE__TIME_INTERVAL, String.valueOf(timeInterval));
+     command.addOption(CliStrings.CREATE_DISK_STORE__WRITE_BUFFER_SIZE, String.valueOf(writeBufferSize));
+     command.addOption(CliStrings.CREATE_DISK_STORE__DISK_USAGE_WARNING_PCT, String.valueOf(diskUsageWarningPercentage));
+     command.addOption(CliStrings.CREATE_DISK_STORE__DISK_USAGE_CRITICAL_PCT, String.valueOf(diskUsageCriticalPercentage));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.CREATE_DISK_STORE__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/diskstores/{name}")
+   @ResponseBody
+   public String describeDiskStore(@PathVariable("name") final String diskStoreNameId,
+                                   @RequestParam(CliStrings.DESCRIBE_DISK_STORE__MEMBER) final String memberNameId)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESCRIBE_DISK_STORE);
+     command.addOption(CliStrings.DESCRIBE_DISK_STORE__MEMBER, memberNameId);
+     command.addOption(CliStrings.DESCRIBE_DISK_STORE__NAME, decode(diskStoreNameId));
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine whether Async functionality is required
+   @RequestMapping(method = RequestMethod.DELETE, value = "/diskstores/{name}")
+   @ResponseBody
+   public String destroyDiskStore(@PathVariable("name") final String diskStoreNameId,
+                                  @RequestParam(value = CliStrings.DESTROY_DISK_STORE__GROUP, required = false) final String[] groups)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESTROY_DISK_STORE);
+ 
+     command.addOption(CliStrings.DESTROY_DISK_STORE__NAME, decode(diskStoreNameId));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.DESTROY_DISK_STORE__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine whether Async functionality is required
+   @RequestMapping(method = RequestMethod.POST, value = "/diskstores/{id}", params = "op=revoke")
+   @ResponseBody
+   public String revokeMissingDiskStore(@PathVariable("id") final String diskStoreId) {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.REVOKE_MISSING_DISK_STORE);
+     command.addOption(CliStrings.REVOKE_MISSING_DISK_STORE__ID, decode(diskStoreId));
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/diskstores/missing")
+   @ResponseBody
+   public String showMissingDiskStores() {
+     return processCommand(CliStrings.SHOW_MISSING_DISK_STORE);
+   }
+ 
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5c01d5f4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/FunctionCommandsController.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/FunctionCommandsController.java
index 0000000,8a932a0..a3e56fc
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/FunctionCommandsController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/FunctionCommandsController.java
@@@ -1,0 -1,142 +1,147 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.management.internal.web.controllers;
+ 
++import java.util.Properties;
+ import java.util.concurrent.Callable;
+ 
+ import com.gemstone.gemfire.internal.lang.StringUtils;
+ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
++import com.gemstone.gemfire.management.internal.web.controllers.support.EnvironmentVariablesHandlerInterceptor;
+ 
+ import org.springframework.http.HttpStatus;
+ import org.springframework.http.ResponseEntity;
+ import org.springframework.stereotype.Controller;
+ import org.springframework.web.bind.annotation.PathVariable;
+ import org.springframework.web.bind.annotation.RequestMapping;
+ import org.springframework.web.bind.annotation.RequestMethod;
+ import org.springframework.web.bind.annotation.RequestParam;
+ import org.springframework.web.bind.annotation.ResponseBody;
+ 
+ /**
+  * The FunctionCommandsController class implements GemFire Management REST API web service endpoints for the
+  * Gfsh Function Commands.
+  * <p/>
+  * @author John Blum
+  * @see com.gemstone.gemfire.management.internal.cli.commands.FunctionCommands
+  * @see com.gemstone.gemfire.management.internal.web.controllers.AbstractCommandsController
+  * @see org.springframework.stereotype.Controller
+  * @see org.springframework.web.bind.annotation.PathVariable
+  * @see org.springframework.web.bind.annotation.RequestMapping
+  * @see org.springframework.web.bind.annotation.RequestMethod
+  * @see org.springframework.web.bind.annotation.RequestParam
+  * @see org.springframework.web.bind.annotation.ResponseBody
+  * @since 8.0
+  */
+ @Controller("functionController")
+ @RequestMapping(AbstractCommandsController.REST_API_VERSION)
+ @SuppressWarnings("unused")
+ public class FunctionCommandsController extends AbstractCommandsController {
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/functions")
+   @ResponseBody
+   public String listFunctions(@RequestParam(value = CliStrings.LIST_FUNCTION__GROUP, required = false) final String[] groups,
+                               @RequestParam(value = CliStrings.LIST_FUNCTION__MEMBER, required = false) final String[] members,
+                               @RequestParam(value = CliStrings.LIST_FUNCTION__MATCHES, required = false) final String matches)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_FUNCTION);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.LIST_FUNCTION__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.LIST_FUNCTION__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(matches)) {
+       command.addOption(CliStrings.LIST_FUNCTION__MATCHES, matches);
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/functions/{id}")
+   public Callable<ResponseEntity<String>> executeFunction(@PathVariable("id") final String functionId,
+                                                           @RequestParam(value = CliStrings.EXECUTE_FUNCTION__ONGROUPS, required = false) final String groupName,
+                                                           @RequestParam(value = CliStrings.EXECUTE_FUNCTION__ONMEMBER, required = false) final String memberNameId,
+                                                           @RequestParam(value = CliStrings.EXECUTE_FUNCTION__ONREGION, required = false) final String regionNamePath,
+                                                           @RequestParam(value = CliStrings.EXECUTE_FUNCTION__ARGUMENTS, required = false) final String[] arguments,
+                                                           @RequestParam(value = CliStrings.EXECUTE_FUNCTION__FILTER, required = false) final String filter,
+                                                           @RequestParam(value = CliStrings.EXECUTE_FUNCTION__RESULTCOLLECTOR, required = false) final String resultCollector)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXECUTE_FUNCTION);
+ 
+     command.addOption(CliStrings.EXECUTE_FUNCTION__ID, decode(functionId));
+ 
+     if (hasValue(groupName)) {
+       command.addOption(CliStrings.EXECUTE_FUNCTION__ONGROUPS, groupName);
+     }
+ 
+     if (hasValue(memberNameId)) {
+       command.addOption(CliStrings.EXECUTE_FUNCTION__ONMEMBER, memberNameId);
+     }
+ 
+     if (hasValue(regionNamePath)) {
+       command.addOption(CliStrings.EXECUTE_FUNCTION__ONREGION, regionNamePath);
+     }
+ 
+     if (hasValue(arguments)) {
+       command.addOption(CliStrings.EXECUTE_FUNCTION__ARGUMENTS, StringUtils.concat(arguments, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(filter)) {
+       command.addOption(CliStrings.EXECUTE_FUNCTION__FILTER, filter);
+     }
+ 
+     if (hasValue(resultCollector)) {
+       command.addOption(CliStrings.EXECUTE_FUNCTION__RESULTCOLLECTOR, resultCollector);
+     }
+ 
++    
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   @RequestMapping(method = RequestMethod.DELETE, value = "/functions/{id}")
+   @ResponseBody
+   public String destroyFunction(@PathVariable("id") final String functionId,
+                                 @RequestParam(value = CliStrings.DESTROY_FUNCTION__ONGROUPS, required = false) final String groupName,
+                                 @RequestParam(value = CliStrings.DESTROY_FUNCTION__ONMEMBER, required = false) final String memberNameId)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.DESTROY_FUNCTION);
+ 
+     command.addOption(CliStrings.DESTROY_FUNCTION__ID, decode(functionId));
+ 
+     if (hasValue(groupName)) {
+       command.addOption(CliStrings.DESTROY_FUNCTION__ONGROUPS, groupName);
+     }
+ 
+     if (hasValue(memberNameId)) {
+       command.addOption(CliStrings.DESTROY_FUNCTION__ONMEMBER, memberNameId);
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5c01d5f4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/MiscellaneousCommandsController.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/MiscellaneousCommandsController.java
index 0000000,05af2fe..8ba7ae5
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/MiscellaneousCommandsController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/MiscellaneousCommandsController.java
@@@ -1,0 -1,271 +1,275 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.management.internal.web.controllers;
+ 
++import java.util.Properties;
+ import java.util.concurrent.Callable;
+ 
+ import com.gemstone.gemfire.internal.lang.StringUtils;
+ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
++import com.gemstone.gemfire.management.internal.web.controllers.support.EnvironmentVariablesHandlerInterceptor;
+ 
+ import org.springframework.http.HttpStatus;
+ import org.springframework.http.ResponseEntity;
+ import org.springframework.stereotype.Controller;
+ import org.springframework.web.bind.annotation.PathVariable;
+ import org.springframework.web.bind.annotation.RequestMapping;
+ import org.springframework.web.bind.annotation.RequestMethod;
+ import org.springframework.web.bind.annotation.RequestParam;
+ import org.springframework.web.bind.annotation.ResponseBody;
+ 
+ /**
+  * The MiscellaneousCommandsController class implements GemFire Management REST API web service endpoints for the
+  * Gfsh Miscellaneous Commands.
+  * <p/>
+  * @author John Blum
+  * @see com.gemstone.gemfire.management.internal.cli.commands.MiscellaneousCommands
+  * @see com.gemstone.gemfire.management.internal.web.controllers.AbstractCommandsController
+  * @see org.springframework.stereotype.Controller
+  * @see org.springframework.web.bind.annotation.PathVariable
+  * @see org.springframework.web.bind.annotation.RequestMapping
+  * @see org.springframework.web.bind.annotation.RequestMethod
+  * @see org.springframework.web.bind.annotation.RequestParam
+  * @see org.springframework.web.bind.annotation.ResponseBody
+  * @since 8.0
+  */
+ @Controller("miscellaneousController")
+ @RequestMapping(AbstractCommandsController.REST_API_VERSION)
+ @SuppressWarnings("unused")
+ public class MiscellaneousCommandsController extends AbstractCommandsController {
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/logs")
+   public Callable<ResponseEntity<String>> exportLogs(@RequestParam(CliStrings.EXPORT_LOGS__DIR) final String directory,
+                                                      @RequestParam(value = CliStrings.EXPORT_LOGS__GROUP, required = false) final String[] groups,
+                                                      @RequestParam(value = CliStrings.EXPORT_LOGS__MEMBER, required = false) final String memberNameId,
+                                                      @RequestParam(value = CliStrings.EXPORT_LOGS__LOGLEVEL, required = false) final String logLevel,
+                                                      @RequestParam(value = CliStrings.EXPORT_LOGS__UPTO_LOGLEVEL, defaultValue = "false") final Boolean onlyLogLevel,
+                                                      @RequestParam(value = CliStrings.EXPORT_LOGS__MERGELOG, defaultValue = "false") final Boolean mergeLog,
+                                                      @RequestParam(value = CliStrings.EXPORT_LOGS__STARTTIME, required = false) final String startTime,
+                                                      @RequestParam(value = CliStrings.EXPORT_LOGS__ENDTIME, required = false) final String endTime)
+   {
+     final CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXPORT_LOGS);
+ 
+     command.addOption(CliStrings.EXPORT_LOGS__DIR, decode(directory));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.EXPORT_LOGS__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(memberNameId)) {
+       command.addOption(CliStrings.EXPORT_LOGS__MEMBER, memberNameId);
+     }
+ 
+     if (hasValue(logLevel)) {
+       command.addOption(CliStrings.EXPORT_LOGS__LOGLEVEL, logLevel);
+     }
+ 
+     command.addOption(CliStrings.EXPORT_LOGS__UPTO_LOGLEVEL, String.valueOf(Boolean.TRUE.equals(onlyLogLevel)));
+     command.addOption(CliStrings.EXPORT_LOGS__MERGELOG, String.valueOf(Boolean.TRUE.equals(mergeLog)));
+ 
+     if (hasValue(startTime)) {
+       command.addOption(CliStrings.EXPORT_LOGS__STARTTIME, startTime);
+     }
+ 
+     if (hasValue(endTime)) {
+       command.addOption(CliStrings.EXPORT_LOGS__ENDTIME, endTime);
+     }
 -
++    
++    final Properties credentials = EnvironmentVariablesHandlerInterceptor.CREDENTIALS.get();
++    
+     return new Callable<ResponseEntity<String>>() {
+       @Override public ResponseEntity<String> call() throws Exception {
 -        return new ResponseEntity<String>(processCommand(command.toString()), HttpStatus.OK);
++        return new ResponseEntity<String>(processCommandWithCredentials(command.toString(), credentials), HttpStatus.OK);
+       }
+     };
+   }
+ 
+   // TODO determine whether Async functionality is required
+   @RequestMapping(method = RequestMethod.GET, value = "/stacktraces")
+   @ResponseBody
+   public String exportStackTraces(@RequestParam(value = CliStrings.EXPORT_STACKTRACE__FILE) final String file,
+                                   @RequestParam(value = CliStrings.EXPORT_STACKTRACE__GROUP, required = false) final String groupName,
+                                   @RequestParam(value = CliStrings.EXPORT_STACKTRACE__MEMBER, required = false) final String memberNameId) {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.EXPORT_STACKTRACE);
+ 
+     command.addOption(CliStrings.EXPORT_STACKTRACE__FILE, decode(file));
+ 
+     if (hasValue(groupName)) {
+       command.addOption(CliStrings.EXPORT_STACKTRACE__GROUP, groupName);
+     }
+ 
+     if (hasValue(memberNameId)) {
+       command.addOption(CliStrings.EXPORT_STACKTRACE__MEMBER, memberNameId);
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO add Async functionality
+   @RequestMapping(method = RequestMethod.POST, value = "/gc")
+   @ResponseBody
+   public String gc(@RequestParam(value = CliStrings.GC__GROUP, required = false) final String[] groups) {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.GC);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.GC__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO add Async functionality
+   @RequestMapping(method = RequestMethod.POST, value = "/members/{member}/gc")
+   @ResponseBody
+   public String gc(@PathVariable("member") final String memberNameId) {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.GC);
+     command.addOption(CliStrings.GC__MEMBER, decode(memberNameId));
+     return processCommand(command.toString());
+   }
+ 
+   // TODO add Async functionality
+   @RequestMapping(method = RequestMethod.GET, value = "/netstat")
+   @ResponseBody
+   public String netstat(@RequestParam(value = CliStrings.NETSTAT__MEMBER, required= false) final String[] members,
+                         @RequestParam(value = CliStrings.NETSTAT__GROUP, required = false) final String group,
+                         @RequestParam(value = CliStrings.NETSTAT__FILE, required = false) final String file,
+                         @RequestParam(value = CliStrings.NETSTAT__WITHLSOF, defaultValue = "false") final Boolean withLsof)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.NETSTAT);
+ 
+     addCommandOption(null, command, CliStrings.NETSTAT__MEMBER, members);
+     addCommandOption(null, command, CliStrings.NETSTAT__GROUP, group);
+     addCommandOption(null, command, CliStrings.NETSTAT__FILE, file);
+     addCommandOption(null, command, CliStrings.NETSTAT__WITHLSOF, withLsof);
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine if Async functionality is required
+   @RequestMapping(method = RequestMethod.GET, value = "/deadlocks")
+   @ResponseBody
+   public String showDeadLock(@RequestParam(CliStrings.SHOW_DEADLOCK__DEPENDENCIES__FILE) final String dependenciesFile) {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.SHOW_DEADLOCK);
+     command.addOption(CliStrings.SHOW_DEADLOCK__DEPENDENCIES__FILE, decode(dependenciesFile));
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine if Async functionality is required
+   @RequestMapping(method = RequestMethod.GET, value = "/members/{member}/log")
+   @ResponseBody
+   public String showLog(@PathVariable("member") final String memberNameId,
+                         @RequestParam(value = CliStrings.SHOW_LOG_LINE_NUM, defaultValue = "0") final Integer lines)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.SHOW_LOG);
+ 
+     command.addOption(CliStrings.SHOW_LOG_MEMBER, decode(memberNameId));
+     command.addOption(CliStrings.SHOW_LOG_LINE_NUM, String.valueOf(lines));
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine if Async functionality is required
+   @RequestMapping(method = RequestMethod.GET, value = "/metrics")
+   @ResponseBody
+   public String showMetrics(@RequestParam(value = CliStrings.SHOW_METRICS__MEMBER, required = false) final String memberNameId,
+                             @RequestParam(value = CliStrings.SHOW_METRICS__REGION, required = false) final String regionNamePath,
+                             @RequestParam(value = CliStrings.SHOW_METRICS__FILE, required = false) final String file,
+                             @RequestParam(value = CliStrings.SHOW_METRICS__CACHESERVER__PORT, required = false) final String cacheServerPort,
+                             @RequestParam(value = CliStrings.SHOW_METRICS__CATEGORY, required = false) final String[] categories)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.SHOW_METRICS);
+ 
+     if (hasValue(memberNameId)) {
+       command.addOption(CliStrings.SHOW_METRICS__MEMBER, memberNameId);
+     }
+ 
+     if (hasValue(regionNamePath)) {
+       command.addOption(CliStrings.SHOW_METRICS__REGION, regionNamePath);
+     }
+ 
+     if (hasValue(file)) {
+       command.addOption(CliStrings.SHOW_METRICS__FILE, file);
+     }
+ 
+     if (hasValue(cacheServerPort)) {
+       command.addOption(CliStrings.SHOW_METRICS__CACHESERVER__PORT, cacheServerPort);
+     }
+ 
+     if (hasValue(categories)) {
+       command.addOption(CliStrings.SHOW_METRICS__CATEGORY, StringUtils.concat(categories, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/shutdown")
+   @ResponseBody
+   public String shutdown(@RequestParam(value = CliStrings.SHUTDOWN__TIMEOUT, defaultValue = "-1") final Integer timeout) {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.SHUTDOWN);
+     command.addOption(CliStrings.SHUTDOWN__TIMEOUT, String.valueOf(timeout));
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine whether the {groups} and {members} path variables corresponding to the --groups and --members
+   // command-line options in the 'change loglevel' Gfsh command actually accept multiple values, and...
+   // TODO if so, then change the groups and members method parameters to String[] types.
+   // TODO If not, then these options should be renamed!
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/groups/{groups}/loglevel")
+   @ResponseBody
+   public String changeLogLevelForGroups(@PathVariable("groups") final String groups,
+                                         @RequestParam(value = CliStrings.CHANGE_LOGLEVEL__LOGLEVEL, required = true) final String logLevel)
+   {
+     return internalChangeLogLevel(groups, null, logLevel);
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/members/{members}/loglevel")
+   @ResponseBody
+   public String changeLogLevelForMembers(@PathVariable("members") final String members,
+                                          @RequestParam(value = CliStrings.CHANGE_LOGLEVEL__LOGLEVEL, required = true) final String logLevel)
+   {
+     return internalChangeLogLevel(null, members, logLevel);
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/members/{members}/groups/{groups}/loglevel")
+   @ResponseBody
+   public String changeLogLevelForMembersAndGroups(@PathVariable("members") final String members,
+                                                   @PathVariable("groups") final String groups,
+                                                   @RequestParam(value = CliStrings.CHANGE_LOGLEVEL__LOGLEVEL) final String logLevel)
+   {
+     return internalChangeLogLevel(groups, members, logLevel);
+   }
+ 
+   // NOTE since "logLevel" is "required", then just set the option; no need to validate it's value.
+   private String internalChangeLogLevel(final String groups, final String members, final String logLevel) {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.CHANGE_LOGLEVEL);
+ 
+     command.addOption(CliStrings.CHANGE_LOGLEVEL__LOGLEVEL, decode(logLevel));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.CHANGE_LOGLEVEL__GROUPS, decode(groups));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.CHANGE_LOGLEVEL__MEMBER, decode(members));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5c01d5f4/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsController.java
----------------------------------------------------------------------
diff --cc geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsController.java
index 0000000,7841392..b3e3279
mode 000000,100644..100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsController.java
@@@ -1,0 -1,403 +1,403 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ 
+ package com.gemstone.gemfire.management.internal.web.controllers;
+ 
+ import com.gemstone.gemfire.internal.lang.StringUtils;
+ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
+ 
+ import org.springframework.stereotype.Controller;
+ import org.springframework.web.bind.annotation.PathVariable;
+ import org.springframework.web.bind.annotation.RequestMapping;
+ import org.springframework.web.bind.annotation.RequestMethod;
+ import org.springframework.web.bind.annotation.RequestParam;
+ import org.springframework.web.bind.annotation.ResponseBody;
+ 
+ /**
+  * The WanCommandsController class implements the GemFire Management REST API web service endpoints for the
+  * Gfsh WAN Commands.
+  * 
+  * @author John Blum
+  * @author bolgesby
+  * @see com.gemstone.gemfire.management.internal.cli.commands.WanCommands
+  * @see com.gemstone.gemfire.management.internal.web.controllers.AbstractCommandsController
+  * @see org.springframework.stereotype.Controller
+  * @see org.springframework.web.bind.annotation.RequestMapping
+  * @see org.springframework.web.bind.annotation.RequestMethod
+  * @see org.springframework.web.bind.annotation.RequestParam
+  * @see org.springframework.web.bind.annotation.ResponseBody
+  * @since 8.0
+  */
+ @Controller("wanController")
+ @RequestMapping(AbstractCommandsController.REST_API_VERSION)
+ @SuppressWarnings("unused")
+ public class WanCommandsController extends AbstractCommandsController {
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/gateways")
+   @ResponseBody
+   public String listGateways(@RequestParam(value = CliStrings.LIST_GATEWAY__GROUP, required = false) final String[] groups,
+                              @RequestParam(value = CliStrings.LIST_GATEWAY__MEMBER, required = false) final String[] members)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.LIST_GATEWAY);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.LIST_GATEWAY__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.LIST_GATEWAY__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/receivers")
+   @ResponseBody
+   public String createGatewayReceiver(@RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__GROUP, required = false) final String[] groups,
+                                       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART, required = false) final Boolean manualStart,
+                                       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__MEMBER, required = false) final String[] members,
+                                       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__STARTPORT, required = false) final Integer startPort,
+                                       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT, required = false) final Integer endPort,
+                                       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__BINDADDRESS, required = false) final String bindAddress,
+                                       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS, required = false) final Integer maximumTimeBetweenPings,
+                                       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE, required = false) final Integer socketBufferSize,
+                                       @RequestParam(value = CliStrings.CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER, required = false) final String[] gatewayTransportFilters)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_GATEWAYRECEIVER);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__GROUP, StringUtils.concat(groups,
+         StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(manualStart)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__MANUALSTART, String.valueOf(manualStart));
+     }
+     
+     if (hasValue(members)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__MEMBER, StringUtils.concat(members,
+         StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(startPort)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__STARTPORT, String.valueOf(startPort));
+     }
+ 
+     if (hasValue(endPort)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__ENDPORT, String.valueOf(endPort));
+     }
+ 
+     if (hasValue(bindAddress)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__BINDADDRESS, bindAddress);
+     }
+ 
+     if (hasValue(maximumTimeBetweenPings)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS, String.valueOf(maximumTimeBetweenPings));
+     }
+ 
+     if (hasValue(socketBufferSize)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE, String.valueOf(socketBufferSize));
+     }
+ 
+     if (hasValue(gatewayTransportFilters)) {
+       command.addOption(CliStrings.CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER, StringUtils.concat(
+         gatewayTransportFilters, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/senders")
+   @ResponseBody
+   public String createGatewaySender(@RequestParam(CliStrings.CREATE_GATEWAYSENDER__ID) final String gatewaySenderId,
+                                     @RequestParam(CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID) final Integer remoteDistributedSystemId,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__GROUP, required = false) final String[] groups,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__MEMBER, required = false) final String[] members,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__PARALLEL, required = false) final Boolean parallel,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__MANUALSTART, required = false) final Boolean manualStart,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE, required = false) final Integer socketBufferSize,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__SOCKETREADTIMEOUT, required = false) final Integer socketReadTimeout,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__ENABLEBATCHCONFLATION, required = false) final Boolean enableBatchConflation,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__BATCHSIZE, required = false) final Integer batchSize,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__BATCHTIMEINTERVAL, required = false) final Integer batchTimeInterval,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__ENABLEPERSISTENCE, required = false) final Boolean enablePersistence,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__DISKSTORENAME, required = false) final String diskStoreName,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__DISKSYNCHRONOUS, required = false) final Boolean diskSynchronous,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__MAXQUEUEMEMORY, required = false) final Integer maxQueueMemory,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__ALERTTHRESHOLD, required = false) final Integer alertThreshold,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__DISPATCHERTHREADS, required = false) final Integer dispatcherThreads,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__ORDERPOLICY, required = false) final String orderPolicy,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__GATEWAYEVENTFILTER, required = false) final String[] gatewayEventFilters,
+                                     @RequestParam(value = CliStrings.CREATE_GATEWAYSENDER__GATEWAYTRANSPORTFILTER, required = false) final String[] gatewayTransportFilters)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_GATEWAYSENDER);
+ 
+     command.addOption(CliStrings.CREATE_GATEWAYSENDER__ID, gatewaySenderId);
+     command.addOption(CliStrings.CREATE_GATEWAYSENDER__REMOTEDISTRIBUTEDSYSTEMID, String.valueOf(remoteDistributedSystemId));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(parallel)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__PARALLEL, String.valueOf(parallel));
+     }
+ 
+     if (hasValue(manualStart)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__MANUALSTART, String.valueOf(manualStart));
+     }
+ 
+     if (hasValue(socketBufferSize)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE, String.valueOf(socketBufferSize));
+     }
+ 
+     if (hasValue(socketReadTimeout)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__SOCKETREADTIMEOUT, String.valueOf(socketReadTimeout));
+     }
+ 
+     if (hasValue(enableBatchConflation)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__ENABLEBATCHCONFLATION, String.valueOf(enableBatchConflation));
+     }
+ 
+     if (hasValue(batchSize)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__BATCHSIZE, String.valueOf(batchSize));
+     }
+ 
+     if (hasValue(batchTimeInterval)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__BATCHTIMEINTERVAL, String.valueOf(batchTimeInterval));
+     }
+ 
+     if (hasValue(enablePersistence)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__ENABLEPERSISTENCE, String.valueOf(enablePersistence));
+     }
+ 
+     if (hasValue(diskStoreName)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__DISKSTORENAME, diskStoreName);
+     }
+ 
+     if (hasValue(diskSynchronous)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__DISKSYNCHRONOUS, String.valueOf(diskSynchronous));
+     }
+ 
+     if (hasValue(maxQueueMemory)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__MAXQUEUEMEMORY, String.valueOf(maxQueueMemory));
+     }
+ 
+     if (hasValue(alertThreshold)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__ALERTTHRESHOLD, String.valueOf(alertThreshold));
+     }
+ 
+     if (hasValue(dispatcherThreads)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__DISPATCHERTHREADS, String.valueOf(dispatcherThreads));
+     }
+ 
+     if (hasValue(orderPolicy)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__ORDERPOLICY, orderPolicy);
+     }
+ 
+     if (hasValue(gatewayEventFilters)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__GATEWAYEVENTFILTER, StringUtils.concat(gatewayEventFilters,
+         StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(gatewayTransportFilters)) {
+       command.addOption(CliStrings.CREATE_GATEWAYSENDER__GATEWAYTRANSPORTFILTER, StringUtils.concat(
+         gatewayTransportFilters, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/senders/{id}", params = "op=load-balance")
+   @ResponseBody
+   public String loadBalanceGatewaySender(@PathVariable("id") final String gatewaySenderId) {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.LOAD_BALANCE_GATEWAYSENDER);
+ 
+     command.addOption(CliStrings.LOAD_BALANCE_GATEWAYSENDER__ID, decode(gatewaySenderId));
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine whether Async functionality is required
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/senders/{id}", params = "op=pause")
+   @ResponseBody
+   public String pauseGatewaySender(@PathVariable("id") final String gatewaySenderId,
+                                    @RequestParam(value = CliStrings.PAUSE_GATEWAYSENDER__GROUP, required = false) final String[] groups,
+                                    @RequestParam(value = CliStrings.PAUSE_GATEWAYSENDER__MEMBER, required = false) final String[] members)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.PAUSE_GATEWAYSENDER);
+ 
+     command.addOption(CliStrings.PAUSE_GATEWAYSENDER__ID, decode(gatewaySenderId));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.PAUSE_GATEWAYSENDER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.PAUSE_GATEWAYSENDER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine whether Async functionality is required
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/senders/{id}", params = "op=resume")
+   @ResponseBody
+   public String resumeGatewaySender(@PathVariable("id") final String gatewaySenderId,
+                                     @RequestParam(value = CliStrings.RESUME_GATEWAYSENDER__GROUP, required = false) final String[] groups,
+                                     @RequestParam(value = CliStrings.RESUME_GATEWAYSENDER__MEMBER, required = false) final String[] members)
+   {
 -    CommandStringBuilder command = new CommandStringBuilder(CliStrings.RESUME_GATEWAYSENDER__ID);
++    CommandStringBuilder command = new CommandStringBuilder(CliStrings.RESUME_GATEWAYSENDER);
+ 
+     command.addOption(CliStrings.RESUME_GATEWAYSENDER__ID, decode(gatewaySenderId));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.RESUME_GATEWAYSENDER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.RESUME_GATEWAYSENDER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine whether Async functionality is required
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/receivers", params = "op=start")
+   @ResponseBody
+   public String startGatewayReceiver(@RequestParam(value = CliStrings.START_GATEWAYRECEIVER__GROUP, required = false) final String[] groups,
+                                      @RequestParam(value = CliStrings.START_GATEWAYRECEIVER__MEMBER, required = false) final String[] members)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_GATEWAYRECEIVER);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.START_GATEWAYRECEIVER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.START_GATEWAYRECEIVER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   // TODO determine whether Async functionality is required
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/senders", params = "op=start")
+   @ResponseBody
+   public String startGatewaySender(@RequestParam(CliStrings.START_GATEWAYSENDER__ID) final String gatewaySenderId,
+                                    @RequestParam(value = CliStrings.START_GATEWAYSENDER__GROUP, required = false) final String[] groups,
+                                    @RequestParam(value = CliStrings.START_GATEWAYSENDER__MEMBER, required = false) final String[] members)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_GATEWAYSENDER);
+ 
+     command.addOption(CliStrings.START_GATEWAYSENDER__ID, gatewaySenderId);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.START_GATEWAYSENDER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.START_GATEWAYSENDER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/gateways/receivers")
+   @ResponseBody
+   public String statusGatewayReceivers(@RequestParam(value = CliStrings.STATUS_GATEWAYRECEIVER__GROUP, required = false) final String[] groups,
+                                        @RequestParam(value = CliStrings.STATUS_GATEWAYRECEIVER__MEMBER, required = false) final String[] members)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.STATUS_GATEWAYRECEIVER);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.STATUS_GATEWAYRECEIVER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.STATUS_GATEWAYRECEIVER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.GET, value = "/gateways/senders/{id}")
+   @ResponseBody
+   public String statusGatewaySenders(@PathVariable("id") final String gatewaySenderId,
+                                      @RequestParam(value = CliStrings.STATUS_GATEWAYSENDER__GROUP, required = false) final String[] groups,
+                                      @RequestParam(value = CliStrings.STATUS_GATEWAYSENDER__MEMBER, required = false) final String[] members)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.STATUS_GATEWAYSENDER);
+ 
+     command.addOption(CliStrings.STATUS_GATEWAYSENDER__ID, decode(gatewaySenderId));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.STATUS_GATEWAYSENDER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.STATUS_GATEWAYSENDER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/receivers", params = "op=stop")
+   @ResponseBody
+   public String stopGatewayReceiver(@RequestParam(value = CliStrings.STOP_GATEWAYRECEIVER__GROUP, required = false) final String[] groups,
+                                     @RequestParam(value = CliStrings.STOP_GATEWAYRECEIVER__MEMBER, required = false) final String[] members)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.STOP_GATEWAYRECEIVER);
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.STOP_GATEWAYRECEIVER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.STOP_GATEWAYRECEIVER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+   @RequestMapping(method = RequestMethod.POST, value = "/gateways/senders/{id}", params = "op=stop")
+   @ResponseBody
+   public String stopGatewaySender(@PathVariable("id") final String gatewaySenderId,
+                                   @RequestParam(value = CliStrings.STOP_GATEWAYRECEIVER__GROUP, required = false) final String[] groups,
+                                   @RequestParam(value = CliStrings.STOP_GATEWAYRECEIVER__MEMBER, required = false) final String[] members)
+   {
+     CommandStringBuilder command = new CommandStringBuilder(CliStrings.STOP_GATEWAYSENDER);
+ 
+     command.addOption(CliStrings.STOP_GATEWAYSENDER__ID, decode(gatewaySenderId));
+ 
+     if (hasValue(groups)) {
+       command.addOption(CliStrings.STOP_GATEWAYSENDER__GROUP, StringUtils.concat(groups, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     if (hasValue(members)) {
+       command.addOption(CliStrings.STOP_GATEWAYSENDER__MEMBER, StringUtils.concat(members, StringUtils.COMMA_DELIMITER));
+     }
+ 
+     return processCommand(command.toString());
+   }
+ 
+ }


Mime
View raw message