Codota Logo
Tapahtuma.<init>
Code IndexAdd Codota to your IDE (free)

How to use
fi.vm.sade.log.model.Tapahtuma
constructor

Best Java code snippets using fi.vm.sade.log.model.Tapahtuma.<init> (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: fi.vm.sade.log/log-client

/**
 * Get the root event. If it does not exist it will be crated AS EMPTY event.
 *
 * @return
 */
public static Tapahtuma getAuditRootTapahtuma() {
  if (s_tapahtumaHolder.get() == null) {
    s_tapahtumaHolder.set(new Tapahtuma());
  }
  return s_tapahtumaHolder.get();
}
origin: fi.vm.sade.log/log-client

private static Tapahtuma createEmpty() {
  Tapahtuma t = new Tapahtuma();
  t.setSystem(null);
  t.setTarget(null);
  t.setTargetType(null);
  t.setTimestamp(new Date());
  t.setType(null);
  t.setUser(null);
  t.setUserActsForUser(null);
  try {
    t.setHost(InetAddress.getLocalHost().getHostName());
  } catch (UnknownHostException ex) {
    // ignored
  }
  return t;
}
origin: fi.vm.sade.haku/hakemus-api

/**
 * Logs event when a form phase is successfully saved
 * as application data in data store.
 */
@AfterReturning(pointcut = "execution(* fi.vm.sade.haku.oppija.hakemus.service.ApplicationService.submitApplication(..)) && args(applicationSystemId,..)",
    returning = "application")
public void logSubmitApplication(final String applicationSystemId, final Application application) {
  try {
    Tapahtuma t = new Tapahtuma();
    t.setTarget("Haku: " + applicationSystemId
        + ", käyttäjä: " + userSession.getUser().getUserName() + ", hakemus oid: " + application.getOid());
    t.setTimestamp(new Date());
    t.setUserActsForUser("" + userSession.getUser().getUserName());
    t.setType("Hakemus lähetetty");
    t.setUser("Hakemus Service");
    Map<String, String> answers = application.getVastauksetMerged();
    for (Map.Entry<String, String> answer : answers.entrySet()) {
      t.addValueChange(answer.getKey(), null, answer.getValue());
    }
    LOGGER.debug(t.toString());
    logger.log(t);
  } catch (Exception e) {
    LOGGER.warn("Could not log submit application event");
  }
}
origin: fi.vm.sade.haku/hakemus-api

public void logUpdateApplication(final Application application, final ApplicationPhase applicationPhase) {
  try {
    MapDifference<String, String> diffAnswers = ApplicationDiffUtil.diffAnswers(application, applicationPhase);
    AnswersDifference answersDifference = new AnswersDifference(diffAnswers);
    List<Difference> differences = answersDifference.getDifferences();
    Tapahtuma tapahtuma = new Tapahtuma();
    tapahtuma.setTarget("hakemus: " + application.getOid() + ", vaihe: " + applicationPhase.getPhaseId());
    tapahtuma.setTimestamp(new Date());
    tapahtuma.setUserActsForUser(userSession.getUser().getUserName());
    tapahtuma.setType("Hakemuksen muokkaus");
    tapahtuma.setUser(userSession.getUser().getUserName());
    for (Difference difference : differences) {
      tapahtuma.addValueChange(difference.getKey(), difference.getOldValue(), difference.getNewValue());
    }
    LOGGER.debug(tapahtuma.toString());
    logger.log(tapahtuma);
  } catch (Exception e) {
    LOGGER.warn("Could not log update application event");
  }
}
fi.vm.sade.log.modelTapahtuma<init>

Popular methods of Tapahtuma

  • addValueChange
    Use this method to record value changes for fields in "target" objects.
  • setTarget
  • setTimestamp
  • setType
  • setUser
  • setUserActsForUser
  • addValue
  • createEmpty
  • createREAD
    Create a READ auditlog event.
  • createUPDATE
    After this event has been created add appropriate value changes with "addValueChange(field, old, new
  • get
  • getHost
  • get,
  • getHost,
  • getSystem,
  • getTarget,
  • getTargetType,
  • getTimestamp,
  • getType,
  • getUser,
  • getUserActsForUser

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Menu (java.awt)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Notification (javax.management)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now