Class ScopeServiceEndPoint

java.lang.Object
org.apache.unomi.rest.endpoints.ScopeServiceEndPoint

@Produces("application/json") @Consumes("application/json") @Path("/scopes") public class ScopeServiceEndPoint extends Object
A JAX-RS endpoint to manage Scopes.
  • Constructor Details

    • ScopeServiceEndPoint

      public ScopeServiceEndPoint()
  • Method Details

    • setScopeService

      public void setScopeService(ScopeService scopeService)
    • getScopes

      @GET @Path("/") public List<Scope> getScopes()
      Retrieves all known scopes.
      Returns:
      a List of the scopes
    • save

      @POST @Path("/") public javax.ws.rs.core.Response save(Scope scope)
      Persists the specified scope.
      Parameters:
      scope - the scope to be persisted
    • getScope

      @GET @Path("/{scopeId}") public Scope getScope(@PathParam("scopeId") String scopeId)
      Retrieves the scope identified by the specified identifier.
      Parameters:
      scopeId - the identifier of the scope we want to retrieve
      Returns:
      the scope identified by the specified identifier or null if no such scope exists.
    • delete

      @DELETE @Path("/{scopeId}") public void delete(@PathParam("scopeId") String scopeId)
      Deletes a scope.
      Parameters:
      scopeId - the identifier of the scope