Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
AbstractEngine |
|
| 1.0;1 |
1 | /** | |
2 | * Licensed to the Apache Software Foundation (ASF) under one | |
3 | * or more contributor license agreements. See the NOTICE file | |
4 | * distributed with this work for additional information | |
5 | * regarding copyright ownership. The ASF licenses this file | |
6 | * to you under the Apache License, Version 2.0 (the | |
7 | * "License"); you may not use this file except in compliance | |
8 | * with the License. You may obtain a copy of the License at | |
9 | * | |
10 | * http://www.apache.org/licenses/LICENSE-2.0 | |
11 | * | |
12 | * Unless required by applicable law or agreed to in writing, | |
13 | * software distributed under the License is distributed on an | |
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
15 | * KIND, either express or implied. See the License for the | |
16 | * specific language governing permissions and limitations | |
17 | * under the License. | |
18 | */ | |
19 | package org.apache.creadur.whisker.app; | |
20 | ||
21 | import java.util.Collection; | |
22 | ||
23 | import org.apache.creadur.whisker.app.analysis.LicenseAnalyst; | |
24 | import org.apache.creadur.whisker.model.Descriptor; | |
25 | import org.apache.creadur.whisker.scan.Directory; | |
26 | ||
27 | /** | |
28 | * A pluggable template. | |
29 | */ | |
30 | 0 | public abstract class AbstractEngine { |
31 | ||
32 | /** | |
33 | * Writes templates to help create meta-data. | |
34 | * @param withBase from this base, not null | |
35 | * @param writerFactory not null | |
36 | * @param configuration not null | |
37 | * @return this | |
38 | * @throws Exception when creation fails | |
39 | */ | |
40 | public abstract AbstractEngine skeleton( | |
41 | Collection<Directory> withBase, | |
42 | ResultWriterFactory writerFactory, Configuration configuration) throws Exception; | |
43 | ||
44 | /** | |
45 | * Reports validations. | |
46 | * @param analyst not null | |
47 | * @param writerFactory not null | |
48 | * @param configuration not null | |
49 | * @return not null | |
50 | * @throws Exception when report creation fails | |
51 | */ | |
52 | public abstract AbstractEngine validate(LicenseAnalyst analyst, | |
53 | ResultWriterFactory writerFactory, Configuration configuration) throws Exception; | |
54 | ||
55 | /** | |
56 | * Writes a report describing the directories present. | |
57 | * @param directories not null | |
58 | * @param writerFactory not null | |
59 | * @param configuration not null | |
60 | * @return this | |
61 | * @throws Exception when report creation fails | |
62 | */ | |
63 | public abstract AbstractEngine report( | |
64 | final Collection<Directory> directories, | |
65 | ResultWriterFactory writerFactory, Configuration configuration) throws Exception; | |
66 | ||
67 | /** | |
68 | * Writes legal documents. | |
69 | * @param work not null | |
70 | * @param writerFactory not null | |
71 | * @param configuration not null | |
72 | * @return this | |
73 | * @throws Exception when report creation fails | |
74 | */ | |
75 | public abstract AbstractEngine generate(final Descriptor work, | |
76 | ResultWriterFactory writerFactory, Configuration configuration) throws Exception; | |
77 | ||
78 | } |