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

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


                objectTemplate.save();
            }
            catch(Exception e) {
                logger.error("Exception while trying to save object template: " + e.getLocalizedMessage(), e);

                alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), e
                        .getLocalizedMessage()));
            }
        }
        else {
            logger.warn("No selected object!");

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("object.template.editor.action.object_property.delete.error.no_selected_object.text")));
        }

        logger.info("Done executing 'delete object property' action.");
    }
View Full Code Here


        }
        catch(Exception e) {
            logger.error("Exception while trying to save object property: " + e.getLocalizedMessage(), e);

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

        logger.info("Done executing 'create object property' action.");
    }
View Full Code Here

                            }
                            catch(ObjectPropertyFormatterException e) {
                                logger.error("Exception caught while executing formatter: " + e.getLocalizedMessage(),
                                        e);

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

                        return null;
View Full Code Here

                objectTemplate.save();
            }
            catch(Exception e) {
                logger.error("Exception while trying to save object template: " + e.getLocalizedMessage(), e);

                alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), e
                        .getLocalizedMessage()));
            }
        }
        else {
            logger.warn("No selected object!");

            alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                    .getString("object.template.editor.action.object_property.clone.error.no_selected_object.text")));
        }

        logger.info("Done executing 'clone object property' action.");
    }
View Full Code Here

            catch(Exception e) {
                logger.error(
                        "Exception caught while trying to load object instance for campaign event: object-instance: "
                                + personId + "; campaign-event: " + ce + ": " + e.getLocalizedMessage(), e);

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

                logger.trace("value: " + value);
            }
            catch(Exception e) {
                logger.warn("Cannot calculate SRD 4 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

            logger.trace("mapItem: " + mapItem);

            // split item into key/value
            String[] kv = mapItem.split(":", 2);
            if(kv.length != 2) {
                alertService.addAlert(new Alert(Alert.Type.WARN, getName() + ": " + od.getStringValue(), Messages
                        .getString("calculators.object.map.calculation_error.map_error.text")
                        + ": " + mapItem));
                continue;
            }
            try {
                valueMap.put(kv[0].trim(), kv[1].trim());
            }
            catch(Exception e) {
                logger.warn("Exception caught while processing map for calculation: " + e.getLocalizedMessage());

                alertService.addAlert(new Alert(Alert.Type.WARN, getName() + ": " + od.getStringValue(), Messages
                        .getString("calculators.object.map.calculation_error.map_key_value_error.text")
                        + ": " + mapItem));
                continue;
            }
        }

        if(inputValues.isEmpty()) {
            alertService.addAlert(new Alert(Alert.Type.WARN, getName() + ": " + od.getStringValue(), Messages
                    .getString("calculators.object.map.calculation_error.no_input_values.text")
                    + ": " + op.getName()));
            return;
        }

        String inputName = inputValues.get(0);
        logger.trace("inputName: " + inputName);

        String value = valueMap.get(inputName);
        logger.trace("value: " + value);

        if(StringUtils.stripToNull(value) == null) {
            alertService.addAlert(new Alert(Alert.Type.WARN, getName() + ": " + od.getStringValue(), Messages
                    .getString("calculators.object.map.calculation_error.map_key_not_found.text")
                    + ": " + value));
            return;
        }
View Full Code Here

                csm.connect(campaign.getStoragePrincipal(), campaign.getStorageCredentials());

                // TODO csm.remove
            }
            catch(CampaignStorageException e) {
                alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                        .getString("campaign.manager.error.delete_campaign.text")
                        + ": " + e.getLocalizedMessage()));
            }
        }
View Full Code Here

            }
        }

        logger.warn("No campaign found for ID: " + id);

        alertService.addAlert(new Alert(Alert.Type.WARN, this.getClass().getSimpleName(), "No campaign found for ID: "
                + id));

        return null;
    }
View Full Code Here

                cmop.loadAll();
            }
            catch(Exception e) {
                logger.error("Exception while trying to load campaign data: " + e.getLocalizedMessage(), e);

                alertService.addAlert(new Alert(Alert.Type.ERROR, this.getClass().getSimpleName(), Messages
                        .getString("campaign.manager.error.campaign_load.text")
                        + ": " + 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.