source: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/CommandHelpers.java @ 398

Last change on this file since 398 was 240, checked in by sherbold, 13 years ago
  • Property svn:mime-type set to text/plain
File size: 1.3 KB
RevLine 
[240]1package de.ugoe.cs.eventbench;
2
3import de.ugoe.cs.util.console.Console;
4
5/**
6 * <p>
7 * Helper class that collects methods that are often used by the commands.
8 * </p>
9 *
10 * @author Steffen Herbold
11 * @version 1.0
12 */
13public class CommandHelpers {
14
15        /**
16         * <p>
17         * Prints a message to error stream of the {@link Console} that an object
18         * has not been found in the storage.
19         * </p>
20         *
21         * @param objectName
22         *            name of the object
23         */
24        public static void objectNotFoundMessage(String objectName) {
25                Console.printerrln("Object " + objectName + " not found in storage.");
26        }
27
28        /**
29         * <p>
30         * Prints a message to the error stream of the {@link Console} that an
31         * object is not of an expected type.
32         * </p>
33         *
34         * @param objectName
35         *            name of the object
36         * @param type
37         *            expected type
38         */
39        public static void objectNotType(String objectName, String type) {
40                Console.printerrln("Object " + objectName + "not of type " + type + ".");
41        }
42
43        /**
44         * <p>
45         * Prints a message to the trace stream of the {@link Console} that an
46         * object in the storage has been overwritten.
47         * </p>
48         *
49         * @param objectName
50         */
51        public static void dataOverwritten(String objectName) {
52                Console.traceln("Existing object " + objectName + " overwritten.");
53        }
54}
Note: See TracBrowser for help on using the repository browser.