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
PreAuthorizationPlugin
CreateRequest
for use cases that occur prior to security rules.processPreCreate
in interface PreAuthorizationPlugin
input
- the CreateRequest
to processCreateRequest
to pass to the next PreAuthorizationPlugin
StopProcessingException
- 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
PreAuthorizationPlugin
UpdateRequest
for use cases that occur prior to security rules.processPreUpdate
in interface PreAuthorizationPlugin
input
- the UpdateRequest
to processexistingMetacards
- the Map of Metacard
s that currently existUpdateRequest
to pass to the next PreAuthorizationPlugin
StopProcessingException
- 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
PreAuthorizationPlugin
DeleteRequest
for use cases that occur prior to security rules.processPreDelete
in interface PreAuthorizationPlugin
input
- the DeleteRequest
to processDeleteRequest
to pass to the next PreAuthorizationPlugin
StopProcessingException
- 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
PreAuthorizationPlugin
DeleteResponse
for use cases that occur prior to security rules.processPostDelete
in interface PreAuthorizationPlugin
input
- the DeleteResponse
to processDeleteResponse
to pass to the next PreAuthorizationPlugin
StopProcessingException
- 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
PreAuthorizationPlugin
QueryRequest
for use cases that occur prior to security rules.processPreQuery
in interface PreAuthorizationPlugin
input
- the QueryRequest
to processQueryRequest
to pass to the next PreAuthorizationPlugin
StopProcessingException
- 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
PreAuthorizationPlugin
QueryResponse
for use cases that occur prior to security rules.processPostQuery
in interface PreAuthorizationPlugin
input
- the QueryResponse
to processQueryResponse
to pass to the next PreAuthorizationPlugin
StopProcessingException
- 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
PreAuthorizationPlugin
ResourceRequest
for use cases that occur prior to security rules.processPreResource
in interface PreAuthorizationPlugin
input
- the ResourceRequest
to processQueryRequest
to pass to the next PreAuthorizationPlugin
StopProcessingException
- 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
PreAuthorizationPlugin
ResourceResponse
for use cases that occur prior to security rules.processPostResource
in interface PreAuthorizationPlugin
input
- the ResourceResponse
to processResourceResponse
to pass to the next PreAuthorizationPlugin
StopProcessingException
- 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.