Codota Logo
Metadata.setLeadingSlash
Code IndexAdd Codota to your IDE (free)

How to use
setLeadingSlash
method
in
com.ocpsoft.pretty.faces.url.Metadata

Best Java code snippets using com.ocpsoft.pretty.faces.url.Metadata.setLeadingSlash (Showing top 10 results out of 315)

  • Common ways to obtain Metadata
private void myMethod () {
Metadata m =
  • Codota Iconnew Metadata()
  • Smart code suggestions by Codota
}
origin: ocpsoft/rewrite

/**
* Create a URL object for the given url String. The input string must not yet have been decoded.
* 
* @param url The raw, un-decoded url String
*/
public URL(String url)
{
 if (url != null)
 {
   url = url.trim();
   originalURL = url;
   if (StringUtils.hasLeadingSlash(url))
   {
    metadata.setLeadingSlash(true);
    url = url.substring(1);
   }
   if (StringUtils.hasTrailingSlash(url))
   {
    metadata.setTrailingSlash(true);
    url = url.substring(0, url.length() - 1);
   }
   this.segments = Arrays.asList(StringUtils.splitBySlash(url));
 }
 else
 {
   throw new IllegalArgumentException("URL cannot be null.");
 }
}
origin: ocpsoft/prettyfaces

/**
* Create a URL object for the given url String. The input string must not yet have been decoded.
* 
* @param url The raw, un-decoded url String
*/
public URL(String url)
{
 if (url != null)
 {
   url =url.trim();
   originalURL = url;
   if (StringUtils.hasLeadingSlash(url))
   {
    metadata.setLeadingSlash(true);
    url = url.substring(1);
   }
   if (StringUtils.hasTrailingSlash(url))
   {
    metadata.setTrailingSlash(true);
    url = url.substring(0, url.length() - 1);
   }
   this.segments = Arrays.asList(StringUtils.splitBySlash(url));
 }
 else
 {
   throw new IllegalArgumentException("URL cannot be null.");
 }
}
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Return a copy of this Metadata
*/
public Metadata copy()
{
 Metadata result = new Metadata();
 result.setEncoding(encoding);
 result.setTrailingSlash(trailingSlash);
 result.setLeadingSlash(leadingSlash);
 return result;
}
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Create a URL object for the given url String. The input string must not yet have been decoded.
* 
* @param url The raw, un-decoded url String
*/
public URL(String url)
{
 if (url != null)
 {
   url =url.trim();
   originalURL = url;
   if (StringUtils.hasLeadingSlash(url))
   {
    metadata.setLeadingSlash(true);
    url = url.substring(1);
   }
   if (StringUtils.hasTrailingSlash(url))
   {
    metadata.setTrailingSlash(true);
    url = url.substring(0, url.length() - 1);
   }
   this.segments = Arrays.asList(StringUtils.splitBySlash(url));
 }
 else
 {
   throw new IllegalArgumentException("URL cannot be null.");
 }
}
origin: ocpsoft/prettyfaces

/**
* Create a URL object for the given url String. The input string must not yet have been decoded.
* 
* @param url The raw, un-decoded url String
*/
public URL(String url)
{
 if (url != null)
 {
   url =url.trim();
   originalURL = url;
   if (StringUtils.hasLeadingSlash(url))
   {
    metadata.setLeadingSlash(true);
    url = url.substring(1);
   }
   if (StringUtils.hasTrailingSlash(url))
   {
    metadata.setTrailingSlash(true);
    url = url.substring(0, url.length() - 1);
   }
   this.segments = Arrays.asList(StringUtils.splitBySlash(url));
 }
 else
 {
   throw new IllegalArgumentException("URL cannot be null.");
 }
}
origin: ocpsoft/rewrite

/**
* Return a copy of this Metadata
*/
public Metadata copy()
{
 Metadata result = new Metadata();
 result.setEncoding(encoding);
 result.setTrailingSlash(trailingSlash);
 result.setLeadingSlash(leadingSlash);
 return result;
}
origin: ocpsoft/prettyfaces

/**
* Return a copy of this Metadata
*/
public Metadata copy()
{
 Metadata result = new Metadata();
 result.setEncoding(encoding);
 result.setTrailingSlash(trailingSlash);
 result.setLeadingSlash(leadingSlash);
 return result;
}
origin: ocpsoft/prettyfaces

/**
* Return a copy of this Metadata
*/
public Metadata copy()
{
 Metadata result = new Metadata();
 result.setEncoding(encoding);
 result.setTrailingSlash(trailingSlash);
 result.setLeadingSlash(leadingSlash);
 return result;
}
origin: ocpsoft/rewrite

url.getMetadata().setLeadingSlash(true);
QueryString qs = QueryString.build("");
if (viewId.contains("?"))
origin: com.ocpsoft/prettyfaces-jsf2

url.getMetadata().setLeadingSlash(true);
QueryString qs = QueryString.build("");
if (viewId.contains("?"))
com.ocpsoft.pretty.faces.urlMetadatasetLeadingSlash

Popular methods of Metadata

  • <init>
  • buildURLFromSegments
  • copy
    Return a copy of this Metadata
  • getEncoding
  • hasLeadingSlash
  • hasTrailingSlash
  • setEncoding
  • setTrailingSlash

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
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