All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.refinitiv.eta.json.converter.GetJsonErrorParamsImpl Maven / Gradle / Ivy

The newest version!
/*|-----------------------------------------------------------------------------
 *|            This source code is provided under the Apache 2.0 license
 *|  and is provided AS IS with no warranty or guarantee of fit for purpose.
 *|                See the project's LICENSE.md for details.
 *|           Copyright (C) 2019-2022 LSEG. All rights reserved.     
 *|-----------------------------------------------------------------------------
 */

package com.refinitiv.eta.json.converter;

class GetJsonErrorParamsImpl implements GetJsonErrorParams {

    private String file;
    private int line;
    private int streamId;
    private String text;

    GetJsonErrorParamsImpl() {}

    @Override
    public void setFile(String file) {
        this.file = file;
    }

    @Override
    public void setLine(int line) {
        this.line = line;
    }

    @Override
    public void setText(String text) {
        this.text = text;
    }

    @Override
    public void setStreamId(int streamId) {
        this.streamId = streamId;
    }

    @Override
    public String getFile() {
        return file;
    }

    @Override
    public String getText() {
        return text;
    }

    @Override
    public int getLine() {
        return line;
    }

    @Override
    public int getStreamId() {
        return streamId;
    }

    @Override
    public void fillParams(JsonConverterError error, int streamId) {

        line = error.getLine();
        file = error.getFile();
        text = error.getText();
        this.streamId = streamId;
    }

    @Override
    public void clear() {
        text = null;
        file = null;
        line = EMPTY_LINE_VALUE;
        streamId = 0;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy