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
21 import java.util.Collection;
24 * @author Olivier Lamy
26 public class IndexMergerRequest
29 * repositories Ids to merge content
31 private Collection<String> repositoriesIds;
34 * will generate a downloadable index
36 private boolean packIndex;
39 * original groupId (repositoryGroup id)
41 private String groupId;
43 private String mergedIndexPath = "/.indexer";
45 private int mergedIndexTtl;
47 public IndexMergerRequest( Collection<String> repositoriesIds, boolean packIndex, String groupId )
49 this.repositoriesIds = repositoriesIds;
50 this.packIndex = packIndex;
51 this.groupId = groupId;
57 public IndexMergerRequest(Collection<String> repositoriesIds, boolean packIndex, String groupId,
58 String mergedIndexPath, int mergedIndexTtl)
60 this.repositoriesIds = repositoriesIds;
61 this.packIndex = packIndex;
62 this.groupId = groupId;
63 this.mergedIndexPath = mergedIndexPath;
64 this.mergedIndexTtl = mergedIndexTtl;
67 public Collection<String> getRepositoriesIds()
69 return repositoriesIds;
72 public void setRepositoriesIds( Collection<String> repositoriesIds )
74 this.repositoriesIds = repositoriesIds;
77 public boolean isPackIndex()
82 public void setPackIndex( boolean packIndex )
84 this.packIndex = packIndex;
87 public String getGroupId()
92 public void setGroupId( String groupId )
94 this.groupId = groupId;
97 public String getMergedIndexPath()
99 return mergedIndexPath;
102 public void setMergedIndexPath( String mergedIndexPath )
104 this.mergedIndexPath = mergedIndexPath;
107 public int getMergedIndexTtl() {
108 return mergedIndexTtl;
111 public void setMergedIndexTtl(int mergedIndexTtl) {
112 this.mergedIndexTtl = mergedIndexTtl;
116 public String toString()
118 final StringBuilder sb = new StringBuilder( "IndexMergerRequest{" );
119 sb.append( "repositoriesIds=" ).append( repositoriesIds );
120 sb.append( ", packIndex=" ).append( packIndex );
121 sb.append( ", groupId='" ).append( groupId ).append( '\'' );
122 sb.append( ", mergedIndexPath='" ).append( mergedIndexPath ).append( '\'' );
123 sb.append( ", mergedIndexTtl='" ).append( mergedIndexTtl ).append( '\'' );
125 return sb.toString();