com.applitools.eyes.visualgridclient.model.RGridResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-common-java3 Show documentation
Show all versions of eyes-common-java3 Show documentation
Common code for Applitools Eyes Java SDK projects
package com.applitools.eyes.visualgridclient.model;
import com.applitools.eyes.Logger;
import com.applitools.utils.GeneralUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
public class RGridResource {
@JsonIgnore
private String url;
@JsonInclude
private String contentType;
@JsonIgnore
private byte[] content;
@JsonProperty("hash")
private String sha256;
@JsonInclude
private final String hashFormat = "sha256";
@JsonIgnore
private Logger logger;
public String getUrl() {
return url;
}
public RGridResource(String url, String contentType, byte[] content, Logger logger, String msg) {
this.contentType = contentType;
this.content = content;
this.logger = logger;
this.sha256 = GeneralUtils.getSha256hash(content);
// if (msg.startsWith("RGridDom")) {
// logger.log("creating resource - "+url + " from "+msg);
// logger.log("contentType - "+this.contentType);
// logger.log("content :\n"+new String(content));
// }
this.url = url;
}
public String getContentType() {
return contentType;
}
public byte[] getContent() {
return content;
}
public String getHashFormat() {
return hashFormat;
}
public String getSha256() {
return sha256;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy