Examples of ClientInfo


Examples of org.apache.wicket.request.ClientInfo

   *
   * @return The client's time zone or null
   */
  protected TimeZone getClientTimeZone()
  {
    ClientInfo info = Session.get().getClientInfo();
    if (info instanceof WebClientInfo)
    {
      return ((WebClientInfo)info).getProperties().getTimeZone();
    }
    return null;
View Full Code Here

Examples of org.apache.wicket.request.ClientInfo

   *
   * @return The client's time zone or null
   */
  protected TimeZone getClientTimeZone()
  {
    ClientInfo info = Session.get().getClientInfo();
    if (info instanceof WebClientInfo)
    {
      return ((WebClientInfo)info).getProperties().getTimeZone();
    }
    return null;
View Full Code Here

Examples of org.apache.wicket.request.ClientInfo

      {
        ClientPropertiesBean propertiesBean = (ClientPropertiesBean)getModelObject();

        WebRequestCycle requestCycle = (WebRequestCycle)getRequestCycle();
        WebSession session = (WebSession)getSession();
        ClientInfo clientInfo = session.getClientInfo();

        if (clientInfo == null)
        {
          clientInfo = new WebClientInfo(requestCycle);
          getSession().setClientInfo(clientInfo);
View Full Code Here

Examples of org.apache.wicket.request.ClientInfo

    }
    setContinueTo(to);
    initComps();
    RequestCycle requestCycle = getRequestCycle();
    WebSession session = (WebSession)getSession();
    ClientInfo clientInfo = session.getClientInfo();
    if (clientInfo == null)
    {
      clientInfo = new WebClientInfo(requestCycle);
      getSession().setClientInfo(clientInfo);
    }
View Full Code Here

Examples of org.apache.wicket.request.ClientInfo

   *
   * @return The client's time zone or null
   */
  protected TimeZone getClientTimeZone()
  {
    ClientInfo info = Session.get().getClientInfo();
    if (info instanceof WebClientInfo)
    {
      return ((WebClientInfo)info).getProperties().getTimeZone();
    }
    return null;
View Full Code Here

Examples of org.eclipse.rap.rwt.client.service.ClientInfo

  @Test
  public void testHasClientInfoService() {
    TabrisClient client = new TabrisClientImpl();

    ClientInfo info = client.getService( ClientInfo.class );

    assertNotNull( info );
  }
View Full Code Here

Examples of org.eclipse.rap.rwt.client.service.ClientInfo

  @Test
  public void testClientInfoIsSingleton() {
    TabrisClient client = new TabrisClientImpl();

    ClientInfo info = client.getService( ClientInfo.class );

    assertSame( info, client.getService( ClientInfo.class ) );
  }
View Full Code Here

Examples of org.restlet.client.data.ClientInfo

     *            The preferred result media type.
     * @return The optional response entity.
     */
    protected Representation handle(Method method, Representation entity,
            MediaType mediaType) {
        return handle(method, entity, new ClientInfo(mediaType));
    }
View Full Code Here

Examples of org.restlet.data.ClientInfo

  protected int beforeHandle(Request request, Response response) {
    Form queryParams = request.getResourceRef().getQueryAsForm();
    String[] acceptValues = queryParams.getValuesArray(RequestHeaders.ACCEPT, true);

    if (acceptValues.length > 0) {
      ClientInfo clientInfo = request.getClientInfo();

      // Remove all existing media types, the parameter overrides them
      clientInfo.getAcceptedMediaTypes().clear();

      for (String value : acceptValues) {
        PreferenceReader.addMediaTypes(value, clientInfo);
      }
    }
View Full Code Here

Examples of org.restlet.data.ClientInfo

        String feature = (String) request.getAttributes().get("feature");

        Form form = request.getResourceRef().getQueryAsForm();
        String reqRaw = form.getFirstValue("raw");
       
        ClientInfo cliInfo = request.getClientInfo();
        String agent = null;
        if(cliInfo != null) {
            agent = cliInfo.getAgent();
        }
       
        boolean wantsRaw = (
                agent == null
                || cliInfo.getAgent().contains("Googlebot")
                || (reqRaw != null && Boolean.parseBoolean(reqRaw)) );
       
        // We only show the actual KML placemark to googlebot or users who append ?raw=true
        if ( ! wantsRaw ) {
            response.redirectSeeOther(feature+".html");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.