Tabnine Logo
IEntityConverterFields.getHistoryAction
Code IndexAdd Tabnine to your IDE (free)

How to use
getHistoryAction
method
in
uk.gov.dstl.baleen.consumers.utils.IEntityConverterFields

Best Java code snippets using uk.gov.dstl.baleen.consumers.utils.IEntityConverterFields.getHistoryAction (Showing top 2 results out of 315)

origin: dstl/baleen

private Map<String, Object> createEventMap(HistoryEvent historyEvent) {
 Map<String, Object> linkedHistoryMap = new IgnoreEmptyKeyMapDecorator<>(new LinkedHashMap<>());
 if (historyEvent.getRecordable().getInternalId() != entityInternalId) {
  // Only save the internal id as a reference to entities which aren't this one.
  linkedHistoryMap.put(
    fields.getHistoryRecordable(), historyEvent.getRecordable().getInternalId());
 }
 linkedHistoryMap.put(fields.getHistoryAction(), historyEvent.getAction());
 linkedHistoryMap.put(fields.getHistoryType(), historyEvent.getEventType());
 linkedHistoryMap.put(fields.getHistoryParameters(), historyEvent.getParameters());
 linkedHistoryMap.put(fields.getHistoryReferrer(), historyEvent.getReferrer());
 linkedHistoryMap.put(fields.getHistoryTimestamp(), historyEvent.getTimestamp());
 return linkedHistoryMap;
}
origin: dstl/baleen

@Test
public void testHistoryEventIsConvertedToMap() {
 Map<String, Object> nonMergedHistoryMap = (Map<String, Object>) historyList.get(0);
 Map<String, String> nonMergedHistoryParameters =
   (Map<String, String>) nonMergedHistoryMap.get(fields.getHistoryParameters());
 assertEquals(
   "Linked history map should have an action",
   ACTION,
   nonMergedHistoryMap.get(fields.getHistoryAction()));
 assertEquals(
   "Linked history map should have an event type",
   EVENT_TYPE,
   nonMergedHistoryMap.get(fields.getHistoryType()));
 assertEquals(
   "History parameters should have kwy1-value1",
   "value1",
   nonMergedHistoryParameters.get("key1"));
 assertEquals(
   "Linked history map should have referrer",
   REFERRER,
   nonMergedHistoryMap.get(fields.getHistoryReferrer()));
 assertEquals(
   "Linked history map should have timestamp",
   currentTimeMillis,
   nonMergedHistoryMap.get(fields.getHistoryTimestamp()));
}
uk.gov.dstl.baleen.consumers.utilsIEntityConverterFieldsgetHistoryAction

Popular methods of IEntityConverterFields

  • getExternalId
  • getHistory
  • getHistoryParameters
  • getHistoryReferrer
  • getHistoryTimestamp
  • getHistoryType
  • getType
  • getGeoJSON
  • getHistoryRecordable

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now