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

The version public rest service to gets the current latest rest service version and supported versions.

Url template: {rest_context_name}/api/social/version

Since:
Jun 9, 2011.
Author:
hoatle (hoatlevan at gmail dot com)

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)
          Get the latest eXo Social REST API version.
 javax.ws.rs.core.Response getSupportedVersions(javax.ws.rs.core.UriInfo uriInfo, String format)
          Get eXo Social 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)
Get the latest eXo Social REST API version. This version number should be used as the latest and stable version that is considered to include all new features and updates of eXo Social REST services.

Parameters:
uriInfo - The URI information.
format - The expected returned format.
Returns:
response of the request, the type bases on the format param

getSupportedVersions

public javax.ws.rs.core.Response getSupportedVersions(@Context
                                                      javax.ws.rs.core.UriInfo uriInfo,
                                                      String format)
Get eXo Social REST service versions that are supported. This is for backward compatibility. If a client application is using an older eXo Social 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:
response of the request, the type bases on the format param


Copyright © 2013 eXo Platform SAS. All Rights Reserved.