org.opentox.pol
Class PolServiceImpl

Package class diagram package PolServiceImpl
java.lang.Object
  extended by org.opentox.pol.PolServiceImpl
All Implemented Interfaces:
PolService

public class PolServiceImpl
extends Object
implements PolService

A Singleton class that uses an in-memory map to keep the pol objects. This way, we maintain the state of the resources in memory.


Method Summary
 javax.ws.rs.core.Response createPol(String subjectId, javax.ws.rs.core.UriInfo uriInfo, InputStream is)
          Create a Pol resource to respond to an HTTP request POST /opensso-pol
 javax.ws.rs.core.Response deletePol(String subjectId, String id)
          Delete a Pol resource in response to an HTTP request DELETE /opensso-pol/{id}
static PolServiceImpl getInstance()
           
 javax.ws.rs.core.Response getPolID(String subjectId, String id, String uri, String polnames)
          Return a Pol resource in response to an HTTP request GET /opensso-pol/{id}
 void log(String msg)
           
protected  boolean ValidateIPAddress(String ipAddress)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PolServiceImpl getInstance()

log

public void log(String msg)

createPol

public javax.ws.rs.core.Response createPol(@HeaderParam(value="subjectid")
                                           String subjectId,
                                           @Context
                                           javax.ws.rs.core.UriInfo uriInfo,
                                           InputStream is)
                                    throws javax.ws.rs.WebApplicationException
Create a Pol resource to respond to an HTTP request POST /opensso-pol

Specified by:
createPol in interface PolService
Parameters:
uriInfo -
Pol -
subjectid -
Returns:
Response
Throws:
javax.ws.rs.WebApplicationException

getPolID

public javax.ws.rs.core.Response getPolID(@HeaderParam(value="subjectid")
                                          String subjectId,
                                          @HeaderParam(value="id")
                                          String id,
                                          @HeaderParam(value="uri")
                                          String uri,
                                          @HeaderParam(value="polnames")
                                          String polnames)
                                   throws javax.ws.rs.WebApplicationException
Return a Pol resource in response to an HTTP request GET /opensso-pol/{id}

Specified by:
getPolID in interface PolService
Parameters:
id -
Returns:
Response
Throws:
javax.ws.rs.WebApplicationException

deletePol

public javax.ws.rs.core.Response deletePol(@HeaderParam(value="subjectid")
                                           String subjectId,
                                           @HeaderParam(value="id")
                                           String id)
                                    throws javax.ws.rs.WebApplicationException
Delete a Pol resource in response to an HTTP request DELETE /opensso-pol/{id}

Specified by:
deletePol in interface PolService
Parameters:
id -
Throws:
javax.ws.rs.WebApplicationException

ValidateIPAddress

protected final boolean ValidateIPAddress(String ipAddress)


Copyright © 2010-2011 OpenTox project. All Rights Reserved.