Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Target |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright (c) 2009, Swiss Federal Department of Defence Civil Protection and Sport | |
3 | * (http://www.vbs.admin.ch) | |
4 | * Copyright (c) 2009, Ergon Informatik AG (http://www.ergon.ch) | |
5 | * All rights reserved. | |
6 | * | |
7 | * Licensed under the Open Permis License which accompanies this distribution, | |
8 | * and is available at http://www.openpermis.org/BSDlicenceKent.txt | |
9 | */ | |
10 | package org.openpermis.policy; | |
11 | ||
12 | import java.net.URI; | |
13 | import java.util.List; | |
14 | ||
15 | ||
16 | /** | |
17 | * A target combines a resource or a set of resources to be protected with a set | |
18 | * of actions that are possible on these resources. | |
19 | * @since 0.1.0 | |
20 | */ | |
21 | public interface Target | |
22 | extends Part | |
23 | { | |
24 | ||
25 | //---- Methods | |
26 | ||
27 | /** | |
28 | * Returns the action which matches the given resource/action combination of this target, | |
29 | * <code>null</code> if no such action exists. | |
30 | * @param resourceUri the {@link URI} of the resource for which look in the resource domain. | |
31 | * @param actionName the name of the action for which to look in this target. | |
32 | * @param arguments an optional map of arguments to the action. | |
33 | * @return the {@link Action} if exists, <code>null</code> otherwise. | |
34 | * @since 0.1.0 | |
35 | */ | |
36 | Action findAction (URI resourceUri, String actionName, List<?> arguments); | |
37 | ||
38 | } |