001    package org.apache.archiva.metadata.repository.storage;
002    /*
003     * Licensed to the Apache Software Foundation (ASF) under one
004     * or more contributor license agreements.  See the NOTICE file
005     * distributed with this work for additional information
006     * regarding copyright ownership.  The ASF licenses this file
007     * to you under the Apache License, Version 2.0 (the
008     * "License"); you may not use this file except in compliance
009     * with the License.  You may obtain a copy of the License at
010     *
011     *   http://www.apache.org/licenses/LICENSE-2.0
012     *
013     * Unless required by applicable law or agreed to in writing,
014     * software distributed under the License is distributed on an
015     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016     * KIND, either express or implied.  See the License for the
017     * specific language governing permissions and limitations
018     * under the License.
019     */
020    
021    import org.apache.archiva.metadata.repository.filter.Filter;
022    
023    /**
024     * @author Olivier Lamy
025     * @since 1.4-M4
026     */
027    public class ReadMetadataRequest
028    {
029        private String repositoryId;
030    
031        private String namespace;
032    
033        private String projectId;
034    
035        private String projectVersion;
036    
037        private Filter<String> filter;
038    
039        public ReadMetadataRequest()
040        {
041            // no op
042        }
043    
044        public ReadMetadataRequest( String repositoryId, String namespace, String projectId, String projectVersion )
045        {
046            this.repositoryId = repositoryId;
047            this.namespace = namespace;
048            this.projectId = projectId;
049            this.projectVersion = projectVersion;
050        }
051    
052        public ReadMetadataRequest( String repositoryId, String namespace, String projectId, String projectVersion,
053                                    Filter<String> filter )
054        {
055            this( repositoryId, namespace, projectId, projectVersion );
056            this.filter = filter;
057        }
058    
059        public String getRepositoryId()
060        {
061            return repositoryId;
062        }
063    
064        public void setRepositoryId( String repositoryId )
065        {
066            this.repositoryId = repositoryId;
067        }
068    
069        public ReadMetadataRequest repositoryId( String repoId )
070        {
071            this.repositoryId = repoId;
072            return this;
073        }
074    
075        public String getNamespace()
076        {
077            return namespace;
078        }
079    
080        public void setNamespace( String namespace )
081        {
082            this.namespace = namespace;
083        }
084    
085        public ReadMetadataRequest namespace( String namespace )
086        {
087            this.namespace = namespace;
088            return this;
089        }
090    
091        public String getProjectId()
092        {
093            return projectId;
094        }
095    
096        public void setProjectId( String projectId )
097        {
098            this.projectId = projectId;
099        }
100    
101        public ReadMetadataRequest projectId( String projectId )
102        {
103            this.projectId = projectId;
104            return this;
105        }
106    
107        public String getProjectVersion()
108        {
109            return projectVersion;
110        }
111    
112        public void setProjectVersion( String projectVersion )
113        {
114            this.projectVersion = projectVersion;
115        }
116    
117        public ReadMetadataRequest projectVersion( String projectVersion )
118        {
119            this.projectVersion = projectVersion;
120            return this;
121        }
122    
123        public Filter<String> getFilter()
124        {
125            return filter;
126        }
127    
128        public void setFilter( Filter<String> filter )
129        {
130            this.filter = filter;
131        }
132    
133        public ReadMetadataRequest filter( Filter<String> filter )
134        {
135            this.filter = filter;
136            return this;
137        }
138    }