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 Site
21      extends BaseObject
22  {
23  
24      public Site() {
25          this(org.apache.maven.api.model.Site.newInstance());
26      }
27  
28      public Site(org.apache.maven.api.model.Site delegate) {
29          this(delegate, null);
30      }
31  
32      public Site(org.apache.maven.api.model.Site delegate, BaseObject parent) {
33          super(delegate, parent);
34      }
35  
36      public Site clone(){
37          return new Site(getDelegate());
38      }
39  
40      public org.apache.maven.api.model.Site getDelegate() {
41          return (org.apache.maven.api.model.Site) super.getDelegate();
42      }
43  
44      @Override
45      public boolean equals(Object o) {
46          if (this == o) {
47              return true;
48          }
49          if (o == null || !(o instanceof Site)) {
50              return false;
51          }
52          Site that = (Site) o;
53          return Objects.equals(this.delegate, that.delegate);
54      }
55  
56      @Override
57      public int hashCode() {
58          return getDelegate().hashCode();
59      }
60  
61      public String getId() {
62          return getDelegate().getId();
63      }
64  
65      public void setId(String id) {
66          if (!Objects.equals(id, getId())) {
67              update(getDelegate().withId(id));
68          }
69      }
70  
71      public String getName() {
72          return getDelegate().getName();
73      }
74  
75      public void setName(String name) {
76          if (!Objects.equals(name, getName())) {
77              update(getDelegate().withName(name));
78          }
79      }
80  
81      public String getUrl() {
82          return getDelegate().getUrl();
83      }
84  
85      public void setUrl(String url) {
86          if (!Objects.equals(url, getUrl())) {
87              update(getDelegate().withUrl(url));
88          }
89      }
90  
91      public String getChildSiteUrlInheritAppendPath() {
92          return getDelegate().getChildSiteUrlInheritAppendPath();
93      }
94  
95      public void setChildSiteUrlInheritAppendPath(String childSiteUrlInheritAppendPath) {
96          if (!Objects.equals(childSiteUrlInheritAppendPath, getChildSiteUrlInheritAppendPath())) {
97              update(getDelegate().withChildSiteUrlInheritAppendPath(childSiteUrlInheritAppendPath));
98          }
99      }
100 
101     public InputLocation getLocation(Object key) {
102         org.apache.maven.api.model.InputLocation loc = getDelegate().getLocation(key);
103         return loc != null ? new InputLocation(loc) : null;
104     }
105 
106     public void setLocation(Object key, InputLocation location) {
107         update(org.apache.maven.api.model.Site.newBuilder(getDelegate(), true)
108                         .location(key, location.toApiLocation()).build());
109     }
110 
111     protected boolean replace(Object oldDelegate, Object newDelegate) {
112         if (super.replace(oldDelegate, newDelegate)) {
113             return true;
114         }
115         return false;
116     }
117 
118     public static List<org.apache.maven.api.model.Site> siteToApiV4(List<Site> list) {
119         return list != null ? new WrapperList<>(list, Site::getDelegate, Site::new) : null;
120     }
121 
122     public static List<Site> siteToApiV3(List<org.apache.maven.api.model.Site> list) {
123         return list != null ? new WrapperList<>(list, Site::new, Site::getDelegate) : null;
124     }
125 
126 
127             
128 
129     public boolean isChildSiteUrlInheritAppendPath()
130     {
131         return ( getChildSiteUrlInheritAppendPath() != null ) ? Boolean.parseBoolean( getChildSiteUrlInheritAppendPath() ) : true;
132     }
133 
134             
135           
136 }