Class MetacardIngestNetworkPlugin

java.lang.Object
org.codice.ddf.catalog.plugin.metacard.MetacardIngestNetworkPlugin
All Implemented Interfaces:
ddf.catalog.plugin.PreAuthorizationPlugin

public class MetacardIngestNetworkPlugin extends Object implements ddf.catalog.plugin.PreAuthorizationPlugin
Conditional attribute adjustments for metacards based on IP, hostname, scheme, and context path.

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 Details

  • Method Details

    • getCriteriaKey

      public String getCriteriaKey()
    • getExpectedValue

      public String getExpectedValue()
    • getNewAttributes

      public List<String> getNewAttributes()
    • setCriteriaKey

      public void setCriteriaKey(String criteriaKey)
    • setExpectedValue

      public void setExpectedValue(String expectedValue)
    • setNewAttributes

      public void setNewAttributes(List<String> newAttributes)
    • init

      public void init()
      Method required by the component-managed strategy. Performs set-up based on initial values passed to the service.
    • destroy

      public void destroy()
      Method required by the component-managed strategy.
    • updateCondition

      public void updateCondition(Map<String,Object> properties)
      Atomically update the condition so that ingest rules are not evaluated based on an invalid rule.
    • processPreCreate

      public ddf.catalog.operation.CreateRequest processPreCreate(ddf.catalog.operation.CreateRequest input) throws ddf.catalog.plugin.StopProcessingException
      Specified by:
      processPreCreate in interface ddf.catalog.plugin.PreAuthorizationPlugin
      Throws:
      ddf.catalog.plugin.StopProcessingException
    • processPreUpdate

      public ddf.catalog.operation.UpdateRequest processPreUpdate(ddf.catalog.operation.UpdateRequest input, Map<String,ddf.catalog.data.Metacard> existingMetacards) throws ddf.catalog.plugin.StopProcessingException
      Specified by:
      processPreUpdate in interface ddf.catalog.plugin.PreAuthorizationPlugin
      Throws:
      ddf.catalog.plugin.StopProcessingException
    • processPreDelete

      public ddf.catalog.operation.DeleteRequest processPreDelete(ddf.catalog.operation.DeleteRequest input) throws ddf.catalog.plugin.StopProcessingException
      Specified by:
      processPreDelete in interface ddf.catalog.plugin.PreAuthorizationPlugin
      Throws:
      ddf.catalog.plugin.StopProcessingException
    • processPostDelete

      public ddf.catalog.operation.DeleteResponse processPostDelete(ddf.catalog.operation.DeleteResponse input) throws ddf.catalog.plugin.StopProcessingException
      Specified by:
      processPostDelete in interface ddf.catalog.plugin.PreAuthorizationPlugin
      Throws:
      ddf.catalog.plugin.StopProcessingException
    • processPreQuery

      public ddf.catalog.operation.QueryRequest processPreQuery(ddf.catalog.operation.QueryRequest input) throws ddf.catalog.plugin.StopProcessingException
      Specified by:
      processPreQuery in interface ddf.catalog.plugin.PreAuthorizationPlugin
      Throws:
      ddf.catalog.plugin.StopProcessingException
    • processPostQuery

      public ddf.catalog.operation.QueryResponse processPostQuery(ddf.catalog.operation.QueryResponse input) throws ddf.catalog.plugin.StopProcessingException
      Specified by:
      processPostQuery in interface ddf.catalog.plugin.PreAuthorizationPlugin
      Throws:
      ddf.catalog.plugin.StopProcessingException
    • processPreResource

      public ddf.catalog.operation.ResourceRequest processPreResource(ddf.catalog.operation.ResourceRequest input) throws ddf.catalog.plugin.StopProcessingException
      Specified by:
      processPreResource in interface ddf.catalog.plugin.PreAuthorizationPlugin
      Throws:
      ddf.catalog.plugin.StopProcessingException
    • processPostResource

      public ddf.catalog.operation.ResourceResponse processPostResource(ddf.catalog.operation.ResourceResponse input, ddf.catalog.data.Metacard metacard) throws ddf.catalog.plugin.StopProcessingException
      Specified by:
      processPostResource in interface ddf.catalog.plugin.PreAuthorizationPlugin
      Throws:
      ddf.catalog.plugin.StopProcessingException