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 org.apache.archiva.policies.PolicyOption;
22  
23  import javax.xml.bind.annotation.XmlRootElement;
24  import java.io.Serializable;
25  import java.util.List;
26  
27  /**
28   * @author Olivier Lamy
29   * @since 1.4-M3
30   */
31  @XmlRootElement( name = "policyInformation" )
32  public class PolicyInformation
33      implements Serializable
34  {
35      private List<PolicyOption> options;
36  
37      private PolicyOption defaultOption;
38  
39      private String id;
40  
41      private String name;
42  
43      public PolicyInformation()
44      {
45          // no op
46      }
47  
48      public PolicyInformation(List<PolicyOption> options, PolicyOption defaultOption, String id, String name )
49      {
50          this.options = options;
51          this.defaultOption = defaultOption;
52          this.id = id;
53          this.name = name;
54      }
55  
56      public List<PolicyOption> getOptions()
57      {
58          return options;
59      }
60  
61      public void setOptions( List<PolicyOption> options )
62      {
63          this.options = options;
64      }
65  
66      public PolicyOption getDefaultOption()
67      {
68          return defaultOption;
69      }
70  
71      public void setDefaultOption( PolicyOption defaultOption )
72      {
73          this.defaultOption = defaultOption;
74      }
75  
76      public String getId()
77      {
78          return id;
79      }
80  
81      public void setId( String id )
82      {
83          this.id = id;
84      }
85  
86      public String getName()
87      {
88          return name;
89      }
90  
91      public void setName( String name )
92      {
93          this.name = name;
94      }
95  
96      @Override
97      public String toString()
98      {
99          final StringBuilder sb = new StringBuilder();
100         sb.append( "PolicyInformation" );
101         sb.append( "{options=" ).append( options );
102         sb.append( ", defaultOption='" ).append( defaultOption ).append( '\'' );
103         sb.append( ", id='" ).append( id ).append( '\'' );
104         sb.append( ", name='" ).append( name ).append( '\'' );
105         sb.append( '}' );
106         return sb.toString();
107     }
108 }