Codota Logo
Metadata
Code IndexAdd Codota 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)

  • Common ways to obtain Metadata
private void myMethod () {
Metadata m =
  • Codota Iconnew Metadata()
  • Smart code suggestions by Codota
}
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

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • setContentView (Activity)
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Notification (javax.management)
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