org.apache.solr.rest

## Class RestManager.ManagedEndpoint

- java.lang.Object
- - org.restlet.resource.Resource
  - - org.restlet.resource.ServerResource
    - - org.apache.solr.rest.BaseSolrResource
      - - org.apache.solr.rest.RestManager.ManagedEndpoint

- All Implemented Interfaces:
    DELETEable, GETable, POSTable, PUTable
  Enclosing class:
    RestManager

      public static class RestManager.ManagedEndpoint
      extends BaseSolrResource
      implements GETable, PUTable, POSTable, DELETEable

  The Restlet router needs a lightweight extension of ServerResource to delegate a request to. ManagedResource implementations are heavy-weight objects that live for the duration of a SolrCore, so this class acts as the proxy between Restlet and a ManagedResource when doing request processing.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.solr.rest.BaseSolrResource

      `BaseSolrResource.SolrOutputRepresentation`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `childId`
    `protected ManagedResource` | `managedResource`

    - ### Fields inherited from class org.apache.solr.rest.BaseSolrResource

      `SHOW_DEFAULTS, UPDATE_TIMEOUT_SECS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ManagedEndpoint()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addDeprecatedWarning()`
    `org.restlet.representation.Representation` | `delete()`
    `void` | `doInit()` Initialize objects needed to handle a request to the REST API.
    `org.restlet.representation.Representation` | `get()`
    `protected Object` | `parseJsonFromRequestBody(org.restlet.representation.Representation entity)` Parses and validates the JSON passed from the to the ManagedResource.
    `org.restlet.representation.Representation` | `post(org.restlet.representation.Representation entity)`
    `org.restlet.representation.Representation` | `put(org.restlet.representation.Representation entity)`
    `static String` | `resolveResourceId(org.restlet.Request restletReq)` Determines the ManagedResource resourceId from the Restlet request.

    - ### Methods inherited from class org.apache.solr.rest.BaseSolrResource

      `getContentType, getSchema, getSolrCore, getSolrRequest, getSolrResponse, getUpdateTimeoutSecs, handleException, handlePostExecution, urlDecode`

    - ### Methods inherited from class org.restlet.resource.ServerResource

      `abort, commit, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, getAttribute, getDescription, getInfo, getInfo, getName, getOnSent, getPreferredVariant, getRole, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, patch, patch, post, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDescription, setDimensions, setExisting, setLocationRef, setLocationRef, setName, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions`

    - ### Methods inherited from class org.restlet.resource.Resource

      `doError, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toBoolean, toByte, toDouble, toFloat, toInteger, toLong, toObject, toRepresentation, toRepresentation, toRepresentation, toShort, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### managedResource

          protected ManagedResource managedResource

    - #### childId

          protected String childId

  - ### Constructor Detail

    - #### ManagedEndpoint

          public ManagedEndpoint()

  - ### Method Detail

    - #### resolveResourceId

          public static String resolveResourceId(org.restlet.Request restletReq)

      Determines the ManagedResource resourceId from the Restlet request.

    - #### doInit

          public void doInit()
                      throws org.restlet.resource.ResourceException

      Initialize objects needed to handle a request to the REST API. Specifically, we lookup the RestManager using the ThreadLocal SolrRequestInfo and then dynamically locate the ManagedResource associated with the request URI.
      Overrides:
        `doInit` in class `BaseSolrResource`
      Throws:
        `org.restlet.resource.ResourceException`

    - #### put

          public org.restlet.representation.Representation put(org.restlet.representation.Representation entity)

      Specified by:
        `put` in interface `PUTable`
      Overrides:
        `put` in class `org.restlet.resource.ServerResource`

    - #### post

          public org.restlet.representation.Representation post(org.restlet.representation.Representation entity)

      Specified by:
        `post` in interface `POSTable`
      Overrides:
        `post` in class `org.restlet.resource.ServerResource`

    - #### delete

          public org.restlet.representation.Representation delete()

      Specified by:
        `delete` in interface `DELETEable`
      Overrides:
        `delete` in class `org.restlet.resource.ServerResource`

    - #### get

          public org.restlet.representation.Representation get()

      Specified by:
        `get` in interface `GETable`
      Overrides:
        `get` in class `org.restlet.resource.ServerResource`

    - #### parseJsonFromRequestBody

          protected Object parseJsonFromRequestBody(org.restlet.representation.Representation entity)

      Parses and validates the JSON passed from the to the ManagedResource.

    - #### addDeprecatedWarning

          protected void addDeprecatedWarning()

      Overrides:
        `addDeprecatedWarning` in class `BaseSolrResource`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.