FileImpl.java

  1. package org.owasp.dependencycheck.data.artifactory;

  2. import java.util.Date;

  3. /**
  4.  * Copied from JFrog's artifactory client.
  5.  *
  6.  * @see
  7.  * <a href="https://github.com/jfrog/artifactory-client-java">artifactory-client-java</a>
  8.  *
  9.  * @author jbaruch
  10.  * @since 29/07/12
  11.  */
  12. public class FileImpl extends ItemImpl {

  13.     private String downloadUri;
  14.     private Date created;
  15.     private String createdBy;
  16.     private long size;
  17.     private String mimeType;
  18.     private ChecksumsImpl checksums;
  19.     private ChecksumsImpl originalChecksums;
  20.     private String remoteUrl;

  21.     public boolean isFolder() {
  22.         return false;
  23.     }

  24.     public Date getCreated() {
  25.         return new Date(created.getTime());
  26.     }

  27.     public void setCreated(Date created) {
  28.         this.created = new Date(created.getTime());
  29.     }

  30.     public String getCreatedBy() {
  31.         return createdBy;
  32.     }

  33.     public void setCreatedBy(String createdBy) {
  34.         this.createdBy = createdBy;
  35.     }

  36.     public String getDownloadUri() {
  37.         return downloadUri;
  38.     }

  39.     public void setDownloadUri(String downloadUri) {
  40.         this.downloadUri = downloadUri;
  41.     }

  42.     public String getMimeType() {
  43.         return mimeType;
  44.     }

  45.     public void setMimeType(String mimeType) {
  46.         this.mimeType = mimeType;
  47.     }

  48.     public long getSize() {
  49.         return size;
  50.     }

  51.     public void setSize(long size) {
  52.         this.size = size;
  53.     }

  54.     public ChecksumsImpl getChecksums() {
  55.         return checksums;
  56.     }

  57.     public void setChecksums(ChecksumsImpl checksums) {
  58.         this.checksums = checksums;
  59.     }

  60.     public ChecksumsImpl getOriginalChecksums() {
  61.         return originalChecksums;
  62.     }

  63.     public void setOriginalChecksums(ChecksumsImpl originalChecksums) {
  64.         this.originalChecksums = originalChecksums;
  65.     }

  66.     public String getRemoteUrl() {
  67.         return remoteUrl;
  68.     }

  69.     public void setRemoteUrl(String remoteUrl) {
  70.         this.remoteUrl = remoteUrl;
  71.     }
  72. }