test_class.declarator: DOUBLE_TOLERANCE = .0000000001
test_class.modifier: private static final
test_class.original_string: private static final double DOUBLE_TOLERANCE = .0000000001;
test_class.type: double
test_class.var_name: DOUBLE_TOLERANCE
test_class.declarator: CRS = "EPSG:4326"
test_class.modifier: private static final
test_class.original_string: private static final String CRS = "EPSG:4326";
test_class.type: String
test_class.var_name: CRS
test_class.declarator: dispatcher
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private CommandDispatcher dispatcher;
test_class.type: CommandDispatcher
test_class.var_name: dispatcher
test_class.declarator: geoService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private GeoService geoService;
test_class.type: GeoService
test_class.var_name: geoService
test_class.declarator: dtoConverter
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private DtoConverterService dtoConverter;
test_class.type: DtoConverterService
test_class.var_name: dtoConverter
test_class.file: command/src/test/java/org/geomajas/command/render/GetRasterTilesCommandTest.java
test_class.identifier: GetRasterTilesCommandTest
test_case.body: @Test
  	public void testNoLayerIdRequest() throws Exception {
  		GetRasterTilesRequest request = new GetRasterTilesRequest();
  		request.setCrs(CRS);
  		GetRasterTilesResponse response = (GetRasterTilesResponse) dispatcher.execute(
  				GetRasterTilesRequest.COMMAND, request, null, "en");
  		Assert.assertTrue(response.isError());
  		Assert.assertTrue(response.getErrors().get(0) instanceof GeomajasException);
  		Assert.assertEquals(ExceptionCode.PARAMETER_MISSING,
  				((GeomajasException) response.getErrors().get(0)).getExceptionCode());
  	}
test_case.class_method_signature: GetRasterTilesCommandTest.testNoLayerIdRequest()
test_case.full_signature: @Test public void testNoLayerIdRequest()
test_case.identifier: testNoLayerIdRequest
test_case.invocations: setCrs execute assertTrue isError assertTrue get getErrors assertEquals getExceptionCode get getErrors
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNoLayerIdRequest()
focal_class.declarator: log = LoggerFactory.getLogger(GetRasterTilesCommand.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(GetRasterTilesCommand.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: converterService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private DtoConverterService converterService;
focal_class.type: DtoConverterService
focal_class.var_name: converterService
focal_class.declarator: securityContext
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private SecurityContext securityContext;
focal_class.type: SecurityContext
focal_class.var_name: securityContext
focal_class.declarator: layerService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private RasterLayerService layerService;
focal_class.type: RasterLayerService
focal_class.var_name: layerService
focal_class.declarator: geoService
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private GeoService geoService;
focal_class.type: GeoService
focal_class.var_name: geoService
focal_class.file: command/src/main/java/org/geomajas/command/render/GetRasterTilesCommand.java
focal_class.identifier: GetRasterTilesCommand
focal_class.interfaces: implements CommandHasRequest<GetRasterTilesRequest, GetRasterTilesResponse>
focal_class.class_method_signature: GetRasterTilesCommand.getEmptyCommandRequest()
focal_class.full_signature: @Override public GetRasterTilesRequest getEmptyCommandRequest()
focal_class.identifier: getEmptyCommandRequest
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: GetRasterTilesRequest
focal_class.signature: GetRasterTilesRequest getEmptyCommandRequest()
focal_class.class_method_signature: GetRasterTilesCommand.getEmptyCommandResponse()
focal_class.full_signature: @Override public GetRasterTilesResponse getEmptyCommandResponse()
focal_class.identifier: getEmptyCommandResponse
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: GetRasterTilesResponse
focal_class.signature: GetRasterTilesResponse getEmptyCommandResponse()
focal_class.class_method_signature: GetRasterTilesCommand.execute(GetRasterTilesRequest request, GetRasterTilesResponse response)
focal_class.full_signature: @Override public void execute(GetRasterTilesRequest request, GetRasterTilesResponse response)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (GetRasterTilesRequest request, GetRasterTilesResponse response)
focal_class.return: void
focal_class.signature: void execute(GetRasterTilesRequest request, GetRasterTilesResponse response)
focal_method.body: @Override
  	public void execute(GetRasterTilesRequest request, GetRasterTilesResponse response) throws Exception {
  		log.debug("request start layer {}, crs {}", request.getLayerId(), request.getCrs());
  		String layerId = request.getLayerId();
  		if (null == layerId) {
  			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "layer");
  		}
  		if (null == request.getCrs()) {
  			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "crs");
  		}
  		if (!securityContext.isLayerVisible(layerId)) {
  			throw new GeomajasSecurityException(ExceptionCode.LAYER_NOT_VISIBLE, layerId, securityContext.getUserId());
  		}
  
  		log.debug("execute() : bbox {}", request.getBbox());
  		List<RasterTile> images = layerService.getTiles(layerId, geoService.getCrs2(request.getCrs()),
  				converterService.toInternal(request.getBbox()),	request.getScale());
  		log.debug("execute() : returning {} images", images.size());
  
  		response.setRasterData(images);
  		if (images.size() > 0) {
  			response.setNodeId(layerId + "." + images.get(0).getCode().getTileLevel());
  		}
  	}
focal_method.class_method_signature: GetRasterTilesCommand.execute(GetRasterTilesRequest request, GetRasterTilesResponse response)
focal_method.full_signature: @Override public void execute(GetRasterTilesRequest request, GetRasterTilesResponse response)
focal_method.identifier: execute
focal_method.invocations: debug getLayerId getCrs getLayerId getCrs isLayerVisible getUserId debug getBbox getTiles getCrs2 getCrs toInternal getBbox getScale debug size setRasterData size setNodeId getTileLevel getCode get
focal_method.modifiers: @Override public
focal_method.parameters: (GetRasterTilesRequest request, GetRasterTilesResponse response)
focal_method.return: void
focal_method.signature: void execute(GetRasterTilesRequest request, GetRasterTilesResponse response)