Package org.mongeez.commands

Examples of org.mongeez.commands.ChangeSet


        BufferedReader reader = new BufferedReader(new InputStreamReader(
                file.getInputStream(), cs));
        try {
            String line = reader.readLine();
            parseFileHeader(file, line);
            ChangeSet changeSet = null;
            StringBuilder scriptBody = null;
            line = reader.readLine();
            while (line != null) {
                ChangeSet newChangeSet = parseChangeSetStart(line);
                if (newChangeSet != null) {
                    addScriptToChangeSet(changeSet, scriptBody);
                    changeSet = newChangeSet;
                    scriptBody = new StringBuilder();
                    ChangeSetReaderUtil.populateChangeSetResourceInfo(changeSet, file);
View Full Code Here


                    LINE_COMMENT + FILE_HEADER, -1);
        }
    }

    private ChangeSet parseChangeSetStart(String line) {
        ChangeSet changeSet = null;
        Matcher changeSetMatcher = CHANGESET_PATTERN.matcher(line);
        if (changeSetMatcher.matches()) {
            changeSet = new ChangeSet();
            changeSet.setAuthor(changeSetMatcher.group(1));
            changeSet.setChangeId(changeSetMatcher.group(2));
            changeSet.setRunAlways(parseAttribute(ATTRIBUTE_RUN_ALWAYS_PATTERN.matcher(line), false));
        }
        return changeSet;
    }
View Full Code Here

        changeSetIdsNotUnique(changesets);
    }

    private void changeSetIdsNotUnique(List<ChangeSet> changeSets) {
        for (int i = 0; i < changeSets.size() / 2; i++) {
            ChangeSet changeSetI = changeSets.get(i);
            String changeSetIId = changeSetI.getChangeId();

            for (int j = i + 1; j < changeSets.size(); j++) {
                ChangeSet changeSetJ = changeSets.get(j);
                String changeSetJId = changeSetJ.getChangeId();

                if (changeSetIId.equals(changeSetJId)) {
                    throw new ValidationException("ChangeSetId " + changeSetIId + " is not unique.");
                }
            }
View Full Code Here

TOP

Related Classes of org.mongeez.commands.ChangeSet

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.