Class ApiClientWrapper


  • public class ApiClientWrapper
    extends Object
    • Constructor Detail

      • ApiClientWrapper

        public ApiClientWrapper​(String uri,
                                String token,
                                Integer connectTimeoutSeconds,
                                Integer readTimeoutSeconds,
                                Integer writeTimeoutSeconds)
                         throws com.fortify.ssc.restclient.ApiException
        Throws:
        com.fortify.ssc.restclient.ApiException
    • 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 - - optional
        issueTemplateId -
        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
      • getFoldersForAppVersion

        public List<com.fortify.ssc.restclient.model.Folder> getFoldersForAppVersion​(Long appVersionId)
                                                                              throws com.fortify.ssc.restclient.ApiException
        Throws:
        com.fortify.ssc.restclient.ApiException