@Transactional
 void update() {
   LOGGER.log(LogService.LOG_DEBUG, "TRACE: DairyProfileSaveAction::update");
   try {
     condenseContacts();
     validateProfile();
     dairyRepository.save();
     updateBindings();
   } catch (final Exception e) {
     LOGGER.log(LogService.LOG_WARNING, "exception updating dairy profile", e);
   }
 }
예제 #2
0
 private IStatuslineUIProcessRidget getStatuslineUIProcessRidget() {
   final IApplicationNode appNode = ApplicationNodeManager.getApplicationNode();
   if (appNode != null) {
     final INavigationNodeController navigationNodeController =
         appNode.getNavigationNodeController();
     if (navigationNodeController != null
         && navigationNodeController instanceof ApplicationController) {
       return ((ApplicationController) navigationNodeController)
           .getStatusline()
           .getStatuslineUIProcessRidget();
     } else {
       LOGGER.log(
           LogService.LOG_ERROR, "Unexpected: navigation node controller == null"); // $NON-NLS-1$
     }
   } else {
     LOGGER.log(LogService.LOG_ERROR, "Unexpected: appNode == null"); // $NON-NLS-1$
   }
   return null;
 }
예제 #3
0
  /**
   * Returns the marker support that will be used according to the Look&Feel setting ({@code
   * LnfKeyConstants.MARKER_SUPPORT_ID}) and for the given Ridget class.
   *
   * @param ridgetClass class of the Ridget
   * @return marker support or {@code null} if no appropriate marker support was found
   * @since 2.0
   */
  public AbstractMarkerSupport getMarkerSupport(final Class<? extends IRidget> ridgetClass) {
    final String markerSupportID = getStringSetting(LnfKeyConstants.MARKER_SUPPORT_ID);

    for (final ILnfMarkerSupportExtension lnfMarkerSupportExtension : markerSupportList) {
      if (StringUtils.isEmpty(lnfMarkerSupportExtension.getId())) {
        continue;
      }
      if (lnfMarkerSupportExtension.getId().equals(markerSupportID)) {
        return lnfMarkerSupportExtension.createMarkerSupport();
      }
    }

    // only log this when running in an bundle environment
    if (Platform.getBundle("org.eclipse.swt") != null) { // $NON-NLS-1$
      LOGGER.log(
          LogService.LOG_INFO,
          "No MarkerSupport with the ID \""
              + markerSupportID
              + "\" exists."); //$NON-NLS-1$ //$NON-NLS-2$
    }

    return null;
  }
예제 #4
0
 /** {@inheritDoc} */
 public Attachment sendAndReturnAttachment(final Attachment attachment) {
   LOGGER.log(LogService.LOG_DEBUG, readAttachmentStart(attachment));
   return attachment;
 }