Added REST services that leverage the CLI#1207
Conversation
…s/indexes. Various other small REST fixes/implementations
…mprove RESTful practices
| @@ -1,5 +1,5 @@ | |||
| /******************************************************************************* | |||
| * Copyright (c) 2013-2017 Contributors to the Eclipse Foundation | |||
| +6 * Copyright (c) 2013-2017 Contributors to the Eclipse Foundation | |||
| // given | ||
| // parameters as the Default parameters. It's also done so that we can | ||
| // parse prefix annotations and special delegate processing. | ||
| JCommanderPrefixTranslator translator = new JCommanderPrefixTranslator(); |
There was a problem hiding this comment.
do we know why the logic here got re-arranged?
There was a problem hiding this comment.
I don't even think this is relevant to REST services, probably should convert back
| /******************************************************************************* | ||
| * Copyright (c) 2013-2017 Contributors to the Eclipse Foundation | ||
| * | ||
| * |
There was a problem hiding this comment.
this happens often, removing a space on this one line
| "="); | ||
| key = parts[0]; | ||
| value = converter.convert(parts[1]); | ||
| value = parts[1]; |
There was a problem hiding this comment.
we got rid of password converter, seems like a discrepancy with the old code
There was a problem hiding this comment.
when execute() call this set a flag to indicate we still want to use the password converter, except only use the password converter if isPassword
| return setKeyValue(params); | ||
| } | ||
| catch (WritePropertiesException | ParameterException e) { | ||
| // TODO GEOWAVE-rest-project server error status message |
There was a problem hiding this comment.
can't we throw an exception or does returning null set error status?
| private Object setKeyValue( | ||
| final OperationParams params ) { | ||
|
|
||
| final File f = (File) params.getContext().get( |
There was a problem hiding this comment.
is there a reason we don't use getGeoConfigProperties() like the non-service code?
| final String indexList = parameters.get(1); | ||
|
|
||
| // Config file | ||
| final File configFile = (File) params.getContext().get( |
There was a problem hiding this comment.
again it looks like a slight change from previous in not using getGeoWaveConfig() ... my suspicion is that this is simply a mistake in one of the merges from master not reflecting that change rather than something that was consciously done
| final String indexList = parameters.get(2); | ||
|
|
||
| // Config file | ||
| final File configFile = (File) params.getContext().get( |
|
|
||
| // Config file | ||
| File configFile = getGeoWaveConfigFile(params); | ||
| final File configFile = (File) params.getContext().get( |
| final String indexList = parameters.get(3); | ||
|
|
||
| // Config file | ||
| final File configFile = (File) params.getContext().get( |
| // Try to load the 'default' options. | ||
|
|
||
| String defaultIndex = existingProps.getProperty(IndexPluginOptions.DEFAULT_PROPERTY_NAMESPACE); | ||
| final File configFile = (File) params.getContext().get( |
| "No type could be infered"); | ||
| } | ||
|
|
||
| final File propFile = (File) params.getContext().get( |
| addIndexGroup(params); | ||
| } | ||
| catch (WritePropertiesException | ParameterException e) { | ||
| // TODO GEOWAVE-rest-project server error status message |
There was a problem hiding this comment.
can't we supply server error status through some means
| */ | ||
| private void addIndexGroup( | ||
| final OperationParams params ) { | ||
| final File propFile = (File) params.getContext().get( |
|
|
||
| @Parameter(description = "<workspace name>") | ||
| private List<String> parameters = new ArrayList<String>(); | ||
| private final List<String> parameters = new ArrayList<String>(); |
| getConfig().getUser(), | ||
| getConfig().getPass())); | ||
| webTarget = client.target(url); | ||
| try { |
There was a problem hiding this comment.
this getWebTarget() is an issue (we should technically cache the client based on URL, user, and password, or invalidate it when one of those things changes)
| docker-root | ||
| generated | ||
| .metadata | ||
| swagger.json |
| @@ -0,0 +1 @@ | |||
| swagger.json | |||
There was a problem hiding this comment.
let's move this up a level to services because I believe it actually show up in webapp (and add api.db)
| value = parameters.get(1); | ||
| } | ||
| else { | ||
| value = converter.convert(parameters.get(1)); |
| value = parts[1]; | ||
| } | ||
| else { | ||
| value = converter.convert(parts[1]); |
| OperationParams params ) { | ||
| File configFile = (File) params.getContext().get( | ||
| ConfigOptions.PROPERTIES_FILE_CONTEXT); | ||
| ; |
| // Config file | ||
| final File configFile = (File) params.getContext().get( | ||
| ConfigOptions.PROPERTIES_FILE_CONTEXT); | ||
| ; |
| OperationParams params ) { | ||
| File configFile = (File) params.getContext().get( | ||
| ConfigOptions.PROPERTIES_FILE_CONTEXT); | ||
| ; |
|
|
||
| import mil.nga.giat.geowave.core.cli.annotations.GeowaveOperation; | ||
| import mil.nga.giat.geowave.core.cli.api.DefaultOperation; | ||
| import mil.nga.giat.geowave.core.cli.api.OperationParams; |
…document process, and consolidating into one location for each. Correcting a few locations missed for the dynamic project version. Also, re-wrote the releases dropdown code to not be driven by static list items code Updating documentation to have a simpler format for the different release versions, as well as updating some of the asciidoc files to add the project version at the top of the page. Also adding a simple documentation archive page to store the older versions of geowave as time goes on. Adding a few tweaks to the index page to remove some quickstart links. Also updating documentation files to try and make all internal document links relative and not static, so to preserve document versions from release to release. Also changing some file names to adhere to the overall naming convention. Modified geowave tools script (#1209) Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com> Added REST services that leverage the CLI (#1207) * REST services added * Implemented parsers and other classes to make service compatible with swagger * Various rest fixes/implementations. Command and section changes * Added AddStore and AddIndex commands for the different types of stores/indexes. Various other small REST fixes/implementations * Improved RESTful practices and refactored code to make it more maintainable * fixed twitter serialization * locationtech ip fixes (#1189) * fixed minor issues with config commands * fixes for encrypted passwords * Fixed issues with converter handling and swaggerpaths. Continued to improve RESTful practices * Deployed Rest Server as a web application, implemented Oauth2 for Facebook * Removed mandatory Oauth, updated swaggerpaths * fixed fileupload and removed security * Improved upon responses and response codes for certain REST calls, minor bug fixes * findbugs fix * removed superfluous 'final' denotations * Fixed config file getters * gave set command a failure response * added validate line back in * deleted spi file * updated gitignores * fixed converter in setcommand * fixed bug and refactored geoserver commands * Reverted changes from non-serviceenabled config commands * reverted help command * added logging to set and AddIndexGroup commands * added getGeowaveContext * formatting and small replacements * geoserver fixes * set command and format fixes * took out binary Removed HADOOP_OPTS from geowave-tools.sh (#1211) Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com> HP Fortify comments and fixes (#1213)
…document process, and consolidating into one location for each. Correcting a few locations missed for the dynamic project version. Also, re-wrote the releases dropdown code to not be driven by static list items code Updating documentation to have a simpler format for the different release versions, as well as updating some of the asciidoc files to add the project version at the top of the page. Also adding a simple documentation archive page to store the older versions of geowave as time goes on. Adding a few tweaks to the index page to remove some quickstart links. Also updating documentation files to try and make all internal document links relative and not static, so to preserve document versions from release to release. Also changing some file names to adhere to the overall naming convention. Modified geowave tools script (#1209) Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com> Added REST services that leverage the CLI (#1207) * REST services added * Implemented parsers and other classes to make service compatible with swagger * Various rest fixes/implementations. Command and section changes * Added AddStore and AddIndex commands for the different types of stores/indexes. Various other small REST fixes/implementations * Improved RESTful practices and refactored code to make it more maintainable * fixed twitter serialization * locationtech ip fixes (#1189) * fixed minor issues with config commands * fixes for encrypted passwords * Fixed issues with converter handling and swaggerpaths. Continued to improve RESTful practices * Deployed Rest Server as a web application, implemented Oauth2 for Facebook * Removed mandatory Oauth, updated swaggerpaths * fixed fileupload and removed security * Improved upon responses and response codes for certain REST calls, minor bug fixes * findbugs fix * removed superfluous 'final' denotations * Fixed config file getters * gave set command a failure response * added validate line back in * deleted spi file * updated gitignores * fixed converter in setcommand * fixed bug and refactored geoserver commands * Reverted changes from non-serviceenabled config commands * reverted help command * added logging to set and AddIndexGroup commands * added getGeowaveContext * formatting and small replacements * geoserver fixes * set command and format fixes * took out binary Removed HADOOP_OPTS from geowave-tools.sh (#1211) Signed-off-by: Srinivas Varala <srinivas.varala@gmail.com> HP Fortify comments and fixes (#1213)
No description provided.