[1138] | 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 |
|
---|
| 15 | package de.ugoe.cs.autoquest.usability.rules;
|
---|
| 16 |
|
---|
| 17 | import com.google.common.base.Optional;
|
---|
| 18 |
|
---|
[1152] | 19 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
|
---|
[1150] | 20 | import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller;
|
---|
[1217] | 21 | import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
|
---|
[1138] | 22 |
|
---|
| 23 | /**
|
---|
| 24 | * <p>
|
---|
[1217] | 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.
|
---|
[1138] | 27 | * </p>
|
---|
| 28 | *
|
---|
| 29 | * @author Alexander Deicke
|
---|
| 30 | */
|
---|
| 31 | public abstract class UsabilityRule {
|
---|
[1217] | 32 |
|
---|
| 33 | /**
|
---|
| 34 | * <p>
|
---|
| 35 | * {@link ITaskModel}, which is evaluated
|
---|
| 36 | * </p>
|
---|
| 37 | */
|
---|
[1152] | 38 | protected final ITaskModel taskModel;
|
---|
[1217] | 39 |
|
---|
| 40 | /**
|
---|
| 41 | * <p>
|
---|
| 42 | * Name of the usability rule
|
---|
| 43 | * </p>
|
---|
| 44 | */
|
---|
[1138] | 45 | protected String name;
|
---|
[1217] | 46 |
|
---|
[1138] | 47 | /**
|
---|
| 48 | * <p>
|
---|
[1217] | 49 | * Corresponding defect description.
|
---|
[1138] | 50 | * </p>
|
---|
| 51 | */
|
---|
[1217] | 52 | protected UsabilityProblemDescription defect;
|
---|
| 53 |
|
---|
| 54 | /**
|
---|
| 55 | * <p>
|
---|
| 56 | * Constructor. Creates a new {@code UsabilityRule} for a given task model
|
---|
| 57 | * </p>
|
---|
| 58 | *
|
---|
| 59 | */
|
---|
[1152] | 60 | public UsabilityRule(ITaskModel taskModel) {
|
---|
| 61 | this.taskModel = taskModel;
|
---|
[1138] | 62 | }
|
---|
| 63 |
|
---|
[1217] | 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 |
|
---|
[1138] | 77 | }
|
---|