Package org.criticalfailure.torchlight.core.application.entity

Examples of org.criticalfailure.torchlight.core.application.entity.Alert


            campaignMetadataManager.saveCampaignMetadata(campaign);
        }
        catch(CampaignMetadataException e) {
            logger.error("Exception caught while saving campaign metadata: " + e.getLocalizedMessage(), e);

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.manager.error.campaign_metadata_save.text")
                    + ": " + e.getLocalizedMessage()));
        }
    }
View Full Code Here


            campaignMetadataManager.removeCampaignMetadata(campaign);
        }
        catch(CampaignMetadataException e) {
            logger.error("Exception caught while removing campaign metadata: " + e.getLocalizedMessage(), e);

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.manager.error.campaign_metadata_remove.text")
                    + ": " + e.getLocalizedMessage()));
        }

    }
View Full Code Here

            }
        }
        catch(Exception e) {
            logger.error("Exception caught while handling OSGi event: " + e.getLocalizedMessage(), e);

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("campaign.manager.error.osgi_event.text")
                    + ": " + e.getLocalizedMessage()));
        }
    }
View Full Code Here

        }
        catch(Exception e) {
            logger.error("Exception while saving object template: " + e.getLocalizedMessage(), e);

            alertService
                    .addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), e.getLocalizedMessage()));
        }

        if(monitor != null) {
            monitor.done();
        }
View Full Code Here

                logger.trace("value: " + value);
            }
            catch(Exception e) {
                logger.warn("Cannot calculate SRD 3.5 ability score modifier: " + e.getLocalizedMessage());

                alertService.addAlert(new Alert(Alert.Type.WARN, getName() + ": " + inputValues.get(0), e
                        .getLocalizedMessage()));
            }
        }

        od.setValue(String.valueOf(value));
View Full Code Here

        }
        catch(Exception e) {
            logger.error("Exception while handling OSGi event: " + e.getLocalizedMessage(), e);

            alertService
                    .addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), e.getLocalizedMessage()));
        }
    }
View Full Code Here

        List<String> inputValues = gatherInputValues(op, od);

        int halfValue = 0;
        if(inputValues.isEmpty()) {
            alertService.addAlert(new Alert(Alert.Type.WARN, getName(), Messages
                    .getString("calculators.object.half.no_inputs.text")));
            return;
        }
        else {
            try {
                int value = Integer.parseInt(inputValues.get(0));

                halfValue = value / 2;
            }
            catch(Exception e) {
                logger.warn("Exception caught while calculating half value: " + inputValues.get(0) + ": "
                        + e.getLocalizedMessage());

                alertService.addAlert(new Alert(Alert.Type.WARN, getName(), Messages
                        .getString("calculators.object.half.input_error.text")));
            }
        }
        logger.trace("halfValue: " + halfValue);
View Full Code Here

                catch(Exception e) {
                    logger
                            .error("Exception caught while setting participant properties: " + e.getLocalizedMessage(),
                                    e);

                    alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), e
                            .getLocalizedMessage()));

                    return false;
                }
            }
View Full Code Here

        }
        catch(Exception e) {
            logger.error("Exception caught while handling OSGi event: " + e.getLocalizedMessage(), e);

            alertService.addAlert(new Alert(Alert.Type.ERROR, Messages.getString("encounter.tracker.error.event"), e
                    .getLocalizedMessage()));
        }
    }
View Full Code Here

            logger.trace("campaign: " + campaign);
        }
        catch(ObjectCreationException e) {
            logger.error("Unable to create campaign: " + e.getLocalizedMessage(), e);

            alertService.addAlert(new Alert(Alert.Type.INFO, this.getClass().getSimpleName(), Messages
                    .getString("campaign.generic.ui.action.campaign.create.error.factory.text")));

            return;
        }

        try {
            // create a dialog to get information from the user
            ICampaignBuilderDialog dialog = (ICampaignBuilderDialog)appContext.getBean("genericCampaignBuilderDialog",
                    new Object[] { PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() });

            campaignBuilder.setDialog(dialog);

            if(!campaignBuilder.buildCampaign(campaign)) {
                logger.info("Campaign build was incomplete; see previous log entries for details.");

                alertService.addAlert(new Alert(Alert.Type.INFO, this.getClass().getSimpleName(), Messages
                        .getString("campaign.generic.ui.action.campaign.create.error.build_incomplete.text")));

                return;
            }
        }
        catch(ObjectBuilderException e) {
            logger.error("Exception while trying to build campaign: " + e.getLocalizedMessage(), e);

            alertService
                    .addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), e.getLocalizedMessage()));

            return;
        }

        try {
            campaignManager.registerCampaign(campaign);
            campaign.save();
        }
        catch(Exception e) {
            logger.error("Exception while trying to register/save campaign: " + e.getLocalizedMessage(), e);

            alertService
                    .addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), e.getLocalizedMessage()));
        }
    }
View Full Code Here

TOP

Related Classes of org.criticalfailure.torchlight.core.application.entity.Alert

Copyright © 2018 www.massapicom. 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.