Constructor and Description |
---|
MetacardServices()
Initializes the services with an empty list of system
MetacardType s. |
MetacardServices(List<MetacardType> systemMetacardTypes)
Initializes the services with the provided list of
MetacardType s. |
Modifier and Type | Method and Description |
---|---|
List<Metacard> |
setAttributesIfAbsent(List<Metacard> metacards,
Map<String,String> attributeMap,
AttributeFactory attributeFactory)
|
public MetacardServices()
MetacardType
s.public MetacardServices(List<MetacardType> systemMetacardTypes)
MetacardType
s.systemMetacardTypes
- The list of metacard types to use.public List<Metacard> setAttributesIfAbsent(List<Metacard> metacards, Map<String,String> attributeMap, AttributeFactory attributeFactory)
Metacard
s created from the collection and
applies each attribute in the only if the attribute is not already set on
the Metacard
. That is, the attribute must be null
or not in the Metacard
's map. Appropriate AttributeDescriptor
s are injected into a new MetacardType
for each new Metacard
created.metacards
- The list of metacards to attempt to add the attributes to. Can be empty.attributeMap
- The map of attributes to attempt to add. Attributes already set on any
given Metacard
will not be changed. For multi-valued attributes, the value string
should separate different entities with commas.attributeFactory
- The factory to use to create attributes.This work is licensed under a Creative Commons Attribution 4.0 International License.