This project has retired. For details please refer to its Attic page.
PolicyInformation xref
View Javadoc
1   package org.apache.archiva.rest.api.model;
2   /*
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   *   http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   */
20  
21  import javax.xml.bind.annotation.XmlRootElement;
22  import java.io.Serializable;
23  import java.util.List;
24  
25  /**
26   * @author Olivier Lamy
27   * @since 1.4-M3
28   */
29  @XmlRootElement( name = "policyInformation" )
30  public class PolicyInformation
31      implements Serializable
32  {
33      private List<String> options;
34  
35      private String defaultOption;
36  
37      private String id;
38  
39      private String name;
40  
41      public PolicyInformation()
42      {
43          // no op
44      }
45  
46      public PolicyInformation( List<String> options, String defaultOption, String id, String name )
47      {
48          this.options = options;
49          this.defaultOption = defaultOption;
50          this.id = id;
51          this.name = name;
52      }
53  
54      public List<String> getOptions()
55      {
56          return options;
57      }
58  
59      public void setOptions( List<String> options )
60      {
61          this.options = options;
62      }
63  
64      public String getDefaultOption()
65      {
66          return defaultOption;
67      }
68  
69      public void setDefaultOption( String defaultOption )
70      {
71          this.defaultOption = defaultOption;
72      }
73  
74      public String getId()
75      {
76          return id;
77      }
78  
79      public void setId( String id )
80      {
81          this.id = id;
82      }
83  
84      public String getName()
85      {
86          return name;
87      }
88  
89      public void setName( String name )
90      {
91          this.name = name;
92      }
93  
94      @Override
95      public String toString()
96      {
97          final StringBuilder sb = new StringBuilder();
98          sb.append( "PolicyInformation" );
99          sb.append( "{options=" ).append( options );
100         sb.append( ", defaultOption='" ).append( defaultOption ).append( '\'' );
101         sb.append( ", id='" ).append( id ).append( '\'' );
102         sb.append( ", name='" ).append( name ).append( '\'' );
103         sb.append( '}' );
104         return sb.toString();
105     }
106 }