/** {@inheritDoc} */ @Override public void updateAreaWithTopSetting(ExtendArea area, String topSetting) { logger.info("[INFO] receive user top N setting define : " + topSetting); MeasureTopSetting setting = GsonUtils.fromJson(topSetting, MeasureTopSetting.class); setting.setAreaId(area.getId()); area.getLogicModel().setTopSetting(setting); }
/** @{inheritDoc */ @Override public void updateAreaTextAlignFormat(ExtendArea area, String textAlignFormat) { if (StringUtils.isEmpty(textAlignFormat)) { return; } @SuppressWarnings("unchecked") Map<String, String> textAlignFormatMap = GsonUtils.fromJson(textAlignFormat, HashMap.class); area.getFormatModel().setTextAlignFormat(textAlignFormatMap); }
@Override public void updateAreaPositionDef(ExtendArea area, String positions) { if (StringUtils.isEmpty(positions)) { return; } @SuppressWarnings("unchecked") Map<String, String> positionMap = GsonUtils.fromJson(positions, HashMap.class); area.getFormatModel().setPositions(positionMap); }
/** {@inheritDoc} */ @Override public void updateAreaColorFormat(ExtendArea area, String colorFormat) { if (StringUtils.isEmpty(colorFormat)) { return; } @SuppressWarnings("unchecked") Map<String, String> format = GsonUtils.fromJson(colorFormat, HashMap.class); area.getFormatModel().setColorFormat(format); }
/** {@inheritDoc} */ @Override public void updatePageSetting4PlaneTable(ExtendArea area, String pageSettingStr) { if (StringUtils.isEmpty(pageSettingStr)) { return; } PaginationSetting pageSetting = GsonUtils.fromJson(pageSettingStr, PaginationSetting.class); PaginationSetting defaultSetting = new PlaneTableFormat().new PaginationSetting(); if (StringUtils.isEmpty(pageSetting.getPageSizeOptions())) { pageSetting.setPageSizeOptions(defaultSetting.getPageSizeOptions()); } area.getPlaneTableFormat().setPageSetting(pageSetting); }
/** {@inheritDoc} */ @Override public void updateAreaWithOtherSetting(ExtendArea area, String otherSetting) { @SuppressWarnings("unchecked") Map<String, Object> setting = GsonUtils.fromJson(otherSetting, HashMap.class); area.setOtherSetting(setting); }