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(
52        final FacesContext facesContext, final UIComponent uiComponent, final Class compClass) {
53      AjaxInternalUtils.checkParamValidity(facesContext, uiComponent, compClass);
54    }
55  
56    /**
57     * @deprecated Please use AjaxInternalUtils.encodeAjaxComponent() 
58     */
59    @Deprecated
60    public static void encodeAjaxComponent(final FacesContext facesContext, final UIComponent component)
61        throws IOException {
62      AjaxInternalUtils.encodeAjaxComponent(facesContext, component);
63    }
64  
65    /**
66     * @deprecated Please use AjaxInternalUtils.parseAndStoreComponents() 
67     */
68    @Deprecated
69    public static Map<String, UIComponent> parseAndStoreComponents(final FacesContext facesContext) {
70      return AjaxInternalUtils.parseAndStoreComponents(facesContext);
71    }
72  
73    /**
74     * @deprecated Please use AjaxInternalUtils.getAjaxComponents() 
75     */
76    @Deprecated
77    public static Map<String, UIComponent> getAjaxComponents(final FacesContext facesContext) {
78      return AjaxInternalUtils.getAjaxComponents(facesContext);
79    }
80  
81    /**
82     * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.isAjaxRequest() 
83     */
84    @Deprecated
85    public static boolean isAjaxRequest(final FacesContext facesContext) {
86      return org.apache.myfaces.tobago.ajax.AjaxUtils.isAjaxRequest(facesContext);
87    }
88  
89    /**
90     * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.removeAjaxComponent() 
91     */
92    @Deprecated
93    public static void removeAjaxComponent(final FacesContext facesContext, final String clientId) {
94      org.apache.myfaces.tobago.ajax.AjaxUtils.removeAjaxComponent(facesContext, clientId);
95    }
96  
97    /**
98     * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.addAjaxComponent() 
99     */
100   @Deprecated
101   public static void addAjaxComponent(final FacesContext facesContext, final String clientId) {
102     org.apache.myfaces.tobago.ajax.AjaxUtils.addAjaxComponent(facesContext, clientId);
103   }
104 
105   /**
106    * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.addAjaxComponent() 
107    */
108   @Deprecated
109   public static void addAjaxComponent(final FacesContext facesContext, final UIComponent component) {
110     org.apache.myfaces.tobago.ajax.AjaxUtils.addAjaxComponent(facesContext, component);
111   }
112 
113   /**
114    * @deprecated Please use org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils.ensureDecoded()
115    */
116   @Deprecated
117   public static void ensureDecoded(final FacesContext facesContext, final String clientId) {
118     AjaxInternalUtils.ensureDecoded(facesContext, clientId);
119   }
120 
121   /**
122    * @deprecated Please use org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils.ensureDecoded()
123    */
124   @Deprecated
125   public static void ensureDecoded(final FacesContext facesContext, final UIComponent component) {
126     AjaxInternalUtils.ensureDecoded(facesContext, component);
127   }
128 
129   /**
130    * @deprecated Please use org.apache.myfaces.tobago.internal.ajax.AjaxInternalUtils.encodeJavaScriptString()
131    */
132   @Deprecated
133   public static String encodeJavascriptString(final String value) {
134     return AjaxInternalUtils.encodeJavaScriptString(value);
135   }
136 
137   /**
138    * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.redirect
139    */
140   @Deprecated
141   public static boolean redirect(final FacesContext facesContext, final String url) throws IOException {
142     return org.apache.myfaces.tobago.ajax.AjaxUtils.redirect(facesContext, url);
143   }
144 
145   /**
146    * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.redirect
147    */
148   @Deprecated
149   public static void redirect(final HttpServletResponse response, final String url) throws IOException {
150     org.apache.myfaces.tobago.ajax.AjaxUtils.redirect(response, url);
151   }
152 
153   /**
154    * @deprecated Please use org.apache.myfaces.tobago.ajax.AjaxUtils.getRequestPartialIds
155    */
156   @Deprecated
157   public static Set<String> getRequestPartialIds(final FacesContext context) {
158     return org.apache.myfaces.tobago.ajax.AjaxUtils.getRequestPartialIds(context);
159   }
160 }