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.

ArchivaAll.java 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. package org.apache.archiva.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. *
  22. * This object is only used for the XML backup / restore
  23. * features of Archiva.
  24. * This object is not serialized to the Database.
  25. *
  26. *
  27. * @version $Revision$ $Date$
  28. */
  29. @SuppressWarnings( "all" )
  30. public class ArchivaAll
  31. implements java.io.Serializable
  32. {
  33. //--------------------------/
  34. //- Class/Member Variables -/
  35. //--------------------------/
  36. /**
  37. * Field artifacts.
  38. */
  39. private java.util.List<ArchivaArtifactModel> artifacts;
  40. /**
  41. * Field repositoryMetadata.
  42. */
  43. private java.util.List<ArchivaRepositoryMetadata> repositoryMetadata;
  44. /**
  45. * Field modelEncoding.
  46. */
  47. private String modelEncoding = "UTF-8";
  48. //-----------/
  49. //- Methods -/
  50. //-----------/
  51. /**
  52. * Method addArtifact.
  53. *
  54. * @param archivaArtifactModel
  55. */
  56. public void addArtifact( ArchivaArtifactModel archivaArtifactModel )
  57. {
  58. getArtifacts().add( archivaArtifactModel );
  59. } //-- void addArtifact( ArchivaArtifactModel )
  60. /**
  61. * Method addRepositoryMetadata.
  62. *
  63. * @param archivaRepositoryMetadata
  64. */
  65. public void addRepositoryMetadata( ArchivaRepositoryMetadata archivaRepositoryMetadata )
  66. {
  67. getRepositoryMetadata().add( archivaRepositoryMetadata );
  68. } //-- void addRepositoryMetadata( ArchivaRepositoryMetadata )
  69. /**
  70. * Method getArtifacts.
  71. *
  72. * @return List
  73. */
  74. public java.util.List<ArchivaArtifactModel> getArtifacts()
  75. {
  76. if ( this.artifacts == null )
  77. {
  78. this.artifacts = new java.util.ArrayList<ArchivaArtifactModel>();
  79. }
  80. return this.artifacts;
  81. } //-- java.util.List<ArchivaArtifactModel> getArtifacts()
  82. /**
  83. * Get the modelEncoding field.
  84. *
  85. * @return String
  86. */
  87. public String getModelEncoding()
  88. {
  89. return this.modelEncoding;
  90. } //-- String getModelEncoding()
  91. /**
  92. * Method getRepositoryMetadata.
  93. *
  94. * @return List
  95. */
  96. public java.util.List<ArchivaRepositoryMetadata> getRepositoryMetadata()
  97. {
  98. if ( this.repositoryMetadata == null )
  99. {
  100. this.repositoryMetadata = new java.util.ArrayList<ArchivaRepositoryMetadata>();
  101. }
  102. return this.repositoryMetadata;
  103. } //-- java.util.List<ArchivaRepositoryMetadata> getRepositoryMetadata()
  104. /**
  105. * Method removeArtifact.
  106. *
  107. * @param archivaArtifactModel
  108. */
  109. public void removeArtifact( ArchivaArtifactModel archivaArtifactModel )
  110. {
  111. getArtifacts().remove( archivaArtifactModel );
  112. } //-- void removeArtifact( ArchivaArtifactModel )
  113. /**
  114. * Method removeRepositoryMetadata.
  115. *
  116. * @param archivaRepositoryMetadata
  117. */
  118. public void removeRepositoryMetadata( ArchivaRepositoryMetadata archivaRepositoryMetadata )
  119. {
  120. getRepositoryMetadata().remove( archivaRepositoryMetadata );
  121. } //-- void removeRepositoryMetadata( ArchivaRepositoryMetadata )
  122. /**
  123. * Set the artifacts field.
  124. *
  125. * @param artifacts
  126. */
  127. public void setArtifacts( java.util.List<ArchivaArtifactModel> artifacts )
  128. {
  129. this.artifacts = artifacts;
  130. } //-- void setArtifacts( java.util.List )
  131. /**
  132. * Set the modelEncoding field.
  133. *
  134. * @param modelEncoding
  135. */
  136. public void setModelEncoding( String modelEncoding )
  137. {
  138. this.modelEncoding = modelEncoding;
  139. } //-- void setModelEncoding( String )
  140. /**
  141. * Set the repositoryMetadata field.
  142. *
  143. * @param repositoryMetadata
  144. */
  145. public void setRepositoryMetadata( java.util.List<ArchivaRepositoryMetadata> repositoryMetadata )
  146. {
  147. this.repositoryMetadata = repositoryMetadata;
  148. } //-- void setRepositoryMetadata( java.util.List )
  149. private static final long serialVersionUID = 3259707008803111764L;
  150. }