Examples of YVerificationMessage


Examples of au.edu.qut.yawl.util.YVerificationMessage

    }

    public List verify() {
        List results = new ArrayList();
        if(rsrcID == null || rsrcID.length() == 0){
            results.add(new YVerificationMessage(
                    this,
                    "ResourceID cannot be null or empty",
                    YVerificationMessage.ERROR_STATUS));
        }
        return results;
View Full Code Here

Examples of au.edu.qut.yawl.util.YVerificationMessage

                parsingMsg = e.getMessage();
                //catch the xml parsers exception,
                //transform it into YAWL format and abort the load
                for (StringTokenizer tokens = new StringTokenizer(parsingMsg, "\n"); tokens.hasMoreTokens();) {
                    String msg = tokens.nextToken();
                    errorMessages.add(new YVerificationMessage(null, msg, YVerificationMessage.ERROR_STATUS));
                }
                logger.debug("<-- addSpecifcations: syntax exceptions found");
                return returnIDs;
            } catch (YSchemaBuildingException e) {
                logger.error("Could not build schema.", e);
                e.printStackTrace();
                return null;
            }
            for (Iterator iterator = newSpecifications.iterator(); iterator.hasNext();) {
                YSpecification specification = (YSpecification) iterator.next();
                List messages = specification.verify();
                if (messages.size() > 0 && !ignoreErors) {
                    YMessagePrinter.printMessages(messages);
                    errorMessages.addAll(messages);
                }
                //if the error messages are empty or contain only warnings
                if (YVerificationMessage.containsNoErrors(errorMessages)) {
                    boolean success = loadSpecification(specification);
                    if (success) {
                        /*
                          INSERTED FOR PERSISTANCE
                         */
                        if (!restoring) {
                            logger.info("Persisting specification loaded from file " + specificationFile.getAbsolutePath());
                            YSpecFile yspec = new YSpecFile(specificationFile.getAbsolutePath());

                            if (journalising) {
                                YPersistenceManager pmgr = new YPersistenceManager(getPMSessionFactory());
                                try {
                                    pmgr.startTransactionalSession();
                                    pmgr.storeObject(yspec);
                                    pmgr.commit();
                                } catch (YPersistenceException e) {
                                    throw new YPersistenceException("Failrue whilst persisting new specification", e);
                                }
                            }
                        }
                        /******************/

                        returnIDs.add(specification.getID());
                    } else {//the user has loaded the specification with identical id
                        errorMessages.add(new YVerificationMessage(this,
                                "There is a specification with an identical id to ["
                                + specification.getID() + "] already loaded into the engine.",
                                YVerificationMessage.ERROR_STATUS));
                    }
                }
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.