1 package org.apache.archiva.metadata.repository.storage;
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 org.apache.archiva.metadata.repository.filter.Filter;
24 * @author Olivier Lamy
27 public class ReadMetadataRequest
29 private String repositoryId;
31 private String namespace;
33 private String projectId;
35 private String projectVersion;
37 private Filter<String> filter;
40 * define this request as a ui request to remove some constraints added for optimisations
43 private boolean browsingRequest;
45 public ReadMetadataRequest()
50 public ReadMetadataRequest( String repositoryId, String namespace, String projectId, String projectVersion )
52 this.repositoryId = repositoryId;
53 this.namespace = namespace;
54 this.projectId = projectId;
55 this.projectVersion = projectVersion;
58 public ReadMetadataRequest( String repositoryId, String namespace, String projectId, String projectVersion,
59 Filter<String> filter )
61 this( repositoryId, namespace, projectId, projectVersion );
65 public String getRepositoryId()
70 public void setRepositoryId( String repositoryId )
72 this.repositoryId = repositoryId;
75 public ReadMetadataRequest repositoryId( String repoId )
77 this.repositoryId = repoId;
81 public String getNamespace()
86 public void setNamespace( String namespace )
88 this.namespace = namespace;
91 public ReadMetadataRequest namespace( String namespace )
93 this.namespace = namespace;
97 public String getProjectId()
102 public void setProjectId( String projectId )
104 this.projectId = projectId;
107 public ReadMetadataRequest projectId( String projectId )
109 this.projectId = projectId;
113 public String getProjectVersion()
115 return projectVersion;
118 public void setProjectVersion( String projectVersion )
120 this.projectVersion = projectVersion;
123 public ReadMetadataRequest projectVersion( String projectVersion )
125 this.projectVersion = projectVersion;
129 public Filter<String> getFilter()
134 public void setFilter( Filter<String> filter )
136 this.filter = filter;
139 public ReadMetadataRequest filter( Filter<String> filter )
141 this.filter = filter;
145 public boolean isBrowsingRequest()
147 return browsingRequest;
150 public void setBrowsingRequest( boolean browsingRequest )
152 this.browsingRequest = browsingRequest;
155 public ReadMetadataRequest browsingRequest( boolean browsingRequest )
157 this.browsingRequest = browsingRequest;
162 public String toString()
164 final StringBuilder sb = new StringBuilder( "ReadMetadataRequest{" );
165 sb.append( "repositoryId='" ).append( repositoryId ).append( '\'' );
166 sb.append( ", namespace='" ).append( namespace ).append( '\'' );
167 sb.append( ", projectId='" ).append( projectId ).append( '\'' );
168 sb.append( ", projectVersion='" ).append( projectVersion ).append( '\'' );
169 sb.append( ", filter=" ).append( filter );
170 sb.append( ", browsingRequest=" ).append( browsingRequest );
172 return sb.toString();