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