public boolean isModuleLevelProperty() { return InheritanceLevel.MODULE.equals(inheritanceLevel); }
public boolean isFolderLevelProperty() { return InheritanceLevel.FOLDER.equals(inheritanceLevel); }
public boolean isProjectLevelProperty() { return InheritanceLevel.PROJECT.equals(inheritanceLevel); }
public boolean isModuleLevelProperty() { return InheritanceLevel.MODULE.equals(inheritanceLevel); }
public boolean isCategoryLevelProperty() { return InheritanceLevel.CATEGORY.equals(inheritanceLevel); }
public boolean isExternalPropery() { return InheritanceLevel.EXTERNAL.equals(inheritanceLevel); }
public boolean isFolderLevelProperty() { return InheritanceLevel.FOLDER.equals(inheritanceLevel); }
public boolean isProjectLevelProperty() { return InheritanceLevel.PROJECT.equals(inheritanceLevel); }
public boolean isExternalPropery() { return InheritanceLevel.EXTERNAL.equals(inheritanceLevel); }
public boolean isCategoryLevelProperty() { return InheritanceLevel.CATEGORY.equals(inheritanceLevel); }
public void initPropertyGroups(IOpenLTable table, ITableProperties props) { groups = new LinkedHashMap<String, List<TableProperty>>(); TablePropertyDefinition[] propDefinitions = TablePropertyDefinitionUtils .getDefaultDefinitionsForTable(table.getType()); for (TablePropertyDefinition propDefinition : propDefinitions) { Object value = props.getPropertyValue(propDefinition.getName()); if (value != null) { InheritanceLevel inheritanceLevel = props.getPropertyLevelDefinedOn(propDefinition.getName()); TableProperty prop = new TableProperty(propDefinition); prop.setValue(value); prop.setInheritanceLevel(inheritanceLevel); if (InheritanceLevel.MODULE.equals(inheritanceLevel) || InheritanceLevel.CATEGORY.equals(inheritanceLevel)) { prop.setInheritedTableId(getProprtiesTableId(inheritanceLevel, props)); } storeProperty(prop); } } }
public void initPropertyGroups(IOpenLTable table, ITableProperties props) { groups = new LinkedHashMap<String, List<TableProperty>>(); TablePropertyDefinition[] propDefinitions = TablePropertyDefinitionUtils .getDefaultDefinitionsForTable(table.getType()); for (TablePropertyDefinition propDefinition : propDefinitions) { Object value = props.getPropertyValue(propDefinition.getName()); if (value != null) { InheritanceLevel inheritanceLevel = props.getPropertyLevelDefinedOn(propDefinition.getName()); TableProperty prop = new TableProperty(propDefinition); prop.setValue(value); prop.setInheritanceLevel(inheritanceLevel); if (InheritanceLevel.MODULE.equals(inheritanceLevel) || InheritanceLevel.CATEGORY.equals(inheritanceLevel)) { prop.setInheritedTableId(getProprtiesTableId(inheritanceLevel, props)); } storeProperty(prop); } } }
public String setProperty() { String name = getRequestParam(Constants.REQUEST_PARAM_PROP_NAME); String value = getRequestParam(Constants.REQUEST_PARAM_PROP_VALUE); String editorId = getEditorId(); TableEditorModel editorModel = startEditing(editorId); if (editorModel != null) { editorModel.setProperty(name, value); PropertyModificationResponse response = new PropertyModificationResponse(editorModel); if (!editorModel.isBusinessView()) { response.setHtml(render(editorId)); } if (StringUtils.isBlank(value)) { ITableProperties props = editorModel.getTable().getProperties(); InheritanceLevel inheritanceLevel = props.getPropertyLevelDefinedOn(name); if (InheritanceLevel.MODULE.equals(inheritanceLevel) || InheritanceLevel.CATEGORY.equals(inheritanceLevel)) { String inheritedValue = props.getPropertyValueAsString(name); response.setInheritedValue(inheritedValue); } } return pojo2json(response); } return null; }
public String setProperty() throws Exception { String name = getRequestParam(Constants.REQUEST_PARAM_PROP_NAME); String value = getRequestParam(Constants.REQUEST_PARAM_PROP_VALUE); String editorId = getEditorId(); TableEditorModel editorModel = getEditorModel(editorId); if (editorModel != null) { editorModel.setProperty(name, value); PropertyModificationResponse response = new PropertyModificationResponse(editorModel); if (!editorModel.isBusinessView()) { response.setHtml(render(editorId)); } if (StringUtils.isBlank(value)) { ITableProperties props = editorModel.getTable().getProperties(); InheritanceLevel inheritanceLevel = props.getPropertyLevelDefinedOn(name); if (InheritanceLevel.MODULE.equals(inheritanceLevel) || InheritanceLevel.CATEGORY.equals(inheritanceLevel)) { String inheritedValue = props.getPropertyValueAsString(name); response.setInheritedValue(inheritedValue); } } return pojo2json(response); } return null; }