View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   //  Generated by Modello Velocity from model-v3.vm
3   //  template, any modifications will be overwritten.
4   // ==============================================================
5   package org.apache.maven.model;
6   
7   import java.io.Serializable;
8   import java.util.AbstractList;
9   import java.util.Collections;
10  import java.util.HashMap;
11  import java.util.List;
12  import java.util.Map;
13  import java.util.Objects;
14  import java.util.Set;
15  import java.util.stream.Collectors;
16  import java.util.stream.Stream;
17  import org.apache.maven.api.annotations.Generated;
18  import org.apache.maven.api.annotations.Nonnull;
19  
20  @Generated
21  public class Scm
22      extends BaseObject
23  {
24  
25      public Scm() {
26          this(org.apache.maven.api.model.Scm.newInstance());
27      }
28  
29      public Scm(org.apache.maven.api.model.Scm delegate) {
30          this(delegate, null);
31      }
32  
33      public Scm(org.apache.maven.api.model.Scm delegate, BaseObject parent) {
34          super(delegate, parent);
35      }
36  
37      public Scm clone(){
38          return new Scm(getDelegate());
39      }
40  
41      public org.apache.maven.api.model.Scm getDelegate() {
42          return (org.apache.maven.api.model.Scm) super.getDelegate();
43      }
44  
45      @Override
46      public boolean equals(Object o) {
47          if (this == o) {
48              return true;
49          }
50          if (o == null || !(o instanceof Scm)) {
51              return false;
52          }
53          Scm that = (Scm) o;
54          return Objects.equals(this.delegate, that.delegate);
55      }
56  
57      @Override
58      public int hashCode() {
59          return getDelegate().hashCode();
60      }
61  
62      public String getConnection() {
63          return getDelegate().getConnection();
64      }
65  
66      public void setConnection(String connection) {
67          if (!Objects.equals(connection, getConnection())) {
68              update(getDelegate().withConnection(connection));
69          }
70      }
71  
72      public String getDeveloperConnection() {
73          return getDelegate().getDeveloperConnection();
74      }
75  
76      public void setDeveloperConnection(String developerConnection) {
77          if (!Objects.equals(developerConnection, getDeveloperConnection())) {
78              update(getDelegate().withDeveloperConnection(developerConnection));
79          }
80      }
81  
82      public String getTag() {
83          return getDelegate().getTag();
84      }
85  
86      public void setTag(String tag) {
87          if (!Objects.equals(tag, getTag())) {
88              update(getDelegate().withTag(tag));
89          }
90      }
91  
92      public String getUrl() {
93          return getDelegate().getUrl();
94      }
95  
96      public void setUrl(String url) {
97          if (!Objects.equals(url, getUrl())) {
98              update(getDelegate().withUrl(url));
99          }
100     }
101 
102     public String getChildScmConnectionInheritAppendPath() {
103         return getDelegate().getChildScmConnectionInheritAppendPath();
104     }
105 
106     public void setChildScmConnectionInheritAppendPath(String childScmConnectionInheritAppendPath) {
107         if (!Objects.equals(childScmConnectionInheritAppendPath, getChildScmConnectionInheritAppendPath())) {
108             update(getDelegate().withChildScmConnectionInheritAppendPath(childScmConnectionInheritAppendPath));
109         }
110     }
111 
112     public String getChildScmDeveloperConnectionInheritAppendPath() {
113         return getDelegate().getChildScmDeveloperConnectionInheritAppendPath();
114     }
115 
116     public void setChildScmDeveloperConnectionInheritAppendPath(String childScmDeveloperConnectionInheritAppendPath) {
117         if (!Objects.equals(childScmDeveloperConnectionInheritAppendPath, getChildScmDeveloperConnectionInheritAppendPath())) {
118             update(getDelegate().withChildScmDeveloperConnectionInheritAppendPath(childScmDeveloperConnectionInheritAppendPath));
119         }
120     }
121 
122     public String getChildScmUrlInheritAppendPath() {
123         return getDelegate().getChildScmUrlInheritAppendPath();
124     }
125 
126     public void setChildScmUrlInheritAppendPath(String childScmUrlInheritAppendPath) {
127         if (!Objects.equals(childScmUrlInheritAppendPath, getChildScmUrlInheritAppendPath())) {
128             update(getDelegate().withChildScmUrlInheritAppendPath(childScmUrlInheritAppendPath));
129         }
130     }
131 
132     public InputLocation getLocation(Object key) {
133         org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation(key);
134         return loc != null ? new InputLocation(loc) : null;
135     }
136 
137     public void setLocation(Object key, InputLocation location) {
138         update(org.apache.maven.api.model.Scm.newBuilder(getDelegate(), true)
139                         .location(key, location.toApiLocation()).build());
140     }
141 
142     public InputLocation getImportedFrom() {
143         org.apache.maven.api.model.InputLocation loc = getDelegate().getImportedFrom();
144         return loc != null ? new InputLocation(loc) : null;
145     }
146 
147     public void setImportedFrom(InputLocation location) {
148         update(org.apache.maven.api.model.Scm.newBuilder(getDelegate(), true)
149                         .importedFrom(location.toApiLocation()).build());
150     }
151 
152     public Set<Object> getLocationKeys() {
153         return getDelegate().getLocationKeys();
154     }
155 
156     protected boolean replace(Object oldDelegate, Object newDelegate) {
157         if (super.replace(oldDelegate, newDelegate)) {
158             return true;
159         }
160         return false;
161     }
162 
163     public static List<org.apache.maven.api.model.Scm> scmToApiV4(List<Scm> list) {
164         return list != null ? new WrapperList<>(list, Scm::getDelegate, Scm::new) : null;
165     }
166 
167     public static List<Scm> scmToApiV3(List<org.apache.maven.api.model.Scm> list) {
168         return list != null ? new WrapperList<>(list, Scm::new, Scm::getDelegate) : null;
169     }
170 
171 
172             
173 
174     public boolean isChildScmConnectionInheritAppendPath() {
175         return (getChildScmConnectionInheritAppendPath() != null) ? Boolean.parseBoolean(getChildScmConnectionInheritAppendPath()) : true;
176     }
177 
178     public boolean isChildScmDeveloperConnectionInheritAppendPath() {
179         return (getChildScmDeveloperConnectionInheritAppendPath() != null) ? Boolean.parseBoolean(getChildScmDeveloperConnectionInheritAppendPath()) : true;
180     }
181 
182     public boolean isChildScmUrlInheritAppendPath() {
183         return (getChildScmUrlInheritAppendPath() != null) ? Boolean.parseBoolean(getChildScmUrlInheritAppendPath()) : true;
184     }
185 
186             
187           
188 
189             
190     /**
191      * @see java.lang.Object#toString()
192      */
193     public String toString() {
194         return "Scm {connection=" + getConnection() + "}";
195     }
196             
197           
198 }