/** * Retrieve the list of ClientWidgetInfo's from the blueprint's and geodesks application info. If clientWidgetInfo's * are defined on both blueprint and geodesk level, that defined in the geodesk is used. * * @param geodesk the blueprint * @return List of ClientWidgetInfo as defined in the blueprint */ public static Map<String, ClientWidgetInfo> getApplicationClientWidgetInfo(BaseGeodeskDto geodesk) { Map<String, ClientWidgetInfo> widgetInfos = new HashMap<String, ClientWidgetInfo>(); if (geodesk instanceof GeodeskDto) { widgetInfos.putAll(getApplicationClientWidgetInfo(((GeodeskDto) geodesk).getBlueprint())); } if (geodesk instanceof BlueprintDto) { widgetInfos.putAll(getApplicationClientWidgetInfo(geodesk.getUserApplicationInfo())); } widgetInfos.putAll(geodesk.getApplicationClientWidgetInfos()); return widgetInfos; }
/** * Retrieve the list of ClientWidgetInfo's from the blueprint's and geodesks main map. If clientWidgetInfo's are * defined on both blueprint and geodesk level, that defined in the geodesk is used. * * @param geodesk the blueprint * @return List of ClientWidgetInfo as defined in the blueprint */ public static Map<String, ClientWidgetInfo> getMainMapClientWidgetInfo(BaseGeodeskDto geodesk) { Map<String, ClientWidgetInfo> widgetInfos = new HashMap<String, ClientWidgetInfo>(); if (geodesk instanceof GeodeskDto) { widgetInfos.putAll(getMainMapClientWidgetInfo(((GeodeskDto) geodesk).getBlueprint())); } if (geodesk instanceof BlueprintDto) { widgetInfos.putAll(getMainMapClientWidgetInfo(geodesk.getUserApplicationInfo())); } widgetInfos.putAll(geodesk.getMainMapClientWidgetInfos()); return widgetInfos; }
/** * Retrieve the list of ClientWidgetInfo's from the blueprint's and geodesks overview map. If clientWidgetInfo's are * defined on both blueprint and geodesk level, that defined in the geodesk is used. * * @param geodesk the blueprint * @return List of ClientWidgetInfo as defined in the blueprint */ public static Map<String, ClientWidgetInfo> getOverviewMapClientWidgetInfo(BaseGeodeskDto geodesk) { Map<String, ClientWidgetInfo> widgetInfos = new HashMap<String, ClientWidgetInfo>(); if (geodesk instanceof GeodeskDto) { widgetInfos.putAll(getOverviewMapClientWidgetInfo(((GeodeskDto) geodesk).getBlueprint())); } if (geodesk instanceof BlueprintDto) { widgetInfos.putAll(getOverviewMapClientWidgetInfo(geodesk.getUserApplicationInfo())); } widgetInfos.putAll(geodesk.getOverviewMapClientWidgetInfos()); return widgetInfos; }
/** * Retrieve the main map layers from the geodesk. If it's a geodesk without layers, the layers from the blueprint * are retrieved. * * @param geodesk the geodesk * @return a list of layers */ public static List<LayerDto> getMainMapLayers(BaseGeodeskDto geodesk) { if (geodesk instanceof GeodeskDto && (geodesk.getMainMapLayers() == null || geodesk.getMainMapLayers().isEmpty())) { return getMainMapLayers(((GeodeskDto) geodesk).getBlueprint()); } return geodesk.getMainMapLayers(); } }
public void execute(GetClientLayersResponse result) { if (geodesk.getMainMapLayers() == null || geodesk.getMainMapLayers().size() == 0) { //If no layers is set, present default from blueprint layerSelect.setValues(geodesk.getBlueprint().getMainMapLayers(), result.getLayers(), geodesk.getBlueprint().getMainMapLayers(), !geodesk.isPublic()); } else { layerSelect.setValues(geodesk.getBlueprint().getMainMapLayers(), result.getLayers(), geodesk.getMainMapLayers(), !geodesk.isPublic()); } fireChangedHandler(); }
public void onChanged(ChangedEvent event) { boolean val = publicGeodesk.getValueAsBoolean(); if (geodesk.getBlueprint().isLimitToCreatorTerritory()) { limitToCreatorTerritory.setDisabled(true); } else { limitToCreatorTerritory.setDisabled(!val); } if (geodesk.getBlueprint().isLimitToUserTerritory()) { limitToUserTerritory.setDisabled(true); } else { limitToUserTerritory.setDisabled(val); } } });
geodeskName.setValue(loket.getName()); geodeskId.setValue(loket.getGeodeskId()); blueprints.setValue(loket.getBlueprint().getId()); geodeskAdministrator.setValue(loket.getCreationBy()); lastEditBy.setValue(loket.getLastEditBy()); publicGeodesk.setDisabled(!loket.getBlueprint().isPublic()); if (!limitToUserTerritory.isDisabled()) { limitToUserTerritory.setDisabled(loket.getBlueprint().isLimitToUserTerritory()); limitToCreatorTerritory.setDisabled(loket.getBlueprint().isLimitToCreatorTerritory()); if (!loket.getBlueprint().isGeodesksActive()) { active.setDisabled(true); active.setHint("<nobr>" + MESSAGES.geodeskSettingsWarnGeodeskInactivedByBlueprint() + "</nobr>");
private ListGridRecord toGridRecord(GeodeskDto loket) { ListGridRecord record = new ListGridRecord(); record.setAttribute(FLD_ID, loket.getId()); record.setAttribute(FLD_NAME, loket.getName()); record.setAttribute(FLD_BLUEPRINT, loket.getBlueprint().getName()); record.setAttribute(FLD_AUTHOR, loket.getLastEditBy()); record.setAttribute(FLD_PUBLIC, loket.isPublic()); record.setAttribute(FLD_ACTIVE, loket.isActive() && loket.getBlueprint().isGeodesksActive()); record.setAttribute(FLD_ACTIONS, " "); record.setAttribute(FLD_GEODESKID, loket.getGeodeskId()); record.setAttribute(FLD_OWNER, loket.getOwner() != null ? loket.getOwner().getName() : MESSAGES.geodeskGridColumnOwnerNoOwner()); record.setAttribute(FLD_OBJECT, loket); return record; }
@Override public void onBlueprintChange(BlueprintEvent bpe) { if (!bpe.isDeleted() && !bpe.isNewInstance()) { // just changed for (Record r : getDataAsRecordList().toArray()) { GeodeskDto l = (GeodeskDto) r.getAttributeAsObject(FLD_OBJECT); if (l.getBlueprint().getId().equals(bpe.getBlueprint().getId())) { r.setAttribute(FLD_ACTIVE, l.isActive() && bpe.getBlueprint().isGeodesksActive()); refreshRow(getRecordIndex(r)); if (getSelectedRecord() != null && getSelectedRecord().equals(r)) { deselectAllRecords(); selectRecord(r); } } } } }
l.setBlueprint(fromDto(dto.getBlueprint())); l.setCreationBy(dto.getCreationBy()); l.setCreationDate(dto.getCreationDate());
l.setBlueprint(fromDto(dto.getBlueprint())); l.setCreationBy(dto.getCreationBy()); l.setCreationDate(dto.getCreationDate());