View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   //   Generated by Maven, any modifications will be overwritten.
3   // ==============================================================
4   package org.apache.maven.settings;
5   
6   import java.io.Serializable;
7   import java.util.AbstractList;
8   import java.util.Collections;
9   import java.util.HashMap;
10  import java.util.List;
11  import java.util.Map;
12  import java.util.stream.Collectors;
13  import java.util.stream.Stream;
14  import org.apache.maven.api.annotations.Generated;
15  import org.apache.maven.api.annotations.Nonnull;
16  
17  @Generated
18  public class TrackableBase
19      implements Serializable, Cloneable
20  {
21  
22      org.apache.maven.api.settings.TrackableBase delegate;
23  
24      public TrackableBase()
25      {
26          this( org.apache.maven.api.settings.TrackableBase.newInstance() );
27      }
28  
29      public TrackableBase( org.apache.maven.api.settings.TrackableBase delegate )
30      {
31          this.delegate = delegate;
32      }
33  
34      public TrackableBase clone()
35      {
36          return new TrackableBase( getDelegate() );
37      }
38  
39      public org.apache.maven.api.settings.TrackableBase getDelegate()
40      {
41          return delegate;
42      }
43  
44      public static List<org.apache.maven.api.settings.TrackableBase> trackableBaseToApiV4( List<TrackableBase> list )
45      {
46          return list != null ? new WrapperList<>( list, TrackableBase::getDelegate, TrackableBase::new ) : null;
47      }
48  
49      public static List<TrackableBase> trackableBaseToApiV3( List<org.apache.maven.api.settings.TrackableBase> list )
50      {
51          return list != null ? new WrapperList<>( list, TrackableBase::new, TrackableBase::getDelegate ) : null;
52      }
53  
54  
55              
56      public static final String USER_LEVEL = "user-level";
57      public static final String GLOBAL_LEVEL = "global-level";
58  
59      private String sourceLevel = USER_LEVEL;
60      private boolean sourceLevelSet = false;
61  
62      public void setSourceLevel( String sourceLevel )
63      {
64          if ( sourceLevelSet )
65          {
66              throw new IllegalStateException( "Cannot reset sourceLevel attribute; it is already set to: " + sourceLevel );
67          }
68          else if ( !( USER_LEVEL.equals( sourceLevel ) || GLOBAL_LEVEL.equals( sourceLevel ) ) )
69          {
70              throw new IllegalArgumentException( "sourceLevel must be one of: {" + USER_LEVEL + "," + GLOBAL_LEVEL + "}" );
71          }
72          else
73          {
74              this.sourceLevel = sourceLevel;
75              this.sourceLevelSet = true;
76          }
77      }
78  
79      public String getSourceLevel()
80      {
81          return sourceLevel;
82      }
83              
84            
85  }