congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HttpsMapper.hasSecureAnnotation
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.apache.wicket/wicket-core

/**
 * Checks if the specified {@code type} has the {@link RequireHttps} annotation
 * 
 * @param type
 * @return {@code true} iff {@code type} has the {@link RequireHttps} annotation
 */
private boolean hasSecureAnnotation(Class<?> type)
{
  if (type.getAnnotation(RequireHttps.class) != null)
  {
    return true;
  }
  for (Class<?> iface : type.getInterfaces())
  {
    if (hasSecureAnnotation(iface))
    {
      return true;
    }
  }
  if (type.getSuperclass() != null)
  {
    return hasSecureAnnotation(type.getSuperclass());
  }
  return false;
}
origin: apache/wicket

/**
 * Checks if the specified {@code type} has the {@link RequireHttps} annotation
 * 
 * @param type
 * @return {@code true} iff {@code type} has the {@link RequireHttps} annotation
 */
private boolean hasSecureAnnotation(Class<?> type)
{
  if (type.getAnnotation(RequireHttps.class) != null)
  {
    return true;
  }
  for (Class<?> iface : type.getInterfaces())
  {
    if (hasSecureAnnotation(iface))
    {
      return true;
    }
  }
  if (type.getSuperclass() != null)
  {
    return hasSecureAnnotation(type.getSuperclass());
  }
  return false;
}
origin: apache/wicket

/**
 * Determines which {@link Scheme} should be used to access the page
 * 
 * @param pageClass
 *            type of page
 * @return {@link Scheme}
 */
protected Scheme getDesiredSchemeFor(Class<? extends IRequestablePage> pageClass)
{
  if (pageClass == null)
  {
    return Scheme.ANY;
  }
  Scheme SCHEME = cache.get(pageClass);
  if (SCHEME == null)
  {
    if (hasSecureAnnotation(pageClass))
    {
      SCHEME = Scheme.HTTPS;
    }
    else
    {
      SCHEME = Scheme.HTTP;
    }
    cache.put(pageClass, SCHEME);
  }
  return SCHEME;
}
origin: org.apache.wicket/wicket-core

/**
 * Determines which {@link Scheme} should be used to access the page
 * 
 * @param pageClass
 *            type of page
 * @return {@link Scheme}
 */
protected Scheme getDesiredSchemeFor(Class<? extends IRequestablePage> pageClass)
{
  if (pageClass == null)
  {
    return Scheme.ANY;
  }
  Scheme SCHEME = cache.get(pageClass);
  if (SCHEME == null)
  {
    if (hasSecureAnnotation(pageClass))
    {
      SCHEME = Scheme.HTTPS;
    }
    else
    {
      SCHEME = Scheme.HTTP;
    }
    cache.put(pageClass, SCHEME);
  }
  return SCHEME;
}
org.apache.wicket.protocol.httpsHttpsMapperhasSecureAnnotation

Javadoc

Checks if the specified type has the RequireHttps annotation

Popular methods of HttpsMapper

  • <init>
    Constructor
  • getDesiredSchemeFor
    Figures out which Scheme should be used to access the request handler
  • 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
  • mapHandler
    Creates a url for the handler. Modifies it with the correct Scheme if necessary.

Popular in Java

  • Running tasks concurrently on multiple threads
  • getContentResolver (Context)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JButton (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now