You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PolicyInformation.java 2.7KB

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