View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package org.apache.myfaces.tobago.ajax.api;
21  
22  
23  import org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils;
24  
25  import javax.faces.component.UIComponent;
26  import javax.faces.context.FacesContext;
27  import javax.servlet.http.HttpServletResponse;
28  import java.io.IOException;
29  import java.util.Map;
30  import java.util.Set;
31  
32  /**
33   * @deprecated since 1.5.0. 
34   */
35  @Deprecated
36  public class AjaxUtils {
37  
38    private AjaxUtils() {
39    }
40  
41    /**
42     * @deprecated
43     */
44    @Deprecated
45    public static final String AJAX_COMPONENTS = AjaxUtils.class.getName() + ".AJAX_COMPONENTS";
46  
47    /**
48     * @deprecated Please use AjaxInternalUtils.checkParamValidity() 
49     */
50    @Deprecated
51    public static void checkParamValidity(FacesContext facesContext, UIComponent uiComponent, Class compClass) {
52      AjaxInternalUtils.checkParamValidity(facesContext, uiComponent, compClass);
53    }
54  
55    /**
56     * @deprecated Please use AjaxInternalUtils.encodeAjaxComponent() 
57     */
58    @Deprecated
59    public static void encodeAjaxComponent(FacesContext facesContext, UIComponent component) throws IOException {
60      AjaxInternalUtils.encodeAjaxComponent(facesContext, component);
61    }
62  
63    /**
64     * @deprecated Please use AjaxInternalUtils.parseAndStoreComponents() 
65     */
66    @Deprecated
67    public static Map<String, UIComponent> parseAndStoreComponents(FacesContext facesContext) {
68      return AjaxInternalUtils.parseAndStoreComponents(facesContext);
69    }
70  
71    /**
72     * @deprecated Please use AjaxInternalUtils.getAjaxComponents() 
73     */
74    @Deprecated
75    public static Map<String, UIComponent> getAjaxComponents(FacesContext facesContext) {
76      return AjaxInternalUtils.getAjaxComponents(facesContext);
77    }
78  
79    /**
80     * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.isAjaxRequest() 
81     */
82    @Deprecated
83    public static boolean isAjaxRequest(FacesContext facesContext) {
84      return org.apache.myfaces.tobago.ajax.AjaxUtils.isAjaxRequest(facesContext);
85    }
86  
87    /**
88     * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.removeAjaxComponent() 
89     */
90    @Deprecated
91    public static void removeAjaxComponent(FacesContext facesContext, String clientId) {
92      org.apache.myfaces.tobago.ajax.AjaxUtils.removeAjaxComponent(facesContext, clientId);
93    }
94  
95    /**
96     * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.addAjaxComponent() 
97     */
98    @Deprecated
99    public static void addAjaxComponent(FacesContext facesContext, String clientId) {
100     org.apache.myfaces.tobago.ajax.AjaxUtils.addAjaxComponent(facesContext, clientId);
101   }
102 
103   /**
104    * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.addAjaxComponent() 
105    */
106   @Deprecated
107   public static void addAjaxComponent(FacesContext facesContext, UIComponent component) {
108     org.apache.myfaces.tobago.ajax.AjaxUtils.addAjaxComponent(facesContext, component);
109   }
110 
111   /**
112    * @deprecated Please use org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils.ensureDecoded()
113    */
114   @Deprecated
115   public static void ensureDecoded(FacesContext facesContext, String clientId) {
116     AjaxInternalUtils.ensureDecoded(facesContext, clientId);
117   }
118 
119   /**
120    * @deprecated Please use org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils.ensureDecoded()
121    */
122   @Deprecated
123   public static void ensureDecoded(FacesContext facesContext, UIComponent component) {
124     AjaxInternalUtils.ensureDecoded(facesContext, component);
125   }
126 
127   /**
128    * @deprecated Please use org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils.encodeJavaScriptString()
129    */
130   @Deprecated
131   public static String encodeJavascriptString(String value) {
132     return AjaxInternalUtils.encodeJavaScriptString(value);
133   }
134 
135   /**
136    * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.redirect
137    */
138   @Deprecated
139   public static boolean redirect(FacesContext facesContext, String url) throws IOException {
140     return org.apache.myfaces.tobago.ajax.AjaxUtils.redirect(facesContext, url);
141   }
142 
143   /**
144    * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.redirect
145    */
146   @Deprecated
147   public static void redirect(HttpServletResponse response, String url) throws IOException {
148     org.apache.myfaces.tobago.ajax.AjaxUtils.redirect(response, url);
149   }
150 
151   /**
152    * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.getRequestPartialIds
153    */
154   @Deprecated
155   public static Set<String> getRequestPartialIds(FacesContext context) {
156     return org.apache.myfaces.tobago.ajax.AjaxUtils.getRequestPartialIds(context);
157   }
158 }