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

com.documents4j.ws.ConverterServerInformation Maven / Gradle / Ivy

There is a newer version: 1.1.12
Show newest version
package com.documents4j.ws;

import com.documents4j.api.DocumentType;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Map;
import java.util.Set;

/**
 * This bean is used for exchanging meta information between a conversion server and a remote converter.
 */
@XmlRootElement(name = ConverterServerInformation.ROOT_ELEMENT_NAME)
public class ConverterServerInformation {

    public static final String ROOT_ELEMENT_NAME = "remote-converter";

    private boolean operational;
    private long timeout;
    private int protocolVersion;
    private Map> supportedConversions;

    public ConverterServerInformation() {
        /* JAX-RS requires default constructor */
    }

    public ConverterServerInformation(boolean operational,
                                      long timeout,
                                      int protocolVersion,
                                      Map> supportedConversions) {
        this.operational = operational;
        this.timeout = timeout;
        this.protocolVersion = protocolVersion;
        this.supportedConversions = supportedConversions;
    }

    @XmlElement(required = true, nillable = false)
    public boolean isOperational() {
        return operational;
    }

    public void setOperational(boolean operational) {
        this.operational = operational;
    }

    @XmlElement(required = true, nillable = false)
    public long getTimeout() {
        return timeout;
    }

    public void setTimeout(long timeout) {
        this.timeout = timeout;
    }

    @XmlElement(required = true, nillable = false)
    public int getProtocolVersion() {
        return protocolVersion;
    }

    public void setProtocolVersion(int protocolVersion) {
        this.protocolVersion = protocolVersion;
    }

    @XmlJavaTypeAdapter(DocumentTypeMapAdapter.class)
    @XmlElement(required = true, nillable = false)
    public Map> getSupportedConversions() {
        return supportedConversions;
    }

    public void setSupportedConversions(Map> supportedConversions) {
        this.supportedConversions = supportedConversions;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy