blob: 0157543cce341ddb983e80bf3b2eb66f0cf1f942 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.pagetemplates.model;
import com.yahoo.component.provider.FreezableClass;
/**
* Abstract superclass of various kinds of choices.
*
* @author bratseth
*/
public abstract class AbstractChoice extends FreezableClass implements PageElement {
private String method;
/**
* Returns the choice method to use - a string interpreted by the resolver in use,
* or null to use any available method
*/
public String getMethod() { return method; }
public void setMethod(String method) {
ensureNotFrozen();
this.method=method;
}
// TODO: is this really choices between classes in general, or e.g. subclasses of Section?
/** Returns true if this choice is (partially or completely) a choice between the given type */
@SuppressWarnings("rawtypes")
public abstract boolean isChoiceBetween(Class pageTemplateModelClass);
}
|