1 package org.apache.archiva.repository.base;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
23 import org.apache.archiva.repository.EditableManagedRepository;
24 import org.apache.archiva.repository.ManagedRepositoryContent;
25 import org.apache.archiva.repository.ReleaseScheme;
26 import org.apache.archiva.repository.RepositoryType;
27 import org.apache.archiva.repository.storage.RepositoryStorage;
29 import java.util.Collections;
30 import java.util.HashSet;
31 import java.util.Locale;
35 * Simple implementation of a managed repository.
37 public abstract class AbstractManagedRepository extends AbstractRepository implements EditableManagedRepository
39 private boolean blocksRedeployment = false;
40 private ManagedRepositoryContent content;
41 private Set<ReleaseScheme> activeReleaseSchemes = new HashSet<>( );
42 private Set<ReleaseScheme> uActiveReleaseSchemes = Collections.unmodifiableSet( activeReleaseSchemes );
44 public AbstractManagedRepository( RepositoryType type, String id, String name, RepositoryStorage storage)
46 super( type, id, name, storage );
49 public AbstractManagedRepository( Locale primaryLocale, RepositoryType type, String id, String name, RepositoryStorage storage )
51 super( primaryLocale, type, id, name, storage );
55 public ManagedRepositoryContent getContent( )
61 public void setContent( ManagedRepositoryContent content) {
62 this.content = content;
66 public void setBlocksRedeployment( boolean blocksRedeployment )
68 this.blocksRedeployment = blocksRedeployment;
72 public boolean blocksRedeployments( )
74 return blocksRedeployment;
78 public Set<ReleaseScheme> getActiveReleaseSchemes( )
80 return uActiveReleaseSchemes;
84 public void addActiveReleaseScheme( ReleaseScheme scheme )
86 this.activeReleaseSchemes.add(scheme);
90 public void removeActiveReleaseScheme( ReleaseScheme scheme )
92 this.activeReleaseSchemes.remove(scheme);
96 public void clearActiveReleaseSchemes( )
98 this.activeReleaseSchemes.clear();