private static List<Object> getInnerList(PropertyList propertyList, PropertyDefinitionList definition, boolean strict) { List<Object> result = new ArrayList<Object>(propertyList.getList().size()); if (definition==null) { if (strict) { throw new IllegalArgumentException("No Definition exists for " + propertyList.getName()); } } PropertyDefinition memberDefinition = null; if (definition != null) { memberDefinition = definition.getMemberDefinition(); } for (Property property : propertyList.getList()) { Object target = convertProperty(property,memberDefinition, strict); result.add(target); } return result; }
/** * Adds a child property to the end of this list. This method also sets the * {@link Property#setParentList(PropertyList) parent list} for the child property to make persistence work. * * @param property the property to add to this list */ public void add(@NotNull Property property) { if (this.memberPropertyName == null) { this.memberPropertyName = property.getName(); } if (!property.getName().equals(this.memberPropertyName)) { throw new IllegalStateException("All properties in a PropertyList (id=[" + getId() + "], name=[" + getName() + "]) must have the same name: [" + property.getName() + "] != [" + this.memberPropertyName + "]"); } getList().add(property); property.setParentList(this); }
List<Property> embeddedProps = property.getList(); String propertyName = property.getName();
public void print(PropertyList p, int depth) { out.println(indent(depth) + p.getName() + " [" + p.getList().size() + "] {"); if (p.getList().size() > 0 && p.getList().get(0) instanceof PropertyMap) { consistentMaps(p.getList()); } else { for (Property entry : p.getList()) { if (entry instanceof PropertySimple) { print((PropertySimple) entry, depth + 1); } else if (entry instanceof PropertyMap) { print((PropertyMap) entry, depth + 1); } } } out.println(indent(depth) + "}"); }
PropertyList unmaskedPropertyList = unmaskedParentPropertyMap.getList(propertyList.getName()); if (unmaskedPropertyList != null) { List<Property> unmaskedMemberProperties = unmaskedPropertyList.getList();
/** * Return a value object for the passed property, which is part of a list. The type is determined by * looking at the operation definition and PropertyList#getMemberDefinition * @param prop Property to evaluate * @param propertyList Outer list * @param operationName Name of the operation * @return Value or null on failure */ Object getObjectForPropertyList(PropertySimple prop, PropertyList propertyList, String operationName) { ConfigurationDefinition parameterDefinitions = getParameterDefinitionsForOperation(operationName); if (parameterDefinitions == null) return null; PropertyDefinition def = parameterDefinitions.get(propertyList.getName()); if (def instanceof PropertyDefinitionList) { PropertyDefinitionList definitionList = (PropertyDefinitionList) def; PropertyDefinition tmp = definitionList.getMemberDefinition(); if (tmp instanceof PropertyDefinitionSimple) { return getObjectForProperty(prop, (PropertyDefinitionSimple) tmp); } } return null; }
operation.addAdditionalProperty(pl.getName(), items); } else { LOG.error("PropertyMap for " + prop.getName() + " not yet supported");
PropertyList propertyList = (PropertyList) prop; PropertyDefinitionList propertyDefinition = this.configurationDefinition .getPropertyDefinitionList(propertyList.getName());
addDebug(parent, true, ".addListMemberMapProperty()"); Property listMemberProperty = listProperty.getList().get(index); String listName = listProperty.getName(); if (!(listMemberProperty instanceof PropertyMap)) { throw new IllegalStateException("Property '" + listName
addNewLink.setActionExpression(actionExpression); FacesComponentUtility.addParameter(addNewLink, this.config, RequestParameterNameConstants.LIST_NAME_PARAM, listProperty.getName()); FacesComponentUtility.addParameter(addNewLink, this.config, RequestParameterNameConstants.LIST_INDEX_PARAM, String.valueOf(listProperty.getList().size()));