1 package org.apache.archiva.indexer.merger;
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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
22 import java.util.Collection;
25 * @author Olivier Lamy
27 public class IndexMergerRequest
30 * repositories Ids to merge content
32 private Collection<String> repositoriesIds;
35 * will generate a downloadable index
37 private boolean packIndex;
40 * original groupId (repositoryGroup id)
42 private String groupId;
44 private String mergedIndexPath = "/.indexer";
46 private int mergedIndexTtl;
48 private File mergedIndexDirectory;
50 public IndexMergerRequest( Collection<String> repositoriesIds, boolean packIndex, String groupId )
52 this.repositoriesIds = repositoriesIds;
53 this.packIndex = packIndex;
54 this.groupId = groupId;
60 public IndexMergerRequest( Collection<String> repositoriesIds, boolean packIndex, String groupId,
61 String mergedIndexPath, int mergedIndexTtl )
63 this.repositoriesIds = repositoriesIds;
64 this.packIndex = packIndex;
65 this.groupId = groupId;
66 this.mergedIndexPath = mergedIndexPath;
67 this.mergedIndexTtl = mergedIndexTtl;
70 public Collection<String> getRepositoriesIds()
72 return repositoriesIds;
75 public void setRepositoriesIds( Collection<String> repositoriesIds )
77 this.repositoriesIds = repositoriesIds;
80 public boolean isPackIndex()
85 public void setPackIndex( boolean packIndex )
87 this.packIndex = packIndex;
90 public String getGroupId()
95 public void setGroupId( String groupId )
97 this.groupId = groupId;
100 public String getMergedIndexPath()
102 return mergedIndexPath;
105 public void setMergedIndexPath( String mergedIndexPath )
107 this.mergedIndexPath = mergedIndexPath;
110 public int getMergedIndexTtl()
112 return mergedIndexTtl;
115 public void setMergedIndexTtl( int mergedIndexTtl )
117 this.mergedIndexTtl = mergedIndexTtl;
120 public File getMergedIndexDirectory()
122 return mergedIndexDirectory;
125 public void setMergedIndexDirectory( File mergedIndexDirectory )
127 this.mergedIndexDirectory = mergedIndexDirectory;
130 public IndexMergerRequest mergedIndexDirectory( File mergedIndexDirectory )
132 this.mergedIndexDirectory = mergedIndexDirectory;
138 public String toString()
140 final StringBuilder sb = new StringBuilder( "IndexMergerRequest{" );
141 sb.append( "repositoriesIds=" ).append( repositoriesIds );
142 sb.append( ", packIndex=" ).append( packIndex );
143 sb.append( ", groupId='" ).append( groupId ).append( '\'' );
144 sb.append( ", mergedIndexPath='" ).append( mergedIndexPath ).append( '\'' );
145 sb.append( ", mergedIndexTtl=" ).append( mergedIndexTtl );
146 sb.append( ", mergedIndexDirectory='" ).append( mergedIndexDirectory ).append( '\'' );
148 return sb.toString();