Package org.geomajas.configuration.client

Examples of org.geomajas.configuration.client.ClientApplicationInfo


        GetConfigurationRequest.COMMAND, request, null, "en");
    if (response.isError()) {
      response.getErrors().get(0).printStackTrace();
    }
    Assert.assertFalse(response.isError());
    ClientApplicationInfo appInfo = response.getApplication();
    Assert.assertNotNull(appInfo);
    Assert.assertEquals(APP_ID, appInfo.getId());
    Assert.assertEquals(96, appInfo.getScreenDpi());

    // widget data
    Assert.assertNotNull(appInfo.getWidgetInfo());
    Assert.assertNotNull(appInfo.getWidgetInfo("mapSelect"));
    Assert.assertNull(appInfo.getWidgetInfo("layerTree"));
    Assert.assertEquals("map1, map2",
        ((ClientApplicationInfo.DummyClientWidgetInfo) appInfo.getWidgetInfo("mapSelect")).getDummy());

    verifyMap(appInfo.getMaps().get(2));
  }
View Full Code Here


  /** {@inheritDoc} */
  public ClientMapInfo getMap(String mapId, String applicationId) {
    if (null == mapId || null == applicationId) {
      return null;
    }
    ClientApplicationInfo application = applicationMap.get(applicationId);
    if (application != null) {
      for (ClientMapInfo map : application.getMaps()) {
        if (mapId.equals(map.getId())) {
          return map;
        }
      }
    }
View Full Code Here

  public ClientMapInfo getMapInfo(String mapId, String applicationId) {
    if (null == mapId || null == applicationId) {
      return null;
    }
    ClientApplicationInfo application = applicationMap.get(applicationId);
    if (application != null) {
      for (ClientMapInfo map : application.getMaps()) {
        if (mapId.equals(map.getId())) {
          return map;
        }
      }
    }
View Full Code Here

    if (null == request.getApplicationId()) {
      throw new GeomajasException(ExceptionCode.PARAMETER_MISSING, "applicationId");
    }

    // the data is explicitly copied as this assures the security is considered when copying.
    ClientApplicationInfo original = context.getBean(request.getApplicationId(), ClientApplicationInfo.class);
    if (original == null) {
      throw new GeomajasException(ExceptionCode.APPLICATION_NOT_FOUND, request.getApplicationId());
    }
    ClientApplicationInfo client = new ClientApplicationInfo();
    client.setId(original.getId());
    client.setUserData(original.getUserData());
    client.setWidgetInfo(original.getWidgetInfo());
    client.setScreenDpi(original.getScreenDpi());
    List<ClientMapInfo> maps = new ArrayList<ClientMapInfo>();
    client.setMaps(maps);
    for (ClientMapInfo map : original.getMaps()) {
      maps.add(mapConfigurationCommand.securityClone(map));
    }
    response.setApplication(client);
  }
View Full Code Here

    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) {
View Full Code Here

TOP

Related Classes of org.geomajas.configuration.client.ClientApplicationInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.