Skip to content

Package: LayeredFileSystemProvider

LayeredFileSystemProvider

nameinstructionbranchcomplexitylinemethod
LayeredFileSystemProvider()
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getDelegates()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getFileSystem()
M: 0 C: 15
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 3
100%
M: 0 C: 1
100%
getFileSystemProvidersProvider()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setDelegates(List)
M: 0 C: 8
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
setFileSystemProvidersProvider(FileSystemProvidersProvider)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 0 C: 4
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*
2: * #%L
3: * *********************************************************************************************************************
4: *
5: * NorthernWind - lightweight CMS
6: * http://northernwind.tidalwave.it - git clone https://bitbucket.org/tidalwave/northernwind-src.git
7: * %%
8: * Copyright (C) 2011 - 2023 Tidalwave s.a.s. (http://tidalwave.it)
9: * %%
10: * *********************************************************************************************************************
11: *
12: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
13: * the License. You may obtain a copy of the License at
14: *
15: * http://www.apache.org/licenses/LICENSE-2.0
16: *
17: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
18: * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
19: * specific language governing permissions and limitations under the License.
20: *
21: * *********************************************************************************************************************
22: *
23: *
24: * *********************************************************************************************************************
25: * #L%
26: */
27: package it.tidalwave.northernwind.frontend.filesystem.basic.layered;
28:
29: import javax.annotation.Nonnull;
30: import java.util.ArrayList;
31: import java.util.List;
32: import it.tidalwave.northernwind.core.model.ResourceFileSystem;
33: import it.tidalwave.northernwind.core.model.ResourceFileSystemProvider;
34: import it.tidalwave.northernwind.frontend.filesystem.basic.FileSystemProvidersProvider;
35: import lombok.Getter;
36: import lombok.Setter;
37: import lombok.extern.slf4j.Slf4j;
38:
39: /***********************************************************************************************************************
40: *
41: * @author Fabrizio Giudici
42: *
43: **********************************************************************************************************************/
44: @Slf4j
45: public class LayeredFileSystemProvider implements ResourceFileSystemProvider
46: {
47: @Getter @Setter @Nonnull
48: List<ResourceFileSystemProvider> delegates = new ArrayList<>();
49:
50: @Getter @Setter
51: private FileSystemProvidersProvider fileSystemProvidersProvider;
52:
53: private ResourceFileSystem fileSystem;
54:
55: @Override @Nonnull
56: public ResourceFileSystem getFileSystem()
57: {
58:• if (fileSystem == null)
59: {
60: fileSystem = new LayeredResourceFileSystem(delegates, fileSystemProvidersProvider);
61: }
62:
63: return fileSystem;
64: }
65: }