Package net.sourceforge.cruisecontrol

Examples of net.sourceforge.cruisecontrol.Modification


        private void initializeModification() {
            if (modificationList == null) {
                modificationList = new ArrayList();
            }
            modification = new Modification();
            firstModifiedTime = true;
            firstUserName = true;
            nextLineIsComment = false;
            waitingForNextValidStart = false;
        }
View Full Code Here


                    .getChild("modifications")
                    .getChildren("modification")
                    .iterator();
            while (modificationIterator.hasNext()) {
                Element modification = (Element) modificationIterator.next();
                Modification mod = new Modification();
                mod.fromElement(
                    modification,
                    new SimpleDateFormat(DateFormatFactory.getFormat()));
                results.add(mod);
            }
        }
View Full Code Here

        } else {
            Iterator modificationIterator = log.getChild("modifications").getChildren("modification")
                    .iterator();
            while (modificationIterator.hasNext()) {
                Element modification = (Element) modificationIterator.next();
                Modification mod = new Modification();
                mod.fromElement(modification, dateFormat);
                results.add(mod);
            }
        }
        return results;
    }
View Full Code Here

                s = br.readLine();
                while (s != null && !s.equals("")) {
                    entry.add(s);
                    s = br.readLine();
                }
                Modification mod = handleEntry(entry);
                if (mod != null) {
                    modifications.add(mod);
                }

                if (s.equals("")) {
View Full Code Here

     *  Parse individual VSS history entry
     *
     *@param  historyEntry
     */
    protected Modification handleEntry(List historyEntry) {
        Modification mod = new Modification();
        String nameAndDateLine = (String) historyEntry.get(2);
        mod.userName = parseUser(nameAndDateLine);
        mod.modifiedTime = parseDate(nameAndDateLine);

        String folderLine = (String) historyEntry.get(0);
View Full Code Here

        if ((user != null) && (user.getName().equals("BuildMaster"))) {
            return;
        }

        Modification mod = new Modification();
        mod.type = status;
        mod.fileName = revision.getName();
        mod.folderName = revision.getParentFolder().getFolderHierarchy();
        mod.modifiedTime = revision.getModifiedTime().createDate();
        mod.userName = user.getName();
View Full Code Here

        Set users = new HashSet();
        Set modificationSet = logHelper.getModifications();

        for (Iterator modificationIter = modificationSet.iterator(); modificationIter.hasNext(); ) {
            Modification mod = (Modification) modificationIter.next();
            String modifiedFile = mod.getFullPath();
           
            LOG.debug("Modified file: " + modifiedFile);
           
            // Compare the modified file to the regExpr's
            for (int i = 0; i < alertAddresses.length; i++) {
View Full Code Here

    public List getModifications(Date lastBuild, Date now) {
        ArrayList result = new ArrayList();

        if (version == 1) {
            //build up a couple Modification objects
            Modification mod1 = new Modification();
            Modification.ModifiedFile mod1file = mod1.createModifiedFile("file1", "dir1");
            mod1file.action = "Checkin";
            mod1.userName = "user1";
            mod1.modifiedTime = modifiedDate;
            mod1.comment = "comment1";
            result.add(mod1);

            Modification mod2 = new Modification();
            Modification.ModifiedFile mod2file = mod1.createModifiedFile("file2", "dir2");
            mod2file.action = "Checkin";
            mod2.userName = "user2";
            mod2.modifiedTime = modifiedDate;
            mod2.comment = "comment2";
            result.add(mod2);

            if (property != null) {
                properties.put(property, "true");
            }
        }

        if (version == 2) {
            Modification mod3 = new Modification();
            Modification.ModifiedFile mod3file = mod3.createModifiedFile("file3", "dir3");
            mod3file.action = "Checkin";
            mod3.userName = "user3";
            mod3.modifiedTime = modifiedDate;
            mod3.comment = "comment3";
            result.add(mod3);

            Modification mod4 = new Modification();
            Modification.ModifiedFile mod4file = mod4.createModifiedFile("file4", "dir4");
            mod4file.action = "Checkin";
            mod4.userName = "user4";
            mod4.modifiedTime = modifiedDate;
            mod4.comment = "comment4";
            result.add(mod4);
View Full Code Here

     *
     * @throws Exception
     */
    public void testCreateModsElement() throws Exception {
        Set modSet = successLogHelper.getModifications();
        Modification mod = null;
        Iterator modIter = modSet.iterator();
       
        while (modIter.hasNext()) {
            mod = (Modification) modIter.next();
            assertNotNull("getFileName should not return null", mod.getFileName());
            assertNotNull("getFullPath should not return null", mod.getFullPath());
           
            if ("filename1".equalsIgnoreCase(mod.getFileName())) {
                assertNull(mod.getFolderName());
            }
        }
    }
View Full Code Here

        mods[2] = createModification("user3", true);
        return mods;
    }

    private Modification createModification(String name, boolean addemail) {
        Modification mod = new Modification();
        mod.userName = name;
        mod.comment = "This is the checkin for " + name;
        if (addemail) {
            mod.emailAddress = name + "@host.com";
        }
        mod.modifiedTime = SOME_DATE;

        Modification.ModifiedFile modfile = mod.createModifiedFile("file.txt", "myfolder");
        modfile.action = "checkin";
        return mod;
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.Modification

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.