Skip to content

Commit

Permalink
Merge pull request #71 from usnistgov/feature/Updated-bundlePlan-results
Browse files Browse the repository at this point in the history
Provide additional stats in bundle plan response to enable user evaluation
  • Loading branch information
RayPlante authored Apr 8, 2020
2 parents 0db0669 + 18f420c commit a7b022c
Show file tree
Hide file tree
Showing 15 changed files with 626 additions and 567 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
hs_err_pid*
/bin/
/target/
*.classpath
*.project
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,4 +280,4 @@
</repository>
</repositories>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ public class BundleDownloadPlan {
* List of files not included in the bundle
*/
private NotIncludedFile[] notIncluded;

private long size;

private long bundleCount;

private long filesCount;

/**
* Default Constructor
Expand All @@ -77,13 +83,17 @@ public BundleDownloadPlan() {
* If files are not included in the bundle.
*/
public BundleDownloadPlan(String postEachTo, String status, BundleRequest[] requests,
String[] messages, NotIncludedFile[] notIncluded)
String[] messages, NotIncludedFile[] notIncluded, long size, long bundleCount, long filesCount)
{
this.postEachTo = postEachTo;
this.status = status;
this.requests = requests;
this.messages = messages;
this.notIncluded = notIncluded;
this.size = size;
this.bundleCount = bundleCount;
this.filesCount = filesCount;

}

/**
Expand Down Expand Up @@ -132,7 +142,31 @@ public void setMessages(String[] msgs) {
public void setNotIncluded(NotIncludedFile[] notIncluded) {
this.notIncluded = notIncluded;
}

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

public long getSize() {
return this.size;
}


public void setBundleCount(long bCount) {
this.bundleCount = bCount;
}

public long getBundleCount() {
return this.bundleCount;
}

public void setFilesCount(long fCount) {
this.filesCount = fCount;
}

public long getFilesCount() {
return this.filesCount;
}
/**
* return the API endpoint to POST each request in the plan to.
*
Expand Down Expand Up @@ -183,5 +217,6 @@ public String[] getMessages() {
public NotIncludedFile[] getNotIncluded() {
return this.notIncluded;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class BundleRequest {
* FilePAths and Urls json array
*/
private FileRequest[] includeFiles;

private long bundleSize;

/**
* Default Constructor
Expand All @@ -42,11 +44,30 @@ public BundleRequest() {
* @param bundleName
* @param includeFiles
*/
public BundleRequest(String bundleName, FileRequest[] includeFiles) {
public BundleRequest(String bundleName, FileRequest[] includeFiles, long bundleSize) {
this.bundleName = bundleName;
this.includeFiles = includeFiles;
this.bundleSize = bundleSize;
}

/**
* Set the bundle size
*
* @param bundleName the name to give to the bundle
*/
public void setBundleSize(long size) {
this.bundleSize = size;
}

/**
* Return the name requested to be assigned to the bundle
*
* @return String -- the desired name for the bundle
*/
public long getBundleSize() {
return this.bundleSize;
}

/**
* Set the requested name to give to the bundle
*
Expand Down
Loading

0 comments on commit a7b022c

Please sign in to comment.