1 package org.apache.archiva.model; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 /** 23 * 24 * This object is only used for the XML backup / restore 25 * features of Archiva. 26 * This object is not serialized to the Database. 27 * 28 * 29 * @version $Revision$ $Date$ 30 */ 31 @SuppressWarnings( "all" ) 32 public class ArchivaAll 33 implements java.io.Serializable 34 { 35 36 //--------------------------/ 37 //- Class/Member Variables -/ 38 //--------------------------/ 39 40 /** 41 * Field artifacts. 42 */ 43 private java.util.List<ArchivaArtifactModel> artifacts; 44 45 /** 46 * Field repositoryMetadata. 47 */ 48 private java.util.List<ArchivaRepositoryMetadata> repositoryMetadata; 49 50 /** 51 * Field modelEncoding. 52 */ 53 private String modelEncoding = "UTF-8"; 54 55 56 //-----------/ 57 //- Methods -/ 58 //-----------/ 59 60 /** 61 * Method addArtifact. 62 * 63 * @param archivaArtifactModel 64 */ 65 public void addArtifact( ArchivaArtifactModel archivaArtifactModel ) 66 { 67 getArtifacts().add( archivaArtifactModel ); 68 } //-- void addArtifact( ArchivaArtifactModel ) 69 70 /** 71 * Method addRepositoryMetadata. 72 * 73 * @param archivaRepositoryMetadata 74 */ 75 public void addRepositoryMetadata( ArchivaRepositoryMetadata archivaRepositoryMetadata ) 76 { 77 getRepositoryMetadata().add( archivaRepositoryMetadata ); 78 } //-- void addRepositoryMetadata( ArchivaRepositoryMetadata ) 79 80 /** 81 * Method getArtifacts. 82 * 83 * @return List 84 */ 85 public java.util.List<ArchivaArtifactModel> getArtifacts() 86 { 87 if ( this.artifacts == null ) 88 { 89 this.artifacts = new java.util.ArrayList<ArchivaArtifactModel>(); 90 } 91 92 return this.artifacts; 93 } //-- java.util.List<ArchivaArtifactModel> getArtifacts() 94 95 /** 96 * Get the modelEncoding field. 97 * 98 * @return String 99 */ 100 public String getModelEncoding() 101 { 102 return this.modelEncoding; 103 } //-- String getModelEncoding() 104 105 /** 106 * Method getRepositoryMetadata. 107 * 108 * @return List 109 */ 110 public java.util.List<ArchivaRepositoryMetadata> getRepositoryMetadata() 111 { 112 if ( this.repositoryMetadata == null ) 113 { 114 this.repositoryMetadata = new java.util.ArrayList<ArchivaRepositoryMetadata>(); 115 } 116 117 return this.repositoryMetadata; 118 } //-- java.util.List<ArchivaRepositoryMetadata> getRepositoryMetadata() 119 120 /** 121 * Method removeArtifact. 122 * 123 * @param archivaArtifactModel 124 */ 125 public void removeArtifact( ArchivaArtifactModel archivaArtifactModel ) 126 { 127 getArtifacts().remove( archivaArtifactModel ); 128 } //-- void removeArtifact( ArchivaArtifactModel ) 129 130 /** 131 * Method removeRepositoryMetadata. 132 * 133 * @param archivaRepositoryMetadata 134 */ 135 public void removeRepositoryMetadata( ArchivaRepositoryMetadata archivaRepositoryMetadata ) 136 { 137 getRepositoryMetadata().remove( archivaRepositoryMetadata ); 138 } //-- void removeRepositoryMetadata( ArchivaRepositoryMetadata ) 139 140 /** 141 * Set the artifacts field. 142 * 143 * @param artifacts 144 */ 145 public void setArtifacts( java.util.List<ArchivaArtifactModel> artifacts ) 146 { 147 this.artifacts = artifacts; 148 } //-- void setArtifacts( java.util.List ) 149 150 /** 151 * Set the modelEncoding field. 152 * 153 * @param modelEncoding 154 */ 155 public void setModelEncoding( String modelEncoding ) 156 { 157 this.modelEncoding = modelEncoding; 158 } //-- void setModelEncoding( String ) 159 160 /** 161 * Set the repositoryMetadata field. 162 * 163 * @param repositoryMetadata 164 */ 165 public void setRepositoryMetadata( java.util.List<ArchivaRepositoryMetadata> repositoryMetadata ) 166 { 167 this.repositoryMetadata = repositoryMetadata; 168 } //-- void setRepositoryMetadata( java.util.List ) 169 170 171 private static final long serialVersionUID = 3259707008803111764L; 172 173 }