public class UpdateRequestImpl extends OperationImpl implements UpdateRequest
UpdateRequest
.Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected List<Map.Entry<Serializable,Metacard>> |
updates |
UPDATE_BY_ID, UPDATE_BY_PRODUCT_URI
Constructor and Description |
---|
UpdateRequestImpl(List<Map.Entry<Serializable,Metacard>> updateList,
String attributeName,
Map<String,Serializable> properties)
Instantiates a new UpdateRequestImpl.
|
UpdateRequestImpl(List<Map.Entry<Serializable,Metacard>> updateList,
String attributeName,
Map<String,Serializable> properties,
Set<String> destinations)
Instantiates a new UpdateRequestImpl.
|
UpdateRequestImpl(String[] ids,
List<Metacard> metacards)
Instantiates a new UpdateRequestImpl from an array of ids and a list of
Metacard |
UpdateRequestImpl(String id,
Metacard metacard)
Instantiates a new UpdateRequestImpl from an id and metacard
|
UpdateRequestImpl(URI[] uris,
List<Metacard> metacards)
|
Modifier and Type | Method and Description |
---|---|
String |
getAttributeName()
The attribute name tells the
CatalogProvider what type of attribute
values are the Map.Entry keys in the update list. |
Set<String> |
getStoreIds()
Returns a set of ids that correspond to catalog destinations
|
List<Map.Entry<Serializable,Metacard>> |
getUpdates()
Get the updates to be made.
|
containsPropertyName, getProperties, getPropertyNames, getPropertyValue, hasProperties, setProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
containsPropertyName, getProperties, getPropertyNames, getPropertyValue, hasProperties
protected String name
protected List<Map.Entry<Serializable,Metacard>> updates
public UpdateRequestImpl(List<Map.Entry<Serializable,Metacard>> updateList, String attributeName, Map<String,Serializable> properties, Set<String> destinations)
updateList
- the list of updated Metacard
attributeName
- the attribute name (e.g. Metacard.ID, Metacard.PRODUCT_URI)properties
- the properties associated with the operationdestinations
- the destination ids this request should be sent topublic UpdateRequestImpl(List<Map.Entry<Serializable,Metacard>> updateList, String attributeName, Map<String,Serializable> properties)
updateList
- - the list of updated Metacard
attributeName
- the attribute name (e.g. Metacard.ID, Metacard.PRODUCT_URI)properties
- the properties associated with the operationpublic UpdateRequestImpl(String id, Metacard metacard)
public UpdateRequestImpl(String[] ids, List<Metacard> metacards) throws IllegalArgumentException
Metacard
ids
- - the ids associated with the Metacard
listmetacards
- the updated Metacard
valuesIllegalArgumentException
- if the ids array size and list of Metacard
size does
not matchpublic UpdateRequestImpl(URI[] uris, List<Metacard> metacards) throws IllegalArgumentException
uris
- - the uris associated with the Metacard
listmetacards
- the updated Metacard
valuesIllegalArgumentException
- if the uris array size and list of Metacard
size does
not matchpublic Set<String> getStoreIds()
Request
getStoreIds
in interface Request
public String getAttributeName()
UpdateRequest
CatalogProvider
what type of attribute
values are the Map.Entry
keys in the update list. For instance, if the attribute name was
"id," then the CatalogProvider
would know that the Map.Entry
keys in the update list ( List<Entry<Serializable, Metacard>>
) were id values (such as
575aa9625fa24b338bd3c439f2613709
) and could create the appropriate backend search.getAttributeName
in interface UpdateRequest
Attribute
that has an ddf.catalog.data.AttributeType.AttributeFormat of
AttributeType.AttributeFormat.STRING
public List<Map.Entry<Serializable,Metacard>> getUpdates()
UpdateRequest
Metacard
s that have an Attribute.getName()
that matches the name returned by UpdateRequest.getAttributeName()
and a Attribute.getValue()
that matches the
Serializable
value in an Map.Entry
of this List
will be updated with the
value of the associated Metacard
in the List
. An entry's key in the List
must match zero metacards or one metacard in the Source.getUpdates
in interface UpdateRequest
Attribute
values and associated new Metacard
s to update if a match is found.This work is licensed under a Creative Commons Attribution 4.0 International License.