congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IEntityConverterFields.getHistoryParameters
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using uk.gov.dstl.baleen.consumers.utils.IEntityConverterFields.getHistoryParameters (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.utilsIEntityConverterFieldsgetHistoryParameters

Popular methods of IEntityConverterFields

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

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top Sublime Text plugins
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