protected void processLegacyRequest(HyperionContext hyperionContext)
    {
        EndpointRequest request = hyperionContext.getEndpointRequest();
        EndpointResponse response = hyperionContext.getEndpointResponse();

        ApiVersionPlugin<ApiObject<Serializable>,PersistentObject<Serializable>,Serializable> apiVersionPlugin = hyperionContext.getVersionPlugin();
        EntityPlugin plugin = hyperionContext.getEntityPlugin();

        ApiObject clientObject = null;
        try
        {
            clientObject = marshaller.unmarshall(request.getInputStream(),apiVersionPlugin.getApiClass());
        }
        catch (MarshallingException e)
        {
            throw new BadRequestException(messageSource.getErrorMessage(ERROR_READING_REQUEST,hyperionContext.getLocale(),e.getMessage()),e);
        }
        clientObject.setId(null);

        PersistenceContext persistenceContext = buildPersistenceContext(hyperionContext);
        Set<String> fieldSet = persistenceContext.getRequestedFields();
        if(fieldSet != null)
            fieldSet.add("id");

        ApiObject saved = (ApiObject) plugin.getPersistenceOperations().createOrUpdateItems(
                Collections.singletonList(clientObject),
                persistenceContext).get(0);

        processChangeEvents(hyperionContext, persistenceContext);
        response.setResponseCode(200);
        hyperionContext.setResult(saved);
    }
protected void processLegacyRequest ( HyperionContext hyperionContext ) { EndpointRequest request = hyperionContext . getEndpointRequest ( ) ; EndpointResponse response = hyperionContext . getEndpointResponse ( ) ; ApiVersionPlugin < ApiObject < Serializable > , PersistentObject < Serializable > , Serializable > apiVersionPlugin = hyperionContext . getVersionPlugin ( ) ; EntityPlugin plugin = hyperionContext . getEntityPlugin ( ) ; ApiObject clientObject = null ; try { clientObject = marshaller . unmarshall ( request . getInputStream ( ) , apiVersionPlugin . getApiClass ( ) ) ; } catch ( MarshallingException e ) { throw new BadRequestException ( messageSource . getErrorMessage ( ERROR_READING_REQUEST , hyperionContext . getLocale ( ) , e . getMessage ( ) ) , e ) ; } clientObject . setId ( null ) ; PersistenceContext persistenceContext = buildPersistenceContext ( hyperionContext ) ; Set < String > fieldSet = persistenceContext . getRequestedFields ( ) ; if ( fieldSet != null ) fieldSet . add ( "id" ) ; ApiObject saved = ( ApiObject ) plugin . getPersistenceOperations ( ) . createOrUpdateItems ( Collections . singletonList ( clientObject ) , persistenceContext ) . get ( 0 ) ; processChangeEvents ( hyperionContext , persistenceContext ) ; response . setResponseCode ( 200 ) ; hyperionContext . setResult ( saved ) ; }
Process a legacy V1 request (single item)
@param hyperionContext The context