2 * Copyright (C) 2008, Marek Zawirski <marek.zawirski@gmail.com>
6 * Redistribution and use in source and binary forms, with or
7 * without modification, are permitted provided that the following
10 * - Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * - Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
18 * - Neither the name of the Git Development Community nor the
19 * names of its contributors may be used to endorse or promote
20 * products derived from this software without specific prior
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
24 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
25 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
33 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
35 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 package org
.spearce
.jgit
.transport
;
40 import java
.util
.Collection
;
41 import java
.util
.Collections
;
45 * Result of push operation to the remote repository. Holding information of
46 * {@link OperationResult} and remote refs updates status.
48 * @see Transport#push(org.spearce.jgit.lib.ProgressMonitor, Collection)
50 public class PushResult
extends OperationResult
{
51 private Map
<String
, RemoteRefUpdate
> remoteUpdates
= Collections
.emptyMap();
54 * Get status of remote refs updates. Together with
55 * {@link #getAdvertisedRefs()} it provides full description/status of each
58 * Returned collection is not sorted in any order.
61 * @return collection of remote refs updates
63 public Collection
<RemoteRefUpdate
> getRemoteUpdates() {
64 return Collections
.unmodifiableCollection(remoteUpdates
.values());
68 * Get status of specific remote ref update by remote ref name. Together
69 * with {@link #getAdvertisedRef(String)} it provide full description/status
74 * @return status of remote ref update
76 public RemoteRefUpdate
getRemoteUpdate(final String refName
) {
77 return remoteUpdates
.get(refName
);
80 protected void setRemoteUpdates(
81 final Map
<String
, RemoteRefUpdate
> remoteUpdates
) {
82 this.remoteUpdates
= remoteUpdates
;