eu.emi.dsr.resource
Class ServiceAdminResource

java.lang.Object
  extended by eu.emi.dsr.resource.ServiceAdminResource

public class ServiceAdminResource
extends Object

Resource for the service providers (privileged) to manage their services

Author:
a.memon, g.szigeti

Constructor Summary
ServiceAdminResource()
           
 
Method Summary
 javax.ws.rs.core.Response deleteService(javax.ws.rs.core.UriInfo infos)
          Deleting the service description
 org.codehaus.jettison.json.JSONObject getServicebyUrl(javax.ws.rs.core.UriInfo infos)
           
protected  String getUserPrincipalName()
           
 javax.ws.rs.core.Response registerService(org.codehaus.jettison.json.JSONObject serviceInfo)
          adding only one entry
 javax.ws.rs.core.Response registerServices(org.codehaus.jettison.json.JSONArray serviceInfos)
          adding an array of json documents, where each item in the array is service endpoint information
 javax.ws.rs.core.Response updateService(org.codehaus.jettison.json.JSONObject serviceInfo)
          updating only one entry
 javax.ws.rs.core.Response updateServices(org.codehaus.jettison.json.JSONArray serviceInfos)
          updating array of entries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceAdminResource

public ServiceAdminResource()
Method Detail

getUserPrincipalName

protected String getUserPrincipalName()

getServicebyUrl

public org.codehaus.jettison.json.JSONObject getServicebyUrl(@Context
                                                             javax.ws.rs.core.UriInfo infos)
                                                      throws javax.ws.rs.WebApplicationException,
                                                             org.codehaus.jettison.json.JSONException
Throws:
javax.ws.rs.WebApplicationException
org.codehaus.jettison.json.JSONException

registerService

public javax.ws.rs.core.Response registerService(org.codehaus.jettison.json.JSONObject serviceInfo)
                                          throws javax.ws.rs.WebApplicationException,
                                                 org.codehaus.jettison.json.JSONException
adding only one entry

Throws:
org.codehaus.jettison.json.JSONException
javax.ws.rs.WebApplicationException

registerServices

public javax.ws.rs.core.Response registerServices(org.codehaus.jettison.json.JSONArray serviceInfos)
                                           throws javax.ws.rs.WebApplicationException,
                                                  InterruptedException,
                                                  org.codehaus.jettison.json.JSONException
adding an array of json documents, where each item in the array is service endpoint information

Throws:
InterruptedException - TODO: polymorphic registrations: Supporting JSONObject as well as Array
org.codehaus.jettison.json.JSONException
javax.ws.rs.WebApplicationException

updateService

public javax.ws.rs.core.Response updateService(org.codehaus.jettison.json.JSONObject serviceInfo)
                                        throws javax.ws.rs.WebApplicationException,
                                               org.codehaus.jettison.json.JSONException
updating only one entry

Throws:
org.codehaus.jettison.json.JSONException
javax.ws.rs.WebApplicationException

updateServices

public javax.ws.rs.core.Response updateServices(org.codehaus.jettison.json.JSONArray serviceInfos)
                                         throws javax.ws.rs.WebApplicationException,
                                                org.codehaus.jettison.json.JSONException
updating array of entries

Throws:
org.codehaus.jettison.json.JSONException
javax.ws.rs.WebApplicationException

deleteService

public javax.ws.rs.core.Response deleteService(@Context
                                               javax.ws.rs.core.UriInfo infos)
                                        throws javax.ws.rs.WebApplicationException,
                                               org.codehaus.jettison.json.JSONException
Deleting the service description

Parameters:
infos - contains a ..?SERVICE_ENDPOINT_URL=http://serviceurl
Throws:
org.codehaus.jettison.json.JSONException
javax.ws.rs.WebApplicationException


Copyright © 2012. All Rights Reserved.