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

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

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

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: com.ocpsoft/prettyfaces-jsf2

/**
* Create a URL object for the given url segments (separated by '/' from the original url string), using the given
* metadata object to represent the encoding and leading/trailing slash information about this URL.
*/
public URL(final List<String> segments, final Metadata metadata)
{
 this.metadata = metadata;
 this.segments = segments;
 this.originalURL = metadata.buildURLFromSegments(segments);
}
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Get the character encoding of this URL (default UTF-8)
*/
public String getEncoding()
{
 return metadata.getEncoding();
}
origin: com.ocpsoft/prettyfaces-jsf2

public String buildURLFromSegments(final List<String> segments)
{
 StringBuilder result = new StringBuilder();
 if (hasLeadingSlash())
 {
   result.append("/");
 }
 for (Iterator<String> iter = segments.iterator(); iter.hasNext();)
 {
   String segment = iter.next();
   result.append(segment);
   if (iter.hasNext())
   {
    result.append("/");
   }
 }
 if (hasTrailingSlash())
 {
   result.append("/");
 }
 return result.toString();
}
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: com.ocpsoft/prettyfaces-jsf2

/**
* Return true if this URL ends with '/'
*/
public boolean hasTrailingSlash()
{
 return metadata.hasTrailingSlash();
}
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Set the character encoding of this URL (default UTF-8)
*/
public void setEncoding(final String encoding)
{
 metadata.setEncoding(encoding);
}
origin: ocpsoft/rewrite

/**
* Return true if this URL begins with '/'
*/
public boolean hasLeadingSlash()
{
 return metadata.hasLeadingSlash();
}
origin: com.ocpsoft/prettyfaces-jsf2

urlPattern = new URL(regexSegments, segmentedPattern.getMetadata().copy());
if (elPattern) {
  urlElPattern = Pattern.compile(urlPattern.toURL());
origin: com.ocpsoft/prettyfaces-jsf2

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

public String buildURLFromSegments(final List<String> segments)
{
 StringBuilder result = new StringBuilder();
 if (hasLeadingSlash())
 {
   result.append("/");
 }
 for (Iterator<String> iter = segments.iterator(); iter.hasNext();)
 {
   String segment = iter.next();
   result.append(segment);
   if (iter.hasNext())
   {
    result.append("/");
   }
 }
 if (hasTrailingSlash())
 {
   result.append("/");
 }
 return result.toString();
}
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

/**
* Return true if this URL ends with '/'
*/
public boolean hasTrailingSlash()
{
 return metadata.hasTrailingSlash();
}
origin: ocpsoft/rewrite

/**
* Set the character encoding of this URL (default UTF-8)
*/
public void setEncoding(final String encoding)
{
 metadata.setEncoding(encoding);
}
origin: com.ocpsoft/prettyfaces-jsf2

/**
* Return true if this URL begins with '/'
*/
public boolean hasLeadingSlash()
{
 return metadata.hasLeadingSlash();
}
origin: ocpsoft/rewrite

urlPattern = new URL(regexSegments, segmentedPattern.getMetadata().copy());
if (elPattern) {
  urlElPattern = Pattern.compile(urlPattern.toURL());
origin: ocpsoft/rewrite

url.getMetadata().setLeadingSlash(true);
QueryString qs = QueryString.build("");
if (viewId.contains("?"))
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: ocpsoft/rewrite

public String buildURLFromSegments(final List<String> segments)
{
 StringBuilder result = new StringBuilder();
 if (hasLeadingSlash())
 {
   result.append("/");
 }
 for (Iterator<String> iter = segments.iterator(); iter.hasNext();)
 {
   String segment = iter.next();
   result.append(segment);
   if (iter.hasNext())
   {
    result.append("/");
   }
 }
 if (hasTrailingSlash())
 {
   result.append("/");
 }
 return result.toString();
}
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.");
 }
}
com.ocpsoft.pretty.faces.urlMetadata

Most used methods

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

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Reference (javax.naming)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • CodeWhisperer alternatives
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