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

scouterx.webapp.request.GxidXLogRequest Maven / Gradle / Ivy

There is a newer version: 2.20.0
Show newest version
package scouterx.webapp.request;

import lombok.Getter;
import lombok.Setter;
import scouterx.webapp.framework.client.server.ServerManager;
import scouterx.webapp.framework.exception.ErrorState;

import javax.validation.constraints.NotNull;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;

/**
 * Created by csk746([email protected]) on 2017. 11. 7..
 */
@Getter
@Setter
public class GxidXLogRequest {

    int serverId;

    @NotNull
    @PathParam("gxid")
    private long gxid;

    @NotNull
    @PathParam("yyyymmdd")
    String yyyymmdd;


    @QueryParam("serverId")
    public void setServerId(int serverId) {
        this.serverId = ServerManager.getInstance().getServerIfNullDefault(serverId).getId();
    }

    public void validate() {
        if(0 == gxid || "".equals(yyyymmdd)) {
            throw ErrorState.VALIDATE_ERROR.newBizException("gxid and yyyymmdd must coexist!");
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy