Class ApiClientWrapper
- java.lang.Object
-
- com.fortify.plugin.jenkins.fortifyclient.ApiClientWrapper
-
public class ApiClientWrapper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ApiClientWrapper.AppTypeEnum
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
createAppOrVersion(Long appId, String issueTemplateId, String appName, String appVersionName, String masterAttrGuid, ApiClientWrapper.AppTypeEnum type)
Create a new Application Version or both a new Application and a new Application VersionList<com.fortify.ssc.restclient.model.ProjectVersion>
getAllApplicationVersions(String query, int limit)
Returns list of Application Versions in SSC.Long
getApplicationId(String appName)
List<com.fortify.ssc.restclient.model.Project>
getApplications(String query, int limit)
Returns list of Applications in SSC.List<com.fortify.ssc.restclient.model.ProjectVersion>
getApplicationVersionsFor(long applicationId, String query, int limit)
Returns list of Application Versions for a particular Application in SSC.com.fortify.ssc.restclient.model.Artifact
getArtifactInfo(Long artifactId)
List<com.fortify.ssc.restclient.model.AttributeDefinition>
getAttributeDefinitions()
Returns list of Attribute Definitions in SSC.List<com.fortify.ssc.restclient.model.CloudPool>
getCloudScanPools()
Returns a list of CloudScan Pools in SSC.com.fortify.ssc.restclient.model.FilterSet
getDefaultFilterSetForAppVersion(Long appVersionId)
List<com.fortify.ssc.restclient.model.FilterSet>
getFilterSetsForAppVersion(Long appVersionId)
List<com.fortify.ssc.restclient.model.Folder>
getFoldersForAppVersion(Long appVersionId)
List<com.fortify.ssc.restclient.model.IssueSelector>
getGroupBySetForAppVersion(Long appVersionId)
List<com.fortify.ssc.restclient.model.ProjectVersionIssueGroup>
getIssueGroupFolders(Long avId, String filterSet)
List<com.fortify.ssc.restclient.model.ProjectVersionIssueGroup>
getIssueGroupsForAvs(Long avId, String searchCondition, String folderId, String filterSet, String groupingType)
List<com.fortify.ssc.restclient.model.ProjectVersionIssue>
getIssuesForAppVersion(Long appVersionId, int startPage, int pageSize, String filter, String groupId, String groupingType)
com.fortify.ssc.restclient.model.IssueTemplate
getIssueTemplate(com.fortify.ssc.restclient.model.Project application)
If the Application exists, use the same Issue Template.List<com.fortify.ssc.restclient.model.IssueTemplate>
getIssueTemplates()
Returns list of Issue Templates in SSC.com.fortify.ssc.restclient.model.ProjectVersionIssueGroup
getNewIssueGroupForAv(Long avId, String folderId, String filterSet)
Long
getVersionForApplication(Long applicationId, String appVersionName)
void
setDefaultAttributesAndCommit(Long appVersionId)
Set required Attributes for the Application Version then commit to make it usablevoid
setProxy(ProxyConfig proxyConfig)
Long
uploadFpr(File fpr, Long appVersionId)
-
-
-
Method Detail
-
setProxy
public void setProxy(ProxyConfig proxyConfig)
-
getApplications
public List<com.fortify.ssc.restclient.model.Project> getApplications(String query, int limit) throws com.fortify.ssc.restclient.ApiException
Returns list of Applications in SSC. Returns empty list of no Applications are found.- Throws:
com.fortify.ssc.restclient.ApiException
-
getAllApplicationVersions
public List<com.fortify.ssc.restclient.model.ProjectVersion> getAllApplicationVersions(String query, int limit) throws com.fortify.ssc.restclient.ApiException
Returns list of Application Versions in SSC. Returns empty list of no Applications Versions are found.- Throws:
com.fortify.ssc.restclient.ApiException
-
getApplicationVersionsFor
public List<com.fortify.ssc.restclient.model.ProjectVersion> getApplicationVersionsFor(long applicationId, String query, int limit) throws com.fortify.ssc.restclient.ApiException
Returns list of Application Versions for a particular Application in SSC.- Throws:
com.fortify.ssc.restclient.ApiException
-
getAttributeDefinitions
public List<com.fortify.ssc.restclient.model.AttributeDefinition> getAttributeDefinitions() throws com.fortify.ssc.restclient.ApiException
Returns list of Attribute Definitions in SSC. Returns empty list if no Attribute Definitions are found.- Throws:
com.fortify.ssc.restclient.ApiException
-
getIssueTemplates
public List<com.fortify.ssc.restclient.model.IssueTemplate> getIssueTemplates() throws com.fortify.ssc.restclient.ApiException
Returns list of Issue Templates in SSC. Returns empty list if no Issue Templates are found.- Throws:
com.fortify.ssc.restclient.ApiException
-
getCloudScanPools
public List<com.fortify.ssc.restclient.model.CloudPool> getCloudScanPools() throws com.fortify.ssc.restclient.ApiException
Returns a list of CloudScan Pools in SSC. Returns an empty list if no pools are found.- Throws:
com.fortify.ssc.restclient.ApiException
-
getIssueGroupsForAvs
public List<com.fortify.ssc.restclient.model.ProjectVersionIssueGroup> getIssueGroupsForAvs(Long avId, String searchCondition, String folderId, String filterSet, String groupingType) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getIssueGroupFolders
public List<com.fortify.ssc.restclient.model.ProjectVersionIssueGroup> getIssueGroupFolders(Long avId, String filterSet) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getNewIssueGroupForAv
public com.fortify.ssc.restclient.model.ProjectVersionIssueGroup getNewIssueGroupForAv(Long avId, String folderId, String filterSet) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getFilterSetsForAppVersion
public List<com.fortify.ssc.restclient.model.FilterSet> getFilterSetsForAppVersion(Long appVersionId) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getDefaultFilterSetForAppVersion
public com.fortify.ssc.restclient.model.FilterSet getDefaultFilterSetForAppVersion(Long appVersionId) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getIssuesForAppVersion
public List<com.fortify.ssc.restclient.model.ProjectVersionIssue> getIssuesForAppVersion(Long appVersionId, int startPage, int pageSize, String filter, String groupId, String groupingType) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getGroupBySetForAppVersion
public List<com.fortify.ssc.restclient.model.IssueSelector> getGroupBySetForAppVersion(Long appVersionId) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getApplicationId
public Long getApplicationId(String appName) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getVersionForApplication
public Long getVersionForApplication(Long applicationId, String appVersionName) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
getIssueTemplate
public com.fortify.ssc.restclient.model.IssueTemplate getIssueTemplate(com.fortify.ssc.restclient.model.Project application) throws com.fortify.ssc.restclient.ApiException
If the Application exists, use the same Issue Template. If not, search for the default Issue Template. If no default is set, use the first Issue Template found.- Throws:
com.fortify.ssc.restclient.ApiException
-
createAppOrVersion
public Long createAppOrVersion(Long appId, String issueTemplateId, String appName, String appVersionName, String masterAttrGuid, ApiClientWrapper.AppTypeEnum type) throws com.fortify.ssc.restclient.ApiException
Create a new Application Version or both a new Application and a new Application Version- Parameters:
appId
- - optionalissueTemplateId
-masterAttrGuid
-type
-- Returns:
- Long appVersionId
- Throws:
com.fortify.ssc.restclient.ApiException
-
setDefaultAttributesAndCommit
public void setDefaultAttributesAndCommit(Long appVersionId) throws com.fortify.ssc.restclient.ApiException
Set required Attributes for the Application Version then commit to make it usable- Throws:
com.fortify.ssc.restclient.ApiException
-
uploadFpr
public Long uploadFpr(@NonNull File fpr, @NonNull Long appVersionId) throws com.fortify.ssc.restclient.ApiException
- Parameters:
fpr
-appVersionId
-- Returns:
- id of the uploaded artifact
- Throws:
com.fortify.ssc.restclient.ApiException
-
getArtifactInfo
public com.fortify.ssc.restclient.model.Artifact getArtifactInfo(@NonNull Long artifactId) throws com.fortify.ssc.restclient.ApiException
- Throws:
com.fortify.ssc.restclient.ApiException
-
-