public class MetacardIngestNetworkPlugin extends Object implements PreAuthorizationPlugin
The list of new attributes are parsed into a map whose key is the attribute name and attribute descriptor name, and value is the desired value of that attribute by the admin. If the value in the client-info map (populated by) at key "criteria key" is equal to the "expected value", then the plugin will attempt to add the list of new attributes to the metacards in the given request.
Any attribute already set on the metacards cannot be changed. Currently there is no support for appending new values within a multi-valued attribute onto an already existing one. As long as an attribute is not null, it cannot be overwritten.
See MetacardCondition for details on its immutability and volatility.
| Constructor and Description |
|---|
MetacardIngestNetworkPlugin(KeyValueParser keyValueParser,
MetacardServices metacardServices,
AttributeFactory attributeFactory,
MetacardCondition metacardCondition)
Constructor requires all dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Method required by the component-managed strategy.
|
String |
getCriteriaKey() |
String |
getExpectedValue() |
List<String> |
getNewAttributes() |
void |
init()
Method required by the component-managed strategy.
|
DeleteResponse |
processPostDelete(DeleteResponse input)
Process a
DeleteResponse for use cases that occur prior to security rules. |
QueryResponse |
processPostQuery(QueryResponse input)
Process a
QueryResponse for use cases that occur prior to security rules. |
ResourceResponse |
processPostResource(ResourceResponse input,
Metacard metacard)
Process a
ResourceResponse for use cases that occur prior to security rules. |
CreateRequest |
processPreCreate(CreateRequest input)
Process a
CreateRequest for use cases that occur prior to security rules. |
DeleteRequest |
processPreDelete(DeleteRequest input)
Process a
DeleteRequest for use cases that occur prior to security rules. |
QueryRequest |
processPreQuery(QueryRequest input)
Process a
QueryRequest for use cases that occur prior to security rules. |
ResourceRequest |
processPreResource(ResourceRequest input)
Process a
ResourceRequest for use cases that occur prior to security rules. |
UpdateRequest |
processPreUpdate(UpdateRequest input,
Map<String,Metacard> existingMetacards)
Process an
UpdateRequest for use cases that occur prior to security rules. |
void |
setCriteriaKey(String criteriaKey) |
void |
setExpectedValue(String expectedValue) |
void |
setNewAttributes(List<String> newAttributes) |
void |
updateCondition(Map<String,Object> properties)
Atomically update the condition so that ingest rules are not evaluated based on an invalid
rule.
|
public MetacardIngestNetworkPlugin(KeyValueParser keyValueParser, MetacardServices metacardServices, AttributeFactory attributeFactory, MetacardCondition metacardCondition)
public String getCriteriaKey()
public String getExpectedValue()
public void setCriteriaKey(String criteriaKey)
public void setExpectedValue(String expectedValue)
public void init()
public void destroy()
public void updateCondition(Map<String,Object> properties)
public CreateRequest processPreCreate(CreateRequest input) throws StopProcessingException
PreAuthorizationPluginCreateRequest for use cases that occur prior to security rules.processPreCreate in interface PreAuthorizationPlugininput - the CreateRequest to processCreateRequest to pass to the next PreAuthorizationPluginStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public UpdateRequest processPreUpdate(UpdateRequest input, Map<String,Metacard> existingMetacards) throws StopProcessingException
PreAuthorizationPluginUpdateRequest for use cases that occur prior to security rules.processPreUpdate in interface PreAuthorizationPlugininput - the UpdateRequest to processexistingMetacards - the Map of Metacards that currently existUpdateRequest to pass to the next PreAuthorizationPluginStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public DeleteRequest processPreDelete(DeleteRequest input) throws StopProcessingException
PreAuthorizationPluginDeleteRequest for use cases that occur prior to security rules.processPreDelete in interface PreAuthorizationPlugininput - the DeleteRequest to processDeleteRequest to pass to the next PreAuthorizationPluginStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public DeleteResponse processPostDelete(DeleteResponse input) throws StopProcessingException
PreAuthorizationPluginDeleteResponse for use cases that occur prior to security rules.processPostDelete in interface PreAuthorizationPlugininput - the DeleteResponse to processDeleteResponse to pass to the next PreAuthorizationPluginStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public QueryRequest processPreQuery(QueryRequest input) throws StopProcessingException
PreAuthorizationPluginQueryRequest for use cases that occur prior to security rules.processPreQuery in interface PreAuthorizationPlugininput - the QueryRequest to processQueryRequest to pass to the next PreAuthorizationPluginStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public QueryResponse processPostQuery(QueryResponse input) throws StopProcessingException
PreAuthorizationPluginQueryResponse for use cases that occur prior to security rules.processPostQuery in interface PreAuthorizationPlugininput - the QueryResponse to processQueryResponse to pass to the next PreAuthorizationPluginStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public ResourceRequest processPreResource(ResourceRequest input) throws StopProcessingException
PreAuthorizationPluginResourceRequest for use cases that occur prior to security rules.processPreResource in interface PreAuthorizationPlugininput - the ResourceRequest to processQueryRequest to pass to the next PreAuthorizationPluginStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public ResourceResponse processPostResource(ResourceResponse input, Metacard metacard) throws StopProcessingException
PreAuthorizationPluginResourceResponse for use cases that occur prior to security rules.processPostResource in interface PreAuthorizationPlugininput - the ResourceResponse to processResourceResponse to pass to the next PreAuthorizationPluginStopProcessingException - thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.This work is licensed under a Creative Commons Attribution 4.0 International License.