Codota Logo
Tapahtuma.setTarget
Code IndexAdd Codota to your IDE (free)

How to use
setTarget
method
in
fi.vm.sade.log.model.Tapahtuma

Best Java code snippets using fi.vm.sade.log.model.Tapahtuma.setTarget (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

/**
 * Create a READ auditlog event.
 *
 * @param system ex. "tarjonta-service"
 * @param user user oid
 * @param targetType "Henkilö", "Haku" / "Organisaatio" / "Komo", "Komoto", ...
 * @param target "1.2.3.4.5" oid
 * @return created event
 */
public static Tapahtuma createREAD(String system, String user, String targetType, String target) {
  Tapahtuma t = createEmpty();
  t.setType("READ");
  t.setSystem(system);
  t.setUser(user);
  t.setTargetType(targetType);
  t.setTarget(target);
  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.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

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.modelTapahtumasetTarget

Popular methods of Tapahtuma

  • <init>
  • addValueChange
    Use this method to record value changes for fields in "target" objects.
  • 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

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • String (java.lang)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ImageIO (javax.imageio)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
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