001package org.apache.archiva.model; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022/** 023 * 024 * This object is only used for the XML backup / restore 025 * features of Archiva. 026 * This object is not serialized to the Database. 027 * 028 * 029 * @version $Revision$ $Date$ 030 */ 031@SuppressWarnings( "all" ) 032public class ArchivaAll 033 implements java.io.Serializable 034{ 035 036 //--------------------------/ 037 //- Class/Member Variables -/ 038 //--------------------------/ 039 040 /** 041 * Field artifacts. 042 */ 043 private java.util.List<ArchivaArtifactModel> artifacts; 044 045 /** 046 * Field repositoryMetadata. 047 */ 048 private java.util.List<ArchivaRepositoryMetadata> repositoryMetadata; 049 050 /** 051 * Field modelEncoding. 052 */ 053 private String modelEncoding = "UTF-8"; 054 055 056 //-----------/ 057 //- Methods -/ 058 //-----------/ 059 060 /** 061 * Method addArtifact. 062 * 063 * @param archivaArtifactModel 064 */ 065 public void addArtifact( ArchivaArtifactModel archivaArtifactModel ) 066 { 067 getArtifacts().add( archivaArtifactModel ); 068 } //-- void addArtifact( ArchivaArtifactModel ) 069 070 /** 071 * Method addRepositoryMetadata. 072 * 073 * @param archivaRepositoryMetadata 074 */ 075 public void addRepositoryMetadata( ArchivaRepositoryMetadata archivaRepositoryMetadata ) 076 { 077 getRepositoryMetadata().add( archivaRepositoryMetadata ); 078 } //-- void addRepositoryMetadata( ArchivaRepositoryMetadata ) 079 080 /** 081 * Method getArtifacts. 082 * 083 * @return List 084 */ 085 public java.util.List<ArchivaArtifactModel> getArtifacts() 086 { 087 if ( this.artifacts == null ) 088 { 089 this.artifacts = new java.util.ArrayList<ArchivaArtifactModel>(); 090 } 091 092 return this.artifacts; 093 } //-- java.util.List<ArchivaArtifactModel> getArtifacts() 094 095 /** 096 * Get the modelEncoding field. 097 * 098 * @return String 099 */ 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}