1/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package com.android.quicksearchbox;
17
18import android.content.ComponentName;
19
20/**
21 * A Suggestion that delegates all calls to other suggestions.
22 */
23public abstract class AbstractSuggestionWrapper implements Suggestion {
24
25    /**
26     * Gets the current suggestion.
27     */
28    protected abstract Suggestion current();
29
30    public String getShortcutId() {
31        return current().getShortcutId();
32    }
33
34    public String getSuggestionFormat() {
35        return current().getSuggestionFormat();
36    }
37
38    public String getSuggestionIcon1() {
39        return current().getSuggestionIcon1();
40    }
41
42    public String getSuggestionIcon2() {
43        return current().getSuggestionIcon2();
44    }
45
46    public String getSuggestionIntentAction() {
47        return current().getSuggestionIntentAction();
48    }
49
50    public ComponentName getSuggestionIntentComponent() {
51        return current().getSuggestionIntentComponent();
52    }
53
54    public String getSuggestionIntentDataString() {
55        return current().getSuggestionIntentDataString();
56    }
57
58    public String getSuggestionIntentExtraData() {
59        return current().getSuggestionIntentExtraData();
60    }
61
62    public String getSuggestionLogType() {
63        return current().getSuggestionLogType();
64    }
65
66    public String getSuggestionQuery() {
67        return current().getSuggestionQuery();
68    }
69
70    public Source getSuggestionSource() {
71        return current().getSuggestionSource();
72    }
73
74    public String getSuggestionText1() {
75        return current().getSuggestionText1();
76    }
77
78    public String getSuggestionText2() {
79        return current().getSuggestionText2();
80    }
81
82    public String getSuggestionText2Url() {
83        return current().getSuggestionText2Url();
84    }
85
86    public boolean isSpinnerWhileRefreshing() {
87        return current().isSpinnerWhileRefreshing();
88    }
89
90    public boolean isSuggestionShortcut() {
91        return current().isSuggestionShortcut();
92    }
93
94    public boolean isWebSearchSuggestion() {
95        return current().isWebSearchSuggestion();
96    }
97
98    public boolean isHistorySuggestion() {
99        return current().isHistorySuggestion();
100    }
101
102    public SuggestionExtras getExtras() {
103        return current().getExtras();
104    }
105
106}
107