123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- package org.apache.archiva.repository.base.managed;
-
- /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
- import org.apache.archiva.repository.EditableManagedRepository;
- import org.apache.archiva.repository.ManagedRepositoryContent;
- import org.apache.archiva.repository.ReleaseScheme;
- import org.apache.archiva.repository.RepositoryType;
- import org.apache.archiva.repository.base.AbstractRepository;
- import org.apache.archiva.repository.storage.RepositoryStorage;
-
- import java.util.Collections;
- import java.util.HashSet;
- import java.util.Locale;
- import java.util.Set;
-
- /**
- * Simple implementation of a managed repository.
- */
- public abstract class AbstractManagedRepository extends AbstractRepository implements EditableManagedRepository
- {
- private boolean blocksRedeployment = false;
- private ManagedRepositoryContent content;
- private Set<ReleaseScheme> activeReleaseSchemes = new HashSet<>( );
- private Set<ReleaseScheme> uActiveReleaseSchemes = Collections.unmodifiableSet( activeReleaseSchemes );
-
- public AbstractManagedRepository( RepositoryType type, String id, String name, RepositoryStorage storage)
- {
- super( type, id, name, storage );
- }
-
- public AbstractManagedRepository( Locale primaryLocale, RepositoryType type, String id, String name, RepositoryStorage storage )
- {
- super( primaryLocale, type, id, name, storage );
- }
-
- @Override
- public ManagedRepositoryContent getContent( )
- {
- return content;
- }
-
- @Override
- public void setContent( ManagedRepositoryContent content) {
- this.content = content;
- }
-
- @Override
- public void setBlocksRedeployment( boolean blocksRedeployment )
- {
- this.blocksRedeployment = blocksRedeployment;
- }
-
- @Override
- public boolean blocksRedeployments( )
- {
- return blocksRedeployment;
- }
-
- @Override
- public Set<ReleaseScheme> getActiveReleaseSchemes( )
- {
- return uActiveReleaseSchemes;
- }
-
- @Override
- public void addActiveReleaseScheme( ReleaseScheme scheme )
- {
- this.activeReleaseSchemes.add(scheme);
- }
-
- @Override
- public void removeActiveReleaseScheme( ReleaseScheme scheme )
- {
- this.activeReleaseSchemes.remove(scheme);
- }
-
- @Override
- public void clearActiveReleaseSchemes( )
- {
- this.activeReleaseSchemes.clear();
- }
-
-
- }
|