public class

ConstraintResource

extends ServerResource
java.lang.Object
   ↳ org.restlet.resource.Resource
     ↳ org.restlet.resource.ServerResource
       ↳ org.apache.helix.webapp.resources.ConstraintResource

Class Overview

Class for server-side resource at "/clusters/{clusterName}/constraints/{constraintType}"

  • GET list all constraints
  • POST set constraints
  • DELETE remove constraints

  • Summary

    Public Constructors
    ConstraintResource()
    Public Methods
    Representation delete()
    Remove constraints

    Usage: curl -X DELETE http://{host:port}/clusters/{cluster}/constraints/MESSAGE_CONSTRAINT/{constraintId}

    Representation get()
    List all constraints

    Usage: curl http://{host:port}/clusters/{clusterName}/constraints/MESSAGE_CONSTRAINT

    Representation post(Representation entity)
    Set constraints

    Usage: curl -d 'jsonParameters={"constraintAttributes":"RESOURCE={resource},CONSTRAINT_VALUE={1}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{cluster}/constraints/MESSAGE_CONSTRAINT/{constraintId}

    [Expand]
    Inherited Methods
    From class org.restlet.resource.ServerResource
    From class org.restlet.resource.Resource
    From class java.lang.Object

    Public Constructors

    public ConstraintResource ()

    Public Methods

    public Representation delete ()

    Remove constraints

    Usage: curl -X DELETE http://{host:port}/clusters/{cluster}/constraints/MESSAGE_CONSTRAINT/{constraintId}

    public Representation get ()

    List all constraints

    Usage: curl http://{host:port}/clusters/{clusterName}/constraints/MESSAGE_CONSTRAINT

    public Representation post (Representation entity)

    Set constraints

    Usage: curl -d 'jsonParameters={"constraintAttributes":"RESOURCE={resource},CONSTRAINT_VALUE={1}"}' -H "Content-Type: application/json" http://{host:port}/clusters/{cluster}/constraints/MESSAGE_CONSTRAINT/{constraintId}