Event
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.atlassian.johnson.event.Event(Showing top 15 results out of 315)

origin: com.atlassian.jira/jira-core

private static void addEventsForErrors(final JohnsonEventContainer cont, final UpgradeManager.Status status)
{
  if (cont != null && status != null && !status.successful())
  {
    for (final String exception : status.getErrors())
    {
      final Event errorEvent = new Event(EventType.get("upgrade"), "An error occurred performing JIRA upgrade", exception,
          EventLevel.get(EventLevel.ERROR));
      cont.addEvent(errorEvent);
    }
  }
}
origin: com.atlassian.jira/jira-api

  public void updateProgress(final int progress)
  {
    event.setProgress(progress);
  }
}
origin: com.atlassian.jira/jira-core

private static boolean isLicenseEvent(Event event)
{
  return ImmutableList.of(LICENSE_TOO_OLD, CLUSTERING_UNLICENSED, SUBSCRIPTION_EXPIRED)
      .stream()
      .map(EventType::get)
      .anyMatch(key -> event.getKey().equals(key));
}
origin: com.atlassian.config/atlassian-config

private void panicAndShutdown(Throwable t, LifecycleContext context, LifecyclePluginModuleDescriptor descriptor)
{
  final String errorString = "Unable to start up Confluence. Fatal error during startup sequence: " + descriptor + " - " + t;
  log.error(errorString, t);
  context.getAgentJohnson().addEvent(new Event(EventType.get("startup"), errorString, EventLevel.FATAL));
  shutDown(context.getServletContext(), descriptor.getCompleteKey());
}
origin: com.atlassian.jira/jira-core

private void doStepTask(final StepSwitcher<Step> switcher, final InstantSetupStrategy.Step step, final StepTask stepTask)
    throws Exception
{
  switcher.withStep(step, stepTask);
  final SetupJohnsonUtil johnsonUtil = ComponentAccessor.getComponent(SetupJohnsonUtil.class);
  final Collection johnsonEvents = johnsonUtil.getEvents();
  if (johnsonEvents.size() > 0)
  {
    throw new RuntimeException(((Event) johnsonEvents.iterator().next()).getDesc());
  }
}
origin: com.atlassian.johnson/atlassian-johnson

public Event(EventType key, String desc)
{
  this.key = key;
  this.desc = desc;
  this.date = getFormattedDate();
  this.attributes = new HashMap();
}
origin: com.atlassian.jira/jira-tests

@Override
protected boolean matchesSafely(Event item, Description mismatchDescription)
{
  return level.equals(item.getLevel().getLevel());
}
origin: com.atlassian.johnson/atlassian-johnson-core

protected String getStringForEvents(Collection<Event> events) {
  StringBuilder message = new StringBuilder();
  for (Event event : events) {
    if (message.length() > 0) {
      message.append("\n");
    }
    message.append(event.getDesc());
  }
  return message.toString();
}
origin: com.atlassian.jira/jira-tests

@Override
protected boolean matchesSafely(Event item, Description mismatchDescription)
{
  return key.equals(item.getKey().getType());
}
origin: com.atlassian.jira/jira-core

private static String constructErrorMessage(final JohnsonEventContainer cont)
{
  final StringBuilder errMsg = new StringBuilder(NO_UPGRADE_MESSAGE).append(" ");
  // use the Johnson event itself as the log message
  for (final Object element : cont.getEvents())
  {
    final Event errEvent = (Event) element;
    errMsg.append(errEvent.getDesc()).append(LS);
  }
  return errMsg.toString();
}
origin: com.atlassian.johnson/atlassian-johnson-core

public Event(EventType key, String desc, String exception, EventLevel level) {
  this.desc = desc;
  this.exception = exception;
  this.key = key;
  this.level = level;
  attributes = new HashMap<>();
  date = getFormattedDate();
  progress = -1;
}
origin: com.atlassian.jira/jira-core

  @Override
  public void makeProgress(long taskProgress, String currentSubTask, String message)
  {
    event.setProgress((int) taskProgress);
  }
}
origin: com.atlassian.johnson/atlassian-johnson

public Event(EventType key, String desc, String exception, EventLevel level)
{
  this.key = key;
  this.desc = desc;
  this.exception = exception;
  this.level = level;
  this.date = getFormattedDate();
  this.attributes = new HashMap();
}
origin: com.atlassian.johnson/atlassian-johnson

public Event(EventType key, String desc, String exception)
{
  this.key = key;
  this.desc = desc;
  this.exception = exception;
  this.date = getFormattedDate();
  this.attributes = new HashMap();
}
origin: com.atlassian.johnson/atlassian-johnson

public Event(EventType key, String desc, EventLevel level)
{
  this.key = key;
  this.desc = desc;
  this.level = level;
  this.date = getFormattedDate();
  this.attributes = new HashMap();
}
com.atlassian.johnson.eventEvent

Javadoc

This class represents an ApplicationEvent

Most used methods

  • getDesc
  • getLevel
  • getKey
  • <init>
  • getException
  • getFormattedDate
  • setProgress
  • addAttribute
  • getAttribute
  • getDate
  • toString
  • toString

Popular classes and methods

  • setScale (BigDecimal)
    Returns a new BigDecimal instance with the specified scale. If the new scale is greater than the old
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables us
  • TreeMap (java.util)
    A map whose entries are sorted by their keys. All optional operations such as #put and #remove are s
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on *
  • JList (javax.swing)

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)