Requests Change notifications of feed type normal.

@return {@link ChangesResult} encapsulating the normal feed changes
195189
public ChangesResult getChanges() {
        final URI uri = this.databaseHelper.changesUri("feed", "normal");
        return client.get(uri, ChangesResult.class);
    }
1000533
protected static void requestNotificationOnChange(JvmType type, Runnable listener) {
		Resource resource = type.eResource();
		if (resource instanceof TypeResource) {
			IMirror mirror = ((TypeResource) resource).getMirror();
			if (mirror instanceof IMirrorExtension) {
				if (((IMirrorExtension) mirror).isSealed())
					return;
			}
		}
		Notifier notifier = type;
		if (resource != null) {
			if (resource.getResourceSet() != null)
				notifier = resource.getResourceSet();
			else
				notifier = resource;
		}
		JvmTypeChangeDispatcher dispatcher = JvmTypeChangeDispatcher.findResourceChangeDispatcher(notifier);
		dispatcher.requestNotificationOnChange(type, listener);
	}
1234137
@Override
  @SuppressWarnings("unchecked")
  public Task<ChangeEventT> nextEvent() throws IOException {
    return dispatcher.dispatchTask(new Callable<ChangeEventT>() {
      @Override
      public ChangeEventT call() throws Exception {
        final StitchEvent<ChangeEventT> nextEvent =
            (StitchEvent<ChangeEventT>) getInternalStream().nextEvent();

        if (nextEvent == null) {
          return null;
        }
        if (nextEvent.getError() != null) {
          dispatchError(nextEvent);
          return null;
        }
        if (nextEvent.getData() == null) {
          return null;
        }

        return nextEvent.getData();
      }
    });
  }
569481
public boolean selectionChanged(Object source, int iStartRow, int iEndRow, int iSelectType)
    {
        boolean bChanged = super.selectionChanged(source, iStartRow, iEndRow, iSelectType);
        if (bChanged)
        { // Notify all the listSelectionListeners
            this.fireMySelectionChanged(new MyListSelectionEvent(source, this, m_iSelectedRow, iSelectType));
        }
        return bChanged;
    }
789386
public void notifyChanged() {
        if (listeners != null) {
            synchronized (notifyLock) {
                if (listeners != null) {
                    if (notifyThread == null) {
                        notifyThread = new NotifyThread(this);
                        notifyThread.setDaemon(true);
                        notifyThread.start();
                    }
                    notifyThread.queue(listeners.toArray(new EventListener[listeners.size()]));
                }
            }
        }
    }
20871
public void doRssChangelog(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
        class FeedItem {
            ChangeLogSet.Entry e;
            int idx;

            public FeedItem(ChangeLogSet.Entry e, int idx) {
                this.e = e;
                this.idx = idx;
            }

            Run<?, ?> getBuild() {
                return e.getParent().build;
            }
        }

        List<FeedItem> entries = new ArrayList<>();
        String scmDisplayName = "";
        if (this instanceof SCMTriggerItem) {
            SCMTriggerItem scmItem = (SCMTriggerItem) this;
            List<String> scmNames = new ArrayList<>();
            for (SCM s : scmItem.getSCMs()) {
                scmNames.add(s.getDescriptor().getDisplayName());
            }
            scmDisplayName = " " + Util.join(scmNames, ", ");
        }

        for (RunT r = getLastBuild(); r != null; r = r.getPreviousBuild()) {
            int idx = 0;
            if (r instanceof RunWithSCM) {
                for (ChangeLogSet<? extends ChangeLogSet.Entry> c : ((RunWithSCM<?,?>) r).getChangeSets()) {
                    for (ChangeLogSet.Entry e : c) {
                        entries.add(new FeedItem(e, idx++));
                    }
                }
            }
        }
        RSS.forwardToRss(
                getDisplayName() + scmDisplayName + " changes",
                getUrl() + "changes",
                entries, new FeedAdapter<FeedItem>() {
                    public String getEntryTitle(FeedItem item) {
                        return "#" + item.getBuild().number + ' ' + item.e.getMsg() + " (" + item.e.getAuthor() + ")";
                    }

                    public String getEntryUrl(FeedItem item) {
                        return item.getBuild().getUrl() + "changes#detail" + item.idx;
                    }

                    public String getEntryID(FeedItem item) {
                            return getEntryUrl(item);
                        }

                    public String getEntryDescription(FeedItem item) {
                        StringBuilder buf = new StringBuilder();
                        for (String path : item.e.getAffectedPaths())
                            buf.append(path).append('\n');
                        return buf.toString();
                    }

                    public Calendar getEntryTimestamp(FeedItem item) {
                            return item.getBuild().getTimestamp();
                        }

                    public String getEntryAuthor(FeedItem entry) {
                        return JenkinsLocationConfiguration.get().getAdminAddress();
                    }
                },
                req, rsp);
    }
869299
public Map<Change, PatchSet> getChanges(GerritQueryHandler gerritQueryHandler) {
        if (StringUtils.isEmpty(name)) {
            logger.error("Topic name can not be empty");
            return Collections.emptyMap();
        }

        if (changes == null) {
            Map<Change, PatchSet> temp = new HashMap<Change, PatchSet>();
            try {
                List<JSONObject> jsonList = gerritQueryHandler.queryCurrentPatchSets("topic:{" + name + "}");
                for (JSONObject json : jsonList) {
                    if (json.has("type") && "stats".equalsIgnoreCase(json.getString("type"))) {
                        continue;
                    }
                    if (json.has("currentPatchSet")) {
                        JSONObject currentPatchSet = json.getJSONObject("currentPatchSet");
                        temp.put(new Change(json), new PatchSet(currentPatchSet));
                    }
                }
                changes = temp;
            } catch (IOException e) {
                logger.error("IOException occured. ", e);
            } catch (GerritQueryException e) {
                logger.error("Bad query. ", e);
            }
        }
        return changes;
    }
489561
@Override
    public void notifyChange() throws CouldNotPerformException, InterruptedException {
        logger.debug("Notify data change of " + this);
        // synchronized by manageable lock to prevent reinit between validateInitialization and publish
        M newData;
        manageLock.lockWrite(this);
        try {
            try {
                validateInitialization();
            } catch (final NotInitializedException ex) {
                // only forward if instance was not destroyed before otherwise skip notification.
                if (destroyed) {
                    return;
                }
                throw ex;
            }

            // update the current data builder before updating to allow implementations to change data beforehand
            newData = updateDataToPublish(cloneDataBuilder());
            Event event = new Event(informer.getScope(), newData.getClass(), newData);
            event.getMetaData().setUserTime(RPCHelper.USER_TIME_KEY, System.nanoTime());

            if (isActive()) {
                try {
                    waitForMiddleware(NOTIFICATILONG_TIMEOUT, TimeUnit.MILLISECONDS);
                    informer.publish(event);
                } catch (TimeoutException ex) {
                    ExceptionPrinter.printHistory(new CouldNotPerformException("Skip data update notification because middleware is not ready since "+TimeUnit.MILLISECONDS.toSeconds(NOTIFICATILONG_TIMEOUT)+" seconds of " + this + "!", ex), logger, LogLevel.WARN);
                } catch (CouldNotPerformException ex) {
                    ExceptionPrinter.printHistory(new CouldNotPerformException("Could not inform about data change of " + this + "!", ex), logger);
                }
            }
        } finally {
            manageLock.unlockWrite(this);
        }

        // Notify data update
        try {
            notifyDataUpdate(newData);
        } catch (CouldNotPerformException ex) {
            ExceptionPrinter.printHistory(new CouldNotPerformException("Could not notify data update!", ex), logger);
        }

        dataObserver.notifyObservers(newData);
    }
277286
public final void change() {
        final ApiAttribute chanAttr = new ApiAttribute("attribute", "Changed");
        chanAttr.getAttributes().add(new DateUtil().todayDateAttribute());
        final ArrayList<ApiAttribute> chanList = new ArrayList<>();
        chanList.add(chanAttr);
        this.changed.clear();
        this.changed.addAll(chanList);
    }
961411
public List<BuildChangeSet> getChangeSets() {
        List<BuildChangeSet> result;
        if (changeSets != null) {
            result = changeSets;
        } else if (changeSet != null) {
            result = Collections.singletonList(changeSet);
        } else {
            result = null;
	}
        return result;
    }
1282544
public final IntResultListener asIntResultListener ()
    {
        return new IntResultListener() {
            public void requestCompleted (int result) {
                // call the invocation method and it will do the unsafe cast for us.
                Resulting.this.requestProcessed((Object)result);
            }
            public void requestFailed (Exception cause) {
                Resulting.this.requestFailed(cause);
            }
        };
    }
1108214
public Map<String, OperationResult<ModelService>> getChangedServices(Map<String, ModelService> services){
        String body = _serialize(services);
        HttpResponse result = invoker.invoke("/service/changing" , body, HttpMethod.POST);

        if (result.getHttpCode() != HTTP_OK) {
            throw new ServiceException(ErrorCode.REMOTE_DIRECTORY_SERVER_ERROR,
                    "HTTP Code is not OK, code=%s", result.getHttpCode());
        }

        Map<String, OperationResult<ModelService>> changedServices = _deserialize(
                    result.getRetBody(), new TypeReference<Map<String, OperationResult<ModelService>>>(){});

        return changedServices;
    }
177332
public static Result newUpdateResultRequest(Type[] types, long id) {

        Result result = newResult(ResultConstants.UPDATE_RESULT);

        result.metaData = ResultMetaData.newUpdateResultMetaData(types);
        result.id       = id;

        result.navigator.add(new Object[]{});

        return result;
    }
1057808
@Override
    public java.util.concurrent.Future<ChangeMessageVisibilityBatchResult> changeMessageVisibilityBatchAsync(String queueUrl,
            java.util.List<ChangeMessageVisibilityBatchRequestEntry> entries) {

        return changeMessageVisibilityBatchAsync(new ChangeMessageVisibilityBatchRequest().withQueueUrl(queueUrl).withEntries(entries));
    }
16556
@RequestMapping(value = "changelog/diff", method = RequestMethod.GET)
    public ResponseEntity<String> diff(FileDiffChangeLogRequest request) {
        // Gets the change log
        SVNChangeLog changeLog = changeLogService.changeLog(request);
        // Gets the files
        SVNChangeLogFiles changeLogFiles = changeLogService.getChangeLogFiles(changeLog);
        // Diff export
        String diff = scmService.diff(
                changeLogFiles.getList(),
                request.getPatterns(),
                changeLogFile -> changeLogService.getDiff(changeLog.getRepository(), changeLogFile)
        );
        // Content type
        HttpHeaders responseHeaders = new HttpHeaders();
        responseHeaders.set("Content-Type", "text/plain");
        // Body and headers
        return new ResponseEntity<>(diff, responseHeaders, HttpStatus.OK);
    }
981433
public Info changeMessage(String newMessage) {
        Info newInfo = new Info();
        newInfo.setMessage(newMessage);

        URL url = COMMENT_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");
        request.setBody(newInfo.getPendingChanges());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        JsonObject jsonResponse = JsonObject.readFrom(response.getJSON());

        return new Info(jsonResponse);
    }
1153904
@RequestMapping(value = "changelog/export", method = RequestMethod.GET)
    public ResponseEntity<String> changeLog(IssueChangeLogExportRequest request) {
        // Gets the change log
        SVNChangeLog changeLog = changeLogService.changeLog(request);
        // Gets the issue service
        ConfiguredIssueService configuredIssueService = changeLog.getRepository().getConfiguredIssueService();
        if (configuredIssueService == null) {
            return new ResponseEntity<>(
                    "The branch is not configured for issues",
                    HttpStatus.NO_CONTENT
            );
        }
        // Gets the issue change log
        SVNChangeLogIssues changeLogIssues = changeLogService.getChangeLogIssues(changeLog);
        // List of issues
        List<Issue> issues = changeLogIssues.getList().stream()
                .map(SCMChangeLogIssue::getIssue)
                .collect(Collectors.toList());
        // Exports the change log using the given format
        ExportedIssues exportedChangeLogIssues = configuredIssueService.getIssueServiceExtension()
                .exportIssues(
                        configuredIssueService.getIssueServiceConfiguration(),
                        issues,
                        request
                );
        // Content type
        HttpHeaders responseHeaders = new HttpHeaders();
        responseHeaders.set("Content-Type", exportedChangeLogIssues.getFormat());
        // Body and headers
        return new ResponseEntity<>(exportedChangeLogIssues.getContent(), responseHeaders, HttpStatus.OK);
    }