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  */
16 package com.android.quicksearchbox;
17 
18 import android.content.ComponentName;
19 
20 /**
21  * A Suggestion that delegates all calls to other suggestions.
22  */
23 public abstract class AbstractSuggestionWrapper implements Suggestion {
24 
25     /**
26      * Gets the current suggestion.
27      */
current()28     protected abstract Suggestion current();
29 
getShortcutId()30     public String getShortcutId() {
31         return current().getShortcutId();
32     }
33 
getSuggestionFormat()34     public String getSuggestionFormat() {
35         return current().getSuggestionFormat();
36     }
37 
getSuggestionIcon1()38     public String getSuggestionIcon1() {
39         return current().getSuggestionIcon1();
40     }
41 
getSuggestionIcon2()42     public String getSuggestionIcon2() {
43         return current().getSuggestionIcon2();
44     }
45 
getSuggestionIntentAction()46     public String getSuggestionIntentAction() {
47         return current().getSuggestionIntentAction();
48     }
49 
getSuggestionIntentComponent()50     public ComponentName getSuggestionIntentComponent() {
51         return current().getSuggestionIntentComponent();
52     }
53 
getSuggestionIntentDataString()54     public String getSuggestionIntentDataString() {
55         return current().getSuggestionIntentDataString();
56     }
57 
getSuggestionIntentExtraData()58     public String getSuggestionIntentExtraData() {
59         return current().getSuggestionIntentExtraData();
60     }
61 
getSuggestionLogType()62     public String getSuggestionLogType() {
63         return current().getSuggestionLogType();
64     }
65 
getSuggestionQuery()66     public String getSuggestionQuery() {
67         return current().getSuggestionQuery();
68     }
69 
getSuggestionSource()70     public Source getSuggestionSource() {
71         return current().getSuggestionSource();
72     }
73 
getSuggestionText1()74     public String getSuggestionText1() {
75         return current().getSuggestionText1();
76     }
77 
getSuggestionText2()78     public String getSuggestionText2() {
79         return current().getSuggestionText2();
80     }
81 
getSuggestionText2Url()82     public String getSuggestionText2Url() {
83         return current().getSuggestionText2Url();
84     }
85 
isSpinnerWhileRefreshing()86     public boolean isSpinnerWhileRefreshing() {
87         return current().isSpinnerWhileRefreshing();
88     }
89 
isSuggestionShortcut()90     public boolean isSuggestionShortcut() {
91         return current().isSuggestionShortcut();
92     }
93 
isWebSearchSuggestion()94     public boolean isWebSearchSuggestion() {
95         return current().isWebSearchSuggestion();
96     }
97 
isHistorySuggestion()98     public boolean isHistorySuggestion() {
99         return current().isHistorySuggestion();
100     }
101 
getExtras()102     public SuggestionExtras getExtras() {
103         return current().getExtras();
104     }
105 
106 }
107