Skip to content

Commit

Permalink
Merge pull request #5 from AppSecDev/set_progress_in_providers
Browse files Browse the repository at this point in the history
Set progress in providers
  • Loading branch information
mattmurp authored Sep 16, 2017
2 parents 5aa357f + 52409ca commit cd13568
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ public String getResultsFormat() {
return m_reportFormat;
}

@Override
public void setProgress(IProgress progress) {
m_progress = progress;
m_scanProvider.setProgress(progress);
}

/**
* Specifies the format to use for reports.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import java.io.File;
import java.util.Collection;

import com.hcl.appscan.sdk.logging.IProgress;

/**
* Provides access to the results of a security scan.
*/
Expand Down Expand Up @@ -80,4 +82,10 @@ public interface IResultsProvider {
* @return The format of the results file.
*/
public String getResultsFormat();

/**
* Sets the IProgress for tracking status.
* @param progress The IProgress.
*/
public void setProgress(IProgress progress);
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,9 @@ private boolean verifyApplication(String appId) {
m_progress.setStatus(new Message(Message.ERROR, Messages.getMessage(ERROR_INVALID_APP, appId)));
return false;
}

@Override
public void setProgress(IProgress progress) {
m_progress = progress;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.apache.wink.json4j.JSONObject;

import com.hcl.appscan.sdk.auth.IAuthenticationProvider;
import com.hcl.appscan.sdk.logging.IProgress;

/**
* A provider of scanning services.
Expand Down Expand Up @@ -52,4 +53,10 @@ public interface IScanServiceProvider {
* @return
*/
public IAuthenticationProvider getAuthenticationProvider();

/**
* Sets the {@link IProgress} used to record status messages.
* @param progress The {@link IProgress}.
*/
public void setProgress(IProgress progress);
}

0 comments on commit cd13568

Please sign in to comment.