@Override public Map<String, String> getAttributes() { if (attributeBos == null) { return Collections.emptyMap(); } HashMap<String, String> attributes = new HashMap<String, String>(attributeBos.size()); for (NaturalLanguageTemplateAttributeBo attr : attributeBos) { attributes.put(attr.getAttributeDefinition().getName(), attr.getValue()); } return attributes; }
/** * Creates a builder by populating it with data from the given {@link KrmsAttributeDefinitionContract}. * * @param contract the contract from which to populate this builder * @return an instance of the builder populated with data from the contract * @throws IllegalArgumentException if the contract is null or blank */ public static Builder create(KrmsAttributeDefinitionContract contract) { if (contract == null) { throw new IllegalArgumentException("contract is null"); } Builder builder = new Builder(contract.getId(), contract.getName(), contract.getNamespace()); builder.setActive(contract.isActive()); builder.setLabel(contract.getLabel()); builder.setDescription(contract.getDescription()); builder.setComponentName(contract.getComponentName()); builder.setVersionNumber(contract.getVersionNumber()); return builder; }
@Override public Map<String, String> getAttributes() { HashMap<String, String> attributes = new HashMap<String, String>(); if (attributeBos != null) { for (AgendaAttributeBo attr : attributeBos) { attributes.put(attr.getAttributeDefinition().getName(), attr.getValue()); } } return attributes; }
@Override public Map<String, String> getAttributes() { Map<String, String> attributes = new HashMap<String, String>(); if (attributeBos != null) { for (ContextAttributeBo attr : attributeBos) { ((HashMap<String, String>) attributes).put(attr.getAttributeDefinition().getName(), attr.getValue()); } } return attributes; }
public Map<String, String> getAttributes() { HashMap<String, String> attributes = new HashMap<String, String>(); if (attributeBos != null) for (TermResolverAttributeBo attr : attributeBos) { attributes.put(attr.getAttributeDefinition().getName(), attr.getValue()); } return attributes; }