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: configurationService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private ConfigurationService configurationService;
test_class.type: ConfigurationService
test_class.var_name: configurationService
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.file: command/src/test/java/org/geomajas/command/configuration/GetMapConfigurationCommandTest.java
test_class.identifier: GetMapConfigurationCommandTest
test_case.body: @Test
  	public void testConvertMaxExtent() throws Exception {
  		Layer layer = configurationService.getLayer("countries");
  		Bbox configMaxExtent = layer.getLayerInfo().getMaxExtent();
  		Assert.assertEquals(-85.05112877980659, configMaxExtent.getX(), DOUBLE_TOLERANCE);
  		Assert.assertEquals(-85.05112877980659, configMaxExtent.getY(), DOUBLE_TOLERANCE);
  		Assert.assertEquals(170.102257, configMaxExtent.getWidth(), DOUBLE_TOLERANCE);
  		Assert.assertEquals(170.102257, configMaxExtent.getHeight(), DOUBLE_TOLERANCE);
  
  		GetMapConfigurationRequest request = new GetMapConfigurationRequest();
  		request.setApplicationId("simplevectors");
  		request.setMapId("coordTestMap");
  		GetMapConfigurationResponse response = (GetMapConfigurationResponse) dispatcher.execute(
  				GetMapConfigurationRequest.COMMAND, request, null, "en");
  		if (response.isError()) {
  			response.getErrors().get(0).printStackTrace();
  		}
  		Assert.assertFalse(response.isError());
  		ClientMapInfo mapInfo = response.getMapInfo();
  		Assert.assertNotNull(mapInfo);
  		Bbox mapMaxExtent = mapInfo.getLayers().get(0).getMaxExtent();
  		// these values were registered during a first run, they have *not* been externally verified
  		Assert.assertEquals(-9467848.347161204, mapMaxExtent.getX(), DOUBLE_TOLERANCE);
  		Assert.assertEquals(-2.0037508342789236E7, mapMaxExtent.getY(), DOUBLE_TOLERANCE);
  		Assert.assertEquals(1.8935696632026553E7, mapMaxExtent.getWidth(), DOUBLE_TOLERANCE);
  		Assert.assertEquals(4.007501596344786E7, mapMaxExtent.getHeight(), DOUBLE_TOLERANCE);
  
  		// user data
  		ClientUserDataInfo info = mapInfo.getUserData();
  		Assert.assertNotNull(info);
  		Assert.assertTrue(info instanceof ClientApplicationInfo.DummyClientUserDataInfo);
  		Assert.assertEquals("some data", ((ClientApplicationInfo.DummyClientUserDataInfo) info).getDummy());
  
  		// widget data
  		Assert.assertNotNull(mapInfo.getWidgetInfo());
  		Assert.assertNull(mapInfo.getWidgetInfo("mapSelect"));
  		Assert.assertNotNull(mapInfo.getWidgetInfo("layerTree"));
  		Assert.assertEquals("layer1, layer2",
  				((ClientApplicationInfo.DummyClientWidgetInfo) mapInfo.getWidgetInfo("layerTree")).getDummy());
  		// Default value of ViewBounds LimitOption
  		BoundsLimitOption boundsLimitOption = mapInfo.getViewBoundsLimitOption();
  		Assert.assertNotNull(info);
  		Assert.assertEquals(BoundsLimitOption.COMPLETELY_WITHIN_MAX_BOUNDS, boundsLimitOption);
  				
  	}
test_case.class_method_signature: GetMapConfigurationCommandTest.testConvertMaxExtent()
test_case.full_signature: @Test public void testConvertMaxExtent()
test_case.identifier: testConvertMaxExtent
test_case.invocations: getLayer getMaxExtent getLayerInfo assertEquals getX assertEquals getY assertEquals getWidth assertEquals getHeight setApplicationId setMapId execute isError printStackTrace get getErrors assertFalse isError getMapInfo assertNotNull getMaxExtent get getLayers assertEquals getX assertEquals getY assertEquals getWidth assertEquals getHeight getUserData assertNotNull assertTrue assertEquals getDummy assertNotNull getWidgetInfo assertNull getWidgetInfo assertNotNull getWidgetInfo assertEquals getDummy getWidgetInfo getViewBoundsLimitOption assertNotNull assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConvertMaxExtent()
focal_class.declarator: context
focal_class.modifier: @Autowired
  	private
focal_class.original_string: @Autowired
  	private ApplicationContext context;
focal_class.type: ApplicationContext
focal_class.var_name: context
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.file: command/src/main/java/org/geomajas/command/configuration/GetMapConfigurationCommand.java
focal_class.identifier: GetMapConfigurationCommand
focal_class.interfaces: implements CommandHasRequest<GetMapConfigurationRequest, GetMapConfigurationResponse>
focal_class.class_method_signature: GetMapConfigurationCommand.getEmptyCommandRequest()
focal_class.full_signature: @Override public GetMapConfigurationRequest getEmptyCommandRequest()
focal_class.identifier: getEmptyCommandRequest
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: GetMapConfigurationRequest
focal_class.signature: GetMapConfigurationRequest getEmptyCommandRequest()
focal_class.class_method_signature: GetMapConfigurationCommand.getEmptyCommandResponse()
focal_class.full_signature: @Override public GetMapConfigurationResponse getEmptyCommandResponse()
focal_class.identifier: getEmptyCommandResponse
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: GetMapConfigurationResponse
focal_class.signature: GetMapConfigurationResponse getEmptyCommandResponse()
focal_class.class_method_signature: GetMapConfigurationCommand.execute(GetMapConfigurationRequest request, GetMapConfigurationResponse response)
focal_class.full_signature: @Override public void execute(GetMapConfigurationRequest request, GetMapConfigurationResponse response)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (GetMapConfigurationRequest request, GetMapConfigurationResponse response)
focal_class.return: void
focal_class.signature: void execute(GetMapConfigurationRequest request, GetMapConfigurationResponse response)
focal_class.class_method_signature: GetMapConfigurationCommand.securityClone(ClientMapInfo original)
focal_class.full_signature: public ClientMapInfo securityClone(ClientMapInfo original)
focal_class.identifier: securityClone
focal_class.modifiers: public
focal_class.parameters: (ClientMapInfo original)
focal_class.return: ClientMapInfo
focal_class.signature: ClientMapInfo securityClone(ClientMapInfo original)
focal_class.class_method_signature: GetMapConfigurationCommand.securityClone(Map<String, ClientWidgetInfo> widgetInfo)
focal_class.full_signature: public Map<String, ClientWidgetInfo> securityClone(Map<String, ClientWidgetInfo> widgetInfo)
focal_class.identifier: securityClone
focal_class.modifiers: public
focal_class.parameters: (Map<String, ClientWidgetInfo> widgetInfo)
focal_class.return: Map<String, ClientWidgetInfo>
focal_class.signature: Map<String, ClientWidgetInfo> securityClone(Map<String, ClientWidgetInfo> widgetInfo)
focal_class.class_method_signature: GetMapConfigurationCommand.securityCloneLayerExtraInfo(Map<String, LayerExtraInfo> extraInfoMap)
focal_class.full_signature: public Map<String, LayerExtraInfo> securityCloneLayerExtraInfo(Map<String, LayerExtraInfo> extraInfoMap)
focal_class.identifier: securityCloneLayerExtraInfo
focal_class.modifiers: public
focal_class.parameters: (Map<String, LayerExtraInfo> extraInfoMap)
focal_class.return: Map<String, LayerExtraInfo>
focal_class.signature: Map<String, LayerExtraInfo> securityCloneLayerExtraInfo(Map<String, LayerExtraInfo> extraInfoMap)
focal_class.class_method_signature: GetMapConfigurationCommand.securityClone(ClientLayerInfo original)
focal_class.full_signature: public ClientLayerInfo securityClone(ClientLayerInfo original)
focal_class.identifier: securityClone
focal_class.modifiers: public
focal_class.parameters: (ClientLayerInfo original)
focal_class.return: ClientLayerInfo
focal_class.signature: ClientLayerInfo securityClone(ClientLayerInfo original)
focal_class.class_method_signature: GetMapConfigurationCommand.securityClone(ClientLayerTreeInfo original)
focal_class.full_signature: public ClientLayerTreeInfo securityClone(ClientLayerTreeInfo original)
focal_class.identifier: securityClone
focal_class.modifiers: public
focal_class.parameters: (ClientLayerTreeInfo original)
focal_class.return: ClientLayerTreeInfo
focal_class.signature: ClientLayerTreeInfo securityClone(ClientLayerTreeInfo original)
focal_class.class_method_signature: GetMapConfigurationCommand.securityClone(ClientLayerTreeNodeInfo original)
focal_class.full_signature: public ClientLayerTreeNodeInfo securityClone(ClientLayerTreeNodeInfo original)
focal_class.identifier: securityClone
focal_class.modifiers: public
focal_class.parameters: (ClientLayerTreeNodeInfo original)
focal_class.return: ClientLayerTreeNodeInfo
focal_class.signature: ClientLayerTreeNodeInfo securityClone(ClientLayerTreeNodeInfo original)
focal_class.class_method_signature: GetMapConfigurationCommand.securityClone(ClientToolbarInfo original)
focal_class.full_signature: public ClientToolbarInfo securityClone(ClientToolbarInfo original)
focal_class.identifier: securityClone
focal_class.modifiers: public
focal_class.parameters: (ClientToolbarInfo original)
focal_class.return: ClientToolbarInfo
focal_class.signature: ClientToolbarInfo securityClone(ClientToolbarInfo original)
focal_class.class_method_signature: GetMapConfigurationCommand.securityClone(List<ClientToolInfo> original)
focal_class.full_signature: public List<ClientToolInfo> securityClone(List<ClientToolInfo> original)
focal_class.identifier: securityClone
focal_class.modifiers: public
focal_class.parameters: (List<ClientToolInfo> original)
focal_class.return: List<ClientToolInfo>
focal_class.signature: List<ClientToolInfo> securityClone(List<ClientToolInfo> original)
focal_method.body: @Override
  	public void execute(GetMapConfigurationRequest request, GetMapConfigurationResponse response) throws Exception {
  		if (null == request.getApplicationId()) {
  			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "applicationId");
  		}
  		String mapId = request.getMapId();
  		if (null == mapId) {
  			throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "mapId");
  		}
  
  		ClientApplicationInfo application = context.getBean(request.getApplicationId(), ClientApplicationInfo.class);
  		for (ClientMapInfo map : application.getMaps()) {
  			if (mapId.equals(map.getId())) {
  				response.setMapInfo(securityClone(map));
  			}
  		}
  		if (response.getMapInfo() == null) {
  			throw new GeomajasException(ExceptionCode.MAP_NOT_FOUND, request.getMapId(), request.getApplicationId());
  		}
  	}
focal_method.class_method_signature: GetMapConfigurationCommand.execute(GetMapConfigurationRequest request, GetMapConfigurationResponse response)
focal_method.full_signature: @Override public void execute(GetMapConfigurationRequest request, GetMapConfigurationResponse response)
focal_method.identifier: execute
focal_method.invocations: getApplicationId getMapId getBean getApplicationId getMaps equals getId setMapInfo securityClone getMapInfo getMapId getApplicationId
focal_method.modifiers: @Override public
focal_method.parameters: (GetMapConfigurationRequest request, GetMapConfigurationResponse response)
focal_method.return: void
focal_method.signature: void execute(GetMapConfigurationRequest request, GetMapConfigurationResponse response)