Examples of AlertService


Examples of com.sun.enterprise.config.serverbeans.AlertService

    public void configure( ) {
        Logger logger = LogDomains.getAlertLogger( );
        if( logger.isLoggable( Level.FINE ) ) {
            logger.log( Level.FINE, "AlertConfigurator.configure called.." );
        }
        AlertService alertService = getAlertService( );
        if( alertService != null ) {
            int count = alertService.sizeAlertSubscription( );
            if( count == 0 ) return;

            List alertSubscriptionList = new ArrayList( );
            for( int i = 0; i < count; i++ ) {
                AlertSubscription subscription =
                    alertService.getAlertSubscription( i );
                NotificationListener listener = configureNotificationListener(
                    subscription.getListenerConfig( ) );
                NotificationFilter filter = configureNotificationFilter(
                    subscription.getFilterConfig( ) );
                alertSubscriptionList.add( new AlertSubscriptionInfo(
View Full Code Here

Examples of org.criticalfailure.torchlight.core.application.services.AlertService

    }
        catch (DataAccessException e) {
          // log it
          logger.error("Unable to save campaign: " + c + ": " + e.getLocalizedMessage(), e);
         
          AlertService alertService = (AlertService)ServiceUtils.getService(bundleContext, AlertService.class.getName());
          logger.trace("alertService: " + alertService);
         
          alertService.addAlert(new Alert(Alert.Type.ERROR, "campaign.editor", Messages.getString("campaign.editor.save.error.message") + ": " + e.getLocalizedMessage()));
         
          // notify user
          MessageDialog.openError(getEditorSite().getShell(), Messages.getString("campaign.editor.save.error.title"), Messages.getString("campaign.editor.save.error.message") + ": " + e.getLocalizedMessage());
    }
View Full Code Here

Examples of org.criticalfailure.torchlight.core.application.services.AlertService

            }
            catch(DataAccessException e) {
                logger.error("Exception while getting versions: " + e.getLocalizedMessage(), e);

                // add error to Alerts
                AlertService alertService = (AlertService)ServiceUtils.getService(bundleContext, AlertService.class.getName());
                alertService.addAlert(new Alert(Alert.Type.ERROR, "campaign.editor", e.getLocalizedMessage()));
            }
            version.addSelectionListener(new SelectionListener() {
                public void widgetDefaultSelected(SelectionEvent e) {
                    widgetSelected(e);
                }

                public void widgetSelected(SelectionEvent e) {
                    logger.debug("setting campaign edition; index = " + version.getSelectionIndex());
                    Version v = (Version)version.getData("version" + version.getSelectionIndex());
                    logger.trace("v: " + v);
                   
                    if(v != null) {
                      campaign.setVersion(v);

                      logger.debug("setting editor as dirty");
                      dirty = true;
                    }
                }
            });

            // setting (line 2, half-width)
            logger.debug("creating setting chooser");
            label = new Label(generalGroup, SWT.RIGHT);
            label.setText(Messages.getString("campaign.editor.setting.label"));
            label.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));

            setting = new Combo(generalGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
            setting.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
            SettingDao settingDao = (SettingDao)ServiceUtils.getService(bundleContext, SettingDao.class.getName());
            try {
              int i = 0;
             
                for(Setting s : settingDao.getSettings()) {
                    setting.add(s.getLabel());
                    setting.setData(s.getLabel(), s);
                    setting.setData("setting" + i, s);
                   
                    if(campaign.getSetting() == s) {
                      setting.select(i);
                    }
                   
                    i++;
                }
            }
            catch(DataAccessException e) {
                logger.error("Exception while getting settings: " + e.getLocalizedMessage(), e);

                // add error to Alerts
                AlertService alertService = (AlertService)ServiceUtils.getService(bundleContext, AlertService.class.getName());
                alertService.addAlert(new Alert(Alert.Type.ERROR, "campaign.editor", e.getLocalizedMessage()));
            }
            setting.addSelectionListener(new SelectionListener() {
                public void widgetDefaultSelected(SelectionEvent e) {
                    widgetSelected(e);
                }
View Full Code Here

Examples of org.jmanage.core.services.AlertService

        /* applications */
        List applications = ApplicationConfigManager.getApplications();
        request.setAttribute(RequestAttributes.APPLICATIONS, applications);

        /* alerts */
        AlertService alertService = ServiceFactory.getAlertService();
        List alerts = alertService.getConsoleAlerts(context.getServiceContext());
        request.setAttribute("alerts", alerts);

        return mapping.findForward(Forwards.SUCCESS);
    }
View Full Code Here

Examples of org.jmanage.core.services.AlertService

                                 ActionForm actionForm,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
        throws Exception{

        AlertService alertService = ServiceFactory.getAlertService();
        alertService.removeConsoleAlert(context.getServiceContext(),
                request.getParameter("alertId"));
        return mapping.findForward("success");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.