private SystemValuesManager() { for (TablePropertyDefinition propDef :TablePropertyDefinitionUtils.getSystemProperties()) { if (CURRENT_USER_DESCRIPTOR.equals(propDef.getSystemValueDescriptor())) { if (!systemValues.containsKey(CURRENT_USER_DESCRIPTOR)) { systemValues.put(CURRENT_USER_DESCRIPTOR, new CurrentUserValue()); } } else if (CURRENT_DATE_DESCRIPTOR.equals(propDef.getSystemValueDescriptor())) { if (!systemValues.containsKey(CURRENT_DATE_DESCRIPTOR)) { systemValues.put(CURRENT_DATE_DESCRIPTOR, new CurrentDateValue()); } } } }
private SystemValuesManager() { for (TablePropertyDefinition propDef :TablePropertyDefinitionUtils.getSystemProperties()) { if (CURRENT_USER_DESCRIPTOR.equals(propDef.getSystemValueDescriptor())) { if (!systemValues.containsKey(CURRENT_USER_DESCRIPTOR)) { systemValues.put(CURRENT_USER_DESCRIPTOR, new CurrentUserValue()); } } else if (CURRENT_DATE_DESCRIPTOR.equals(propDef.getSystemValueDescriptor())) { if (!systemValues.containsKey(CURRENT_DATE_DESCRIPTOR)) { systemValues.put(CURRENT_DATE_DESCRIPTOR, new CurrentDateValue()); } } } }
private SystemValuesManager() { for (TablePropertyDefinition propDef :TablePropertyDefinitionUtils.getSystemProperties()) { if (currentUserDescription.equals(propDef.getSystemValueDescriptor())) { if (!systemValues.containsKey(currentUserDescription)) { systemValues.put(currentUserDescription, new CurrentUserValue()); } } else if (currentDatedescription.equals(propDef.getSystemValueDescriptor())) { if (!systemValues.containsKey(currentDatedescription)) { systemValues.put(currentDatedescription, new CurrentDateValue()); } } } }
public static boolean updateSystemProperties(IOpenLTable table, TableEditorModel tableEditorModel, String userMode) { boolean result = true; if (table.isCanContainProperties()) { List<TablePropertyDefinition> systemPropertiesDefinitions = TablePropertyDefinitionUtils.getSystemProperties(); for (TablePropertyDefinition systemProperty : systemPropertiesDefinitions) { result = updateSystemValue(tableEditorModel, systemProperty, userMode); } } return result; }
public static boolean updateSystemProperties(IOpenLTable table, TableEditorModel tableEditorModel, String userMode) { boolean result = true; if (table.isCanContainProperties()) { List<TablePropertyDefinition> systemPropertiesDefinitions = TablePropertyDefinitionUtils.getSystemProperties(); for (TablePropertyDefinition systemProperty : systemPropertiesDefinitions) { result = updateSystemValue(tableEditorModel, systemProperty, userMode); } } return result; }
@SuppressWarnings("unchecked") public boolean updateSystemProperties() { boolean result = true; if (!isServiceTable()) { String editorId = FacesUtils.getRequestParameter( org.openl.rules.tableeditor.util.Constants.REQUEST_PARAM_EDITOR_ID); Map editorModelMap = (Map) FacesUtils.getSessionParam( org.openl.rules.tableeditor.util.Constants.TABLE_EDITOR_MODEL_NAME); TableEditorModel editorModel = (TableEditorModel) editorModelMap.get(editorId); List<TablePropertyDefinition> sysProps = TablePropertyDefinitionUtils.getSystemProperties(); for (TablePropertyDefinition sysProperty : sysProps) { result = updateSystemValue(editorModel, sysProperty); } } return result; }
protected Map<String, Object> buildSystemProperties() { Map<String, Object> result = new LinkedHashMap<String, Object>(); List<TablePropertyDefinition> systemPropDefinitions = TablePropertyDefinitionUtils.getSystemProperties(); for (TablePropertyDefinition systemPropDef : systemPropDefinitions) { if (systemPropDef.getSystemValuePolicy().equals(SystemValuePolicy.IF_BLANK_ONLY)) { Object systemValue = SystemValuesManager.getInstance(). getSystemValue(systemPropDef.getSystemValueDescriptor()); if (systemValue != null) { result.put(systemPropDef.getName(), systemValue); } } } return result; }
protected Map<String, Object> buildSystemProperties() { String userMode = WebStudioUtils.getWebStudio().getSystemConfigManager().getStringProperty("user.mode"); Map<String, Object> result = new LinkedHashMap<String, Object>(); List<TablePropertyDefinition> systemPropDefinitions = TablePropertyDefinitionUtils.getSystemProperties(); for (TablePropertyDefinition systemPropDef : systemPropDefinitions) { String systemValueDescriptor = systemPropDef.getSystemValueDescriptor(); if (userMode.equals("single") && systemValueDescriptor.equals(SystemValuesManager.CURRENT_USER_DESCRIPTOR)) { continue; } if (systemPropDef.getSystemValuePolicy().equals(SystemValuePolicy.IF_BLANK_ONLY)) { Object systemValue = SystemValuesManager.getInstance().getSystemValue(systemValueDescriptor); if (systemValue != null) { result.put(systemPropDef.getName(), systemValue); } } } return result; }
/** * Creates system properties for new table. * * @return */ protected Map<String, Object> buildSystemProperties() { Map<String, Object> result = new HashMap<String, Object>(); List<TablePropertyDefinition> systemPropDefinitions = TablePropertyDefinitionUtils.getSystemProperties(); for (TablePropertyDefinition systemPropDef : systemPropDefinitions) { if (systemPropDef.getSystemValuePolicy().equals(SystemValuePolicy.IF_BLANK_ONLY)) { Object systemValue = SystemValuesManager.getInstance().getSystemValue( systemPropDef.getSystemValueDescriptor()); if (systemValue != null){ result.put(systemPropDef.getName(), systemValue); } } } return result; }
protected Map<String, Object> buildSystemProperties() { String userMode = WebStudioUtils.getWebStudio().getSystemConfigManager().getStringProperty("user.mode"); Map<String, Object> result = new LinkedHashMap<String, Object>(); List<TablePropertyDefinition> systemPropDefinitions = TablePropertyDefinitionUtils.getSystemProperties(); for (TablePropertyDefinition systemPropDef : systemPropDefinitions) { String systemValueDescriptor = systemPropDef.getSystemValueDescriptor(); if (userMode.equals("single") && systemValueDescriptor.equals(SystemValuesManager.CURRENT_USER_DESCRIPTOR)) { continue; } if (systemPropDef.getSystemValuePolicy().equals(SystemValuePolicy.IF_BLANK_ONLY)) { Object systemValue = SystemValuesManager.getInstance().getSystemValue(systemValueDescriptor); if (systemValue != null) { result.put(systemPropDef.getName(), systemValue); } } } return result; }