org.exoplatform.social.service.rest.api
Class VersionResources

java.lang.Object
  extended by org.exoplatform.social.service.rest.api.VersionResources
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class VersionResources
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer

Provides the latest REST service version.


Field Summary
static String LATEST_VERSION
          The latest social rest api version.
static List<String> SUPPORTED_VERSIONS
          The supported versions
 
Constructor Summary
VersionResources()
           
 
Method Summary
 javax.ws.rs.core.Response getLatestVersion(javax.ws.rs.core.UriInfo uriInfo, String format)
          Gets the latest REST API version of eXo Platform.
 javax.ws.rs.core.Response getSupportedVersions(javax.ws.rs.core.UriInfo uriInfo, String format)
          Gets eXo Platform REST service versions that are supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LATEST_VERSION

public static final String LATEST_VERSION
The latest social rest api version.

See Also:
Constant Field Values

SUPPORTED_VERSIONS

public static final List<String> SUPPORTED_VERSIONS
The supported versions

Constructor Detail

VersionResources

public VersionResources()
Method Detail

getLatestVersion

public javax.ws.rs.core.Response getLatestVersion(@Context
                                                  javax.ws.rs.core.UriInfo uriInfo,
                                                  String format)
Gets the latest REST API version of eXo Platform. This version number should be used as the latest and stable one which is considered to include all new features and updates of eXo Platform REST services.

Parameters:
uriInfo - The URI information.
format - The format of the returned result, for example, JSON or XML.
Returns:
The information of the latest REST version.

getSupportedVersions

public javax.ws.rs.core.Response getSupportedVersions(@Context
                                                      javax.ws.rs.core.UriInfo uriInfo,
                                                      String format)
Gets eXo Platform REST service versions that are supported. This is for backward compatibility. If a client application is using an older eXo Platform REST APIs version, all APIs of the version still can work. The array MUST have the latest to oldest order. For example, {{{[v2, v1, v1-beta3]}}}, but not {{{[v1, v2, v1-beta3]}}}.

Parameters:
uriInfo - The URI information.
format - The expected returned format.
Returns:
The information of the REST service versions supported by eXo Platform.


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.