source: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRule.java @ 1217

Last change on this file since 1217 was 1217, checked in by adeicke, 11 years ago
  • Added proper formating and JavaDoc?.
  • Several renaming refactorings.
  • Property svn:mime-type set to text/plain
File size: 2.3 KB
Line 
1//   Copyright 2012 Georg-August-Universität Göttingen, Germany
2//
3//   Licensed under the Apache License, Version 2.0 (the "License");
4//   you may not use this file except in compliance with the License.
5//   You may obtain a copy of the License at
6//
7//       http://www.apache.org/licenses/LICENSE-2.0
8//
9//   Unless required by applicable law or agreed to in writing, software
10//   distributed under the License is distributed on an "AS IS" BASIS,
11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//   See the License for the specific language governing permissions and
13//   limitations under the License.
14
15package de.ugoe.cs.autoquest.usability.rules;
16
17import com.google.common.base.Optional;
18
19import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
20import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller;
21import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
22
23/**
24 * <p>
25 * A {@code UsabilityRule} is a abstract class, representing a usability guideline, metric
26 * interaction pattern etc., which should be checked during a automatic usability evaluation.
27 * </p>
28 *
29 * @author Alexander Deicke
30 */
31public abstract class UsabilityRule {
32
33    /**
34     * <p>
35     * {@link ITaskModel}, which is evaluated
36     * </p>
37     */
38    protected final ITaskModel taskModel;
39
40    /**
41     * <p>
42     * Name of the usability rule
43     * </p>
44     */
45    protected String name;
46
47    /**
48     * <p>
49     * Corresponding defect description.
50     * </p>
51     */
52    protected UsabilityProblemDescription defect;
53
54    /**
55     * <p>
56     * Constructor. Creates a new {@code UsabilityRule} for a given task model
57     * </p>
58     *
59     */
60    public UsabilityRule(ITaskModel taskModel) {
61        this.taskModel = taskModel;
62    }
63
64    /**
65     *
66     * <p>
67     * Calls the evaluation method of this {@code UsabilityRule}.
68     * </p>
69     *
70     * @param evaluationMethodCaller
71     *            helper class, which calls the evaluation method based on the type of the
72     *            {@code UsabilityRule}
73     * @return {@link UsabilityProblemDescription}, iff violation against usability rule was detected
74     */
75    public abstract Optional<UsabilityProblemDescription> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller);
76
77}
Note: See TracBrowser for help on using the repository browser.