Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
GraphPhaseEvent |
|
| 1.0;1 |
1 | package org.apache.maven.archiva.dependency.graph; | |
2 | ||
3 | /* | |
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 | |
11 | * | |
12 | * http://www.apache.org/licenses/LICENSE-2.0 | |
13 | * | |
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 | |
19 | * under the License. | |
20 | */ | |
21 | ||
22 | /** | |
23 | * GraphPhaseEvent | |
24 | * | |
25 | * @version $Id: GraphPhaseEvent.java 718864 2008-11-19 06:33:35Z brett $ | |
26 | */ | |
27 | public class GraphPhaseEvent | |
28 | { | |
29 | /** | |
30 | * Graph Phase Event Type - New Graph has been created. No tasks have been run yet. | |
31 | * NOTE: {{@link #getTask()} will be null for this type. | |
32 | */ | |
33 | public static final int GRAPH_NEW = 0; | |
34 | ||
35 | /** | |
36 | * Graph Phase Event Type - Graph Task is about to run. | |
37 | */ | |
38 | public static final int GRAPH_TASK_PRE = 1; | |
39 | ||
40 | /** | |
41 | * Graph Phase Event Type - Graph Task has finished. | |
42 | */ | |
43 | public static final int GRAPH_TASK_POST = 2; | |
44 | ||
45 | /** | |
46 | * Graph Phase Event Type - All Graph Tasks are done. | |
47 | * NOTE: {{@link #getTask()} will be null for this type. | |
48 | */ | |
49 | public static final int GRAPH_DONE = 10; | |
50 | ||
51 | private int type; | |
52 | ||
53 | private GraphTask task; | |
54 | ||
55 | private DependencyGraph graph; | |
56 | ||
57 | public GraphPhaseEvent( int type, GraphTask task, DependencyGraph graph ) | |
58 | 0 | { |
59 | 0 | this.type = type; |
60 | 0 | this.task = task; |
61 | 0 | this.graph = graph; |
62 | 0 | } |
63 | ||
64 | public DependencyGraph getGraph() | |
65 | { | |
66 | 0 | return graph; |
67 | } | |
68 | ||
69 | public GraphTask getTask() | |
70 | { | |
71 | 0 | return task; |
72 | } | |
73 | ||
74 | public int getType() | |
75 | { | |
76 | 0 | return type; |
77 | } | |
78 | } |