de.smartics.resteasy.hypermedia.resources
Class ResourceDiscovery

Package class diagram package ResourceDiscovery
java.lang.Object
  extended by de.smartics.resteasy.hypermedia.resources.ResourceDiscovery

public final class ResourceDiscovery
     
     
extends Object

The discovery service for resources.


Method Summary
static Resources createDiscovery()
          Returns an empty resource collection.
static Resources createDiscovery(Object entity, javax.ws.rs.core.UriInfo uriInfo)
          Calculates the service discovery.
static boolean isUnencodeSlashInPath()
          Returns the flag that controls whether (true) or not ( false) encoded slashes in the URL paths should be unencoded.
static void setUnencodeSlashInPath(boolean unencodeSlashInPath)
          Sets the flag that controls whether (true) or not ( false) encoded slashes in the URL paths should be unencoded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isUnencodeSlashInPath

public static boolean isUnencodeSlashInPath()
Returns the flag that controls whether ( true) or not ( false) encoded slashes in the URL paths should be unencoded.

Returns:
the value of the flag.

setUnencodeSlashInPath

public static void setUnencodeSlashInPath(boolean unencodeSlashInPath)
Sets the flag that controls whether ( true) or not ( false) encoded slashes in the URL paths should be unencoded.

Implementation Notes:
org.jboss.resteasy.links.impl.RESTUtils does not allow to control the encoding of slashes. This method allows to unencode every URL discovered. Simply %2F are replaced.
Parameters:
unencodeSlashInPath - the value of the flag.

createDiscovery

public static Resources createDiscovery(Object entity,
                                        javax.ws.rs.core.UriInfo uriInfo)
Calculates the service discovery.

Parameters:
entity - the resource to analyze for link information.
uriInfo - the helper to construct links.
Returns:
the service discovery.

createDiscovery

public static Resources createDiscovery()
Returns an empty resource collection.

Returns:
an empty resource collection.


Copyright © 2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.