Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
LetterboxService |
|
| 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.examples.simple; | |
11 | ||
12 | import java.util.List; | |
13 | ||
14 | ||
15 | /** | |
16 | * A letterbox can be used to insert and collect letters. | |
17 | * @since 0.1.0 | |
18 | */ | |
19 | public interface LetterboxService { | |
20 | ||
21 | //---- Methods | |
22 | ||
23 | /** | |
24 | * Inserts a letter into this letterbox. | |
25 | * @param principal the principal executing this method. | |
26 | * @param letter a letter to insert. | |
27 | * @since 0.4.0 | |
28 | */ | |
29 | public void insertLetter (String principal, String letter) throws LetterboxException; | |
30 | ||
31 | /** | |
32 | * Collect and discharge all letters contained in this letterbox. | |
33 | * @param principal the principal executing this method. | |
34 | * @returns all letters contained in this letterbox. | |
35 | * @since 0.4.0 | |
36 | */ | |
37 | public List<String> collectLetters (String principal) throws LetterboxException; | |
38 | ||
39 | } |