Skip to content
Snippets Groups Projects

Resolve "Rest API should follow google guidlines"

Merged Piotr Gawron requested to merge 90-rest-api-should-follow-google-guidlines into master
10 files
+ 378
147
Compare changes
  • Side-by-side
  • Inline
Files
10
package lcsb.mapviewer.api.projects.models.publications;
import java.awt.geom.Point2D;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
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.RestController;
import lcsb.mapviewer.api.BaseController;
import lcsb.mapviewer.api.QueryException;
import lcsb.mapviewer.commands.CommandExecutionException;
import lcsb.mapviewer.converter.ConverterException;
import lcsb.mapviewer.model.cache.FileEntry;
import lcsb.mapviewer.model.map.InconsistentModelException;
import lcsb.mapviewer.model.map.layout.InvalidColorSchemaException;
import lcsb.mapviewer.services.SecurityException;
@RestController
public class PublicationsController extends BaseController {
@Autowired
private PublicationsRestImpl projectController;
@RequestMapping(value = "/projects/{projectId}/models/{modelId}/publications/", method = { RequestMethod.GET },
produces = { MediaType.APPLICATION_JSON_VALUE })
public Map<String, Object> getPublications(//
@PathVariable(value = "projectId") String projectId, //
@PathVariable(value = "modelId") String modelId, //
@RequestParam(value = "token") String token, //
@RequestParam(value = "start", defaultValue = "0") String start, //
@RequestParam(value = "length", defaultValue = "10") Integer length//
) throws QueryException, SecurityException {
return projectController.getPublications(projectId, modelId, token, start, length);
}
}
\ No newline at end of file
Loading