Class PolicyRuleService
- java.lang.Object
-
- com.synopsys.integration.blackduck.service.DataService
-
- com.synopsys.integration.blackduck.service.dataservice.PolicyRuleService
-
public class PolicyRuleService extends DataService
-
-
Field Summary
-
Fields inherited from class com.synopsys.integration.blackduck.service.DataService
blackDuckApiClient, blackDuckRequestFactory, logger
-
-
Constructor Summary
Constructors Constructor Description PolicyRuleService(BlackDuckApiClient blackDuckApiClient, BlackDuckRequestFactory blackDuckRequestFactory, com.synopsys.integration.log.IntLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.synopsys.integration.rest.HttpUrlcreatePolicyRule(com.synopsys.integration.blackduck.api.generated.view.PolicyRuleView policyRuleView)com.synopsys.integration.rest.HttpUrlcreatePolicyRuleForExternalId(ComponentService componentService, com.synopsys.integration.bdio.model.externalid.ExternalId externalId, java.lang.String policyName)This will create a policy rule that will be violated by the existence of a matching external id in the project's BOM.java.util.List<com.synopsys.integration.blackduck.api.generated.view.PolicyRuleView>getAllPolicyRules()java.util.Optional<com.synopsys.integration.blackduck.api.generated.view.PolicyRuleView>getPolicyRuleViewByName(java.lang.String policyRuleName)
-
-
-
Constructor Detail
-
PolicyRuleService
public PolicyRuleService(BlackDuckApiClient blackDuckApiClient, BlackDuckRequestFactory blackDuckRequestFactory, com.synopsys.integration.log.IntLogger logger)
-
-
Method Detail
-
getAllPolicyRules
public java.util.List<com.synopsys.integration.blackduck.api.generated.view.PolicyRuleView> getAllPolicyRules() throws com.synopsys.integration.exception.IntegrationException- Throws:
com.synopsys.integration.exception.IntegrationException
-
getPolicyRuleViewByName
public java.util.Optional<com.synopsys.integration.blackduck.api.generated.view.PolicyRuleView> getPolicyRuleViewByName(java.lang.String policyRuleName) throws com.synopsys.integration.exception.IntegrationException- Throws:
com.synopsys.integration.exception.IntegrationException
-
createPolicyRule
public com.synopsys.integration.rest.HttpUrl createPolicyRule(com.synopsys.integration.blackduck.api.generated.view.PolicyRuleView policyRuleView) throws com.synopsys.integration.exception.IntegrationException- Throws:
com.synopsys.integration.exception.IntegrationException
-
createPolicyRuleForExternalId
public com.synopsys.integration.rest.HttpUrl createPolicyRuleForExternalId(ComponentService componentService, com.synopsys.integration.bdio.model.externalid.ExternalId externalId, java.lang.String policyName) throws com.synopsys.integration.exception.IntegrationException
This will create a policy rule that will be violated by the existence of a matching external id in the project's BOM.- Throws:
com.synopsys.integration.exception.IntegrationException
-
-