Package com.sonymobile.tools.gerrit.gerritevents.dto.events

Examples of com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated


        dispatcher.gerritEvent(Setup.createRefReplicatedEvent("someProject", "refs/heads/master", "someGerritServer",
                "slaveB", RefReplicated.SUCCEEDED_STATUS));
        dispatcher.gerritEvent(Setup.createRefReplicatedEvent("someProject", "refs/heads/master", "someGerritServer",
                "slaveA", RefReplicated.SUCCEEDED_STATUS));

        RefUpdated refUpdated = Setup.createRefUpdated("someGerritServer", "someProject",
                "master");
        Item item = createItem(refUpdated, new String[] {"slaveA", "slaveB"});

        //item is blocked since the cached replication events are time stamped before the actual event
        CauseOfBlockage cause = dispatcher.canRun(item);
View Full Code Here


     * @param project The project.
     * @param ref The ref.
     * @return a RefUpdated event
     */
    public static RefUpdated createRefUpdated(String serverName, String project, String ref) {
        RefUpdated event = new RefUpdated();
        Account account = new Account();
        account.setEmail("email@domain.com");
        account.setName("Name");
        event.setAccount(account);
        event.setProvider(new Provider(serverName, "gerrit", "29418", "ssh", "http://gerrit/", "1"));

        RefUpdate refUpdate = new RefUpdate();
        refUpdate.setNewRev("2");
        refUpdate.setOldRev("1");
        refUpdate.setProject(project);
        refUpdate.setRefName(ref);
        event.setRefUpdate(refUpdate);

        return event;
    }
View Full Code Here

                logger.info("Project {} Build Scheduled: {} By event: {}",
                        new Object[]{project.getName(), (build != null),
                            changeBasedEvent.getChange().getNumber(), });
            }
        } else if (event instanceof RefUpdated) {
            RefUpdated refUpdated = (RefUpdated)event;
            logger.info("Project {} Build Scheduled: {} By event: {}",
                    new Object[]{project.getName(), (build != null),
                    refUpdated.getRefUpdate().getRefName() + " " + refUpdated.getRefUpdate().getNewRev(), });
        }
    }
View Full Code Here

                            logger.trace("According to {} the event is interesting.", p);
                            return true;
                        }
                    }
                } else if (event instanceof RefUpdated) {
                    RefUpdated refUpdated = (RefUpdated)event;
                    if (isServerInteresting(event) && p.isInteresting(refUpdated.getRefUpdate().getProject(),
                                                                      refUpdated.getRefUpdate().getRefName(), null)) {
                        logger.trace("According to {} the event is interesting.", p);
                        return true;
                    }
                }
            } catch (PatternSyntaxException pse) {
View Full Code Here

TOP

Related Classes of com.sonymobile.tools.gerrit.gerritevents.dto.events.RefUpdated

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.