Codota Logo
HttpsMapper.getDesiredSchemeFor
Code IndexAdd Codota to your IDE (free)

How to use
getDesiredSchemeFor
method
in
org.apache.wicket.protocol.https.HttpsMapper

Best Java code snippets using org.apache.wicket.protocol.https.HttpsMapper.getDesiredSchemeFor (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.apache.wicket/wicket-core

/**
 * Figures out which {@link Scheme} should be used to access the request handler
 * 
 * @param handler
 *            request handler
 * @return {@link Scheme}
 */
protected Scheme getDesiredSchemeFor(IRequestHandler handler)
{
  if (handler instanceof IPageClassRequestHandler)
  {
    return getDesiredSchemeFor(((IPageClassRequestHandler)handler).getPageClass());
  }
  return Scheme.ANY;
}
origin: apache/wicket

/**
 * Figures out which {@link Scheme} should be used to access the request handler
 * 
 * @param handler
 *            request handler
 * @return {@link Scheme}
 */
protected Scheme getDesiredSchemeFor(IRequestHandler handler)
{
  if (handler instanceof IPageClassRequestHandler)
  {
    return getDesiredSchemeFor(((IPageClassRequestHandler)handler).getPageClass());
  }
  return Scheme.ANY;
}
origin: de.alpharogroup/jaulp-wicket-base

  @Override
  protected Scheme getDesiredSchemeFor(final Class<? extends IRequestablePage> pageClass)
  {
    if (application.getConfigurationType().equals(RuntimeConfigurationType.DEVELOPMENT))
    {
      // is in development mode, returning Scheme.HTTP...
      return Scheme.HTTP;
    }
    else
    {
      // not in development mode, letting the mapper decide
      return super.getDesiredSchemeFor(pageClass);
    }
  }
});
origin: org.apache.wicket/wicket-core

@Override
public final IRequestHandler mapRequest(Request request)
{
  IRequestHandler handler = delegate.mapRequest(request);
  Scheme desired = getDesiredSchemeFor(handler);
  Scheme current = getSchemeOf(request);
  if (!desired.isCompatibleWith(current))
  {
    // we are currently on the wrong scheme for this handler
    // construct a url for the handler on the correct scheme
    String url = createRedirectUrl(handler, request, desired);
    // replace handler with one that will redirect to the created url
    handler = createRedirectHandler(url);
  }
  return handler;
}
origin: apache/wicket

@Override
public final IRequestHandler mapRequest(Request request)
{
  IRequestHandler handler = delegate.mapRequest(request);
  Scheme desired = getDesiredSchemeFor(handler);
  Scheme current = getSchemeOf(request);
  if (!desired.isCompatibleWith(current))
  {
    // we are currently on the wrong scheme for this handler
    // construct a url for the handler on the correct scheme
    String url = createRedirectUrl(handler, request, desired);
    // replace handler with one that will redirect to the created url
    handler = createRedirectHandler(url);
  }
  return handler;
}
origin: apache/wicket

/**
 * Creates a url for the handler. Modifies it with the correct {@link Scheme} if necessary.
 * 
 * @param handler
 * @param request
 * @return url
 */
final Url mapHandler(IRequestHandler handler, Request request)
{
  Url url = delegate.mapHandler(handler);
  Scheme desired = getDesiredSchemeFor(handler);
  Scheme current = getSchemeOf(request);
  if (!desired.isCompatibleWith(current))
  {
    // the generated url does not have the correct scheme, set it (which in turn will cause
    // the url to be rendered in its full representation)
    url.setProtocol(desired.urlName());
    url.setPort(desired.getPort(config));
  }
  return url;
}
origin: org.apache.wicket/wicket-core

/**
 * Creates a url for the handler. Modifies it with the correct {@link Scheme} if necessary.
 * 
 * @param handler
 * @param request
 * @return url
 */
final Url mapHandler(IRequestHandler handler, Request request)
{
  Url url = delegate.mapHandler(handler);
  Scheme desired = getDesiredSchemeFor(handler);
  Scheme current = getSchemeOf(request);
  if (!desired.isCompatibleWith(current))
  {
    // the generated url does not have the correct scheme, set it (which in turn will cause
    // the url to be rendered in its full representation)
    url.setProtocol(desired.urlName());
    url.setPort(desired.getPort(config));
  }
  return url;
}
org.apache.wicket.protocol.httpsHttpsMappergetDesiredSchemeFor

Javadoc

Determines which Scheme should be used to access the page

Popular methods of HttpsMapper

  • <init>
    Constructor
  • getSchemeOf
    Determines the Scheme of the request
  • createRedirectHandler
    Creates the IRequestHandler that will be responsible for the redirect
  • createRedirectUrl
    Constructs a redirect url that should switch the user to the specified scheme
  • hasSecureAnnotation
    Checks if the specified type has the RequireHttps annotation
  • mapHandler
    Creates a url for the handler. Modifies it with the correct Scheme if necessary.

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now