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

org.mutils.qrcode.model.QrcodeModel Maven / Gradle / Ivy

Go to download

mutils组件中,提供二维码一键生成的模块。此模块可单独引用。 maven仓库:https://mvnrepository.com/artifact/cn.minsin/mutils-qrcode

There is a newer version: 0.4.0.RELEASE
Show newest version
package org.mutils.qrcode.model;

import java.io.OutputStream;

import cn.minsin.core.annotation.NotNull;
import cn.minsin.core.rule.AbstractModelRule;

public class QrcodeModel extends AbstractModelRule {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3139191851191875798L;
	@NotNull("二维码内容")
	private String content;
	
	@NotNull("宽度")
	private Integer width = 500;
	
	@NotNull("高度")
	private Integer height = 500;
	
	@NotNull("图片类型")
	private String format = "png";
	
	@NotNull(value="二维码中logo,文件路径不能包含中文",notNull=false)
	private LogoModel logoImageModel;
	
	@NotNull("二维码白边等级  -1表示没有白边  0 1 2 3 4  白边要依次增多 默认1")
	private int level =1;
	
	@NotNull("输出对象  可以是HttpServletResponse中的OutPutStream对象 http中设置输出的文件名及类型需要在加载完输出流后设置,也可以是FileOutPutStream对象")
	private OutputStream outputStream;

	
	public OutputStream getOutputStream() {
		return outputStream;
	}

	public void setOutputStream(OutputStream outputStream) {
		this.outputStream = outputStream;
	}

	public LogoModel getLogoImageModel() {
		return logoImageModel;
	}

	public void setLogoImageModel(LogoModel logoImageModel) {
		this.logoImageModel = logoImageModel;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}


	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getWidth() {
		return width;
	}

	public void setWidth(Integer width) {
		this.width = width;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}


	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy