ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject git commit: ARGUS-63:Change default public REST API to JSON
Date Wed, 17 Sep 2014 15:13:43 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master 9736e8b78 -> 5e2c79235


ARGUS-63:Change default public REST API to JSON

Signed-off-by: sneethiraj <sneethir@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/5e2c7923
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/5e2c7923
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/5e2c7923

Branch: refs/heads/master
Commit: 5e2c79235c07e37a8610eebb10afe97ffcfe1362
Parents: 9736e8b
Author: vperiasamy <vperiasamy@hortonworks.com>
Authored: Tue Sep 16 18:42:13 2014 -0400
Committer: sneethiraj <sneethir@apache.org>
Committed: Wed Sep 17 11:13:30 2014 -0400

----------------------------------------------------------------------
 .../main/java/com/xasecure/rest/PublicAPIs.java   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5e2c7923/security-admin/src/main/java/com/xasecure/rest/PublicAPIs.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/com/xasecure/rest/PublicAPIs.java b/security-admin/src/main/java/com/xasecure/rest/PublicAPIs.java
index c59018a..080d352 100644
--- a/security-admin/src/main/java/com/xasecure/rest/PublicAPIs.java
+++ b/security-admin/src/main/java/com/xasecure/rest/PublicAPIs.java
@@ -102,7 +102,7 @@ public class PublicAPIs {
 
 	@GET
 	@Path("/api/repository/{id}")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXRepository getRepository(@PathParam("id") Long id) {
 		VXAsset vXAsset = assetMgr.getXAsset(id);
 		return xRepositoryService.mapXAToPublicObject(vXAsset);
@@ -110,7 +110,7 @@ public class PublicAPIs {
 
 	@POST
 	@Path("/api/repository/")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXRepository createRepository(VXRepository vXRepository) {
 		VXAsset vXAsset = xRepositoryService.mapPublicToXAObject(vXRepository);
 		vXAsset = assetMgr.createXAsset(vXAsset);
@@ -119,7 +119,7 @@ public class PublicAPIs {
 
 	@PUT
 	@Path("/api/repository/{id}")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXRepository updateRepository(VXRepository vXRepository,
 			@PathParam("id") Long id) {
 		vXRepository.setId(id);
@@ -153,7 +153,7 @@ public class PublicAPIs {
 
 	@GET
 	@Path("/api/repository/")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXRepositoryList searchRepositories(
 			@Context HttpServletRequest request) {
 		SearchCriteria searchCriteria = searchUtil.extractCommonCriterias(
@@ -174,7 +174,7 @@ public class PublicAPIs {
 
 	@GET
 	@Path("/api/repository/count")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXLong countRepositories(@Context HttpServletRequest request) {
 		SearchCriteria searchCriteria = searchUtil.extractCommonCriterias(
 				request, xAssetService.sortFields);
@@ -189,7 +189,7 @@ public class PublicAPIs {
 
 	@GET
 	@Path("/api/policy/{id}")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXPolicy getPolicy(@PathParam("id") Long id) {
 		VXResource vXResource = assetMgr.getXResource(id);
 		return xPolicyService.mapXAToPublicObject(vXResource);
@@ -197,7 +197,7 @@ public class PublicAPIs {
 
 	@POST
 	@Path("/api/policy")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXPolicy createPolicy(VXPolicy vXPolicy) {
 		VXResource vXResource = xPolicyService.mapPublicToXAObject(vXPolicy,
 				AbstractBaseResourceService.OPERATION_CREATE_CONTEXT);
@@ -209,7 +209,7 @@ public class PublicAPIs {
 
 	@PUT
 	@Path("/api/policy/{id}")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXPolicy updatePolicy(VXPolicy vXPolicy, @PathParam("id") Long id) {
 		vXPolicy.setId(id);
 		VXResource vXResource = xPolicyService.mapPublicToXAObject(vXPolicy,
@@ -235,7 +235,7 @@ public class PublicAPIs {
 
 	@GET
 	@Path("/api/policy")
-	@Produces({ "application/xml", "application/json" })
+	@Produces({ "application/json", "application/xml" })
 	public VXPolicyList searchPolicies(@Context HttpServletRequest request) {
 		SearchCriteria searchCriteria = searchUtil.extractCommonCriterias(
 				request, xResourceService.sortFields);


Mime
View raw message