This project has retired. For details please refer to its
Attic page.
AbstractManagedRepository xref
1 package org.apache.archiva.repository;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import java.nio.file.Path;
24 import java.util.Collections;
25 import java.util.HashSet;
26 import java.util.Locale;
27 import java.util.Set;
28
29
30
31
32 public abstract class AbstractManagedRepository extends AbstractRepository implements EditableManagedRepository
33 {
34 private boolean blocksRedeployment = false;
35 private ManagedRepositoryContent content;
36 private Set<ReleaseScheme> activeReleaseSchemes = new HashSet<>( );
37 private Set<ReleaseScheme> uActiveReleaseSchemes = Collections.unmodifiableSet( activeReleaseSchemes );
38
39 public AbstractManagedRepository( RepositoryType type, String id, String name, Path basePath )
40 {
41 super( type, id, name, basePath );
42 }
43
44 public AbstractManagedRepository( Locale primaryLocale, RepositoryType type, String id, String name, Path basePath )
45 {
46 super( primaryLocale, type, id, name, basePath );
47 }
48
49 @Override
50 public ManagedRepositoryContent getContent( )
51 {
52 return content;
53 }
54
55 @Override
56 public void setContent(ManagedRepositoryContent content) {
57 this.content = content;
58 }
59
60 @Override
61 public void setBlocksRedeployment( boolean blocksRedeployment )
62 {
63 this.blocksRedeployment = blocksRedeployment;
64 }
65
66 @Override
67 public boolean blocksRedeployments( )
68 {
69 return blocksRedeployment;
70 }
71
72 @Override
73 public Set<ReleaseScheme> getActiveReleaseSchemes( )
74 {
75 return uActiveReleaseSchemes;
76 }
77
78 @Override
79 public void addActiveReleaseScheme( ReleaseScheme scheme )
80 {
81 this.activeReleaseSchemes.add(scheme);
82 }
83
84 @Override
85 public void removeActiveReleaseScheme( ReleaseScheme scheme )
86 {
87 this.activeReleaseSchemes.remove(scheme);
88 }
89
90 @Override
91 public void clearActiveReleaseSchemes( )
92 {
93 this.activeReleaseSchemes.clear();
94 }
95 }