Search in sources :

Example 21 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class ComposerLockDetectable method applicable.

@Override
public DetectableResult applicable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    composerLock = requirements.file(COMPOSER_LOCK);
    composerJson = requirements.file(COMPOSER_JSON);
    return requirements.result();
}
Also used : Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Example 22 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class XcodeWorkspaceDetectable method applicable.

@Override
public DetectableResult applicable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    workspaceDirectory = requirements.directory("*.xcworkspace");
    return requirements.result();
}
Also used : Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Example 23 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class XcodeWorkspaceDetectable method extractable.

@Override
public DetectableResult extractable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    File swiftPMDirectory = workspaceDirectory.toPath().resolve("xcshareddata/swiftpm").toFile();
    requirements.anyFile(new SearchPattern(swiftPMDirectory, "Package.resolved", packageResolvedFile -> foundPackageResolvedFile = packageResolvedFile), new SearchPattern(workspaceDirectory, "contents.xcworkspacedata", workspaceDataFile -> foundWorkspaceDataFile = workspaceDataFile));
    return requirements.result();
}
Also used : DetectableResult(com.synopsys.integration.detectable.detectable.result.DetectableResult) PackageResolvedResult(com.synopsys.integration.detectable.detectables.swift.lock.model.PackageResolvedResult) Extraction(com.synopsys.integration.detectable.extraction.Extraction) XcodeWorkspaceResult(com.synopsys.integration.detectable.detectables.xcode.model.XcodeWorkspaceResult) IOException(java.io.IOException) FileFinder(com.synopsys.integration.common.util.finder.FileFinder) SearchPattern(com.synopsys.integration.detectable.detectable.SearchPattern) File(java.io.File) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) DetectableInfo(com.synopsys.integration.detectable.detectable.annotation.DetectableInfo) CodeLocation(com.synopsys.integration.detectable.detectable.codelocation.CodeLocation) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) Requirements(com.synopsys.integration.detectable.detectable.Requirements) ExtractionEnvironment(com.synopsys.integration.detectable.extraction.ExtractionEnvironment) Detectable(com.synopsys.integration.detectable.Detectable) SAXException(org.xml.sax.SAXException) FailedDetectableResult(com.synopsys.integration.detectable.detectable.result.FailedDetectableResult) Optional(java.util.Optional) DetectableEnvironment(com.synopsys.integration.detectable.DetectableEnvironment) PackageResolvedExtractor(com.synopsys.integration.detectable.detectables.swift.lock.PackageResolvedExtractor) LinkedList(java.util.LinkedList) SearchPattern(com.synopsys.integration.detectable.detectable.SearchPattern) File(java.io.File) Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Example 24 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class BitbakeDetectable method applicable.

@Override
public DetectableResult applicable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    foundBuildEnvScript = requirements.file(bitbakeDetectableOptions.getBuildEnvName());
    if (bitbakeDetectableOptions.getPackageNames() == null || bitbakeDetectableOptions.getPackageNames().isEmpty()) {
        return new PropertyInsufficientDetectableResult("Bitbake requires that at least one package name is provided.");
    } else {
        requirements.explain(new PropertyProvided("Bitbake Package Names"));
    }
    return requirements.result();
}
Also used : PropertyProvided(com.synopsys.integration.detectable.detectable.explanation.PropertyProvided) Requirements(com.synopsys.integration.detectable.detectable.Requirements) PropertyInsufficientDetectableResult(com.synopsys.integration.detectable.detectable.result.PropertyInsufficientDetectableResult)

Example 25 with Requirements

use of com.synopsys.integration.detectable.detectable.Requirements in project synopsys-detect by blackducksoftware.

the class PodlockDetectable method applicable.

@Override
public DetectableResult applicable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    foundPodlock = requirements.file(PODFILE_LOCK_FILENAME);
    return requirements.result();
}
Also used : Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Aggregations

Requirements (com.synopsys.integration.detectable.detectable.Requirements)63 File (java.io.File)7 PropertyInsufficientDetectableResult (com.synopsys.integration.detectable.detectable.result.PropertyInsufficientDetectableResult)3 FilesNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.FilesNotFoundDetectableResult)2 FileFinder (com.synopsys.integration.common.util.finder.FileFinder)1 Detectable (com.synopsys.integration.detectable.Detectable)1 DetectableEnvironment (com.synopsys.integration.detectable.DetectableEnvironment)1 SearchPattern (com.synopsys.integration.detectable.detectable.SearchPattern)1 DetectableInfo (com.synopsys.integration.detectable.detectable.annotation.DetectableInfo)1 CodeLocation (com.synopsys.integration.detectable.detectable.codelocation.CodeLocation)1 FoundFile (com.synopsys.integration.detectable.detectable.explanation.FoundFile)1 PropertyProvided (com.synopsys.integration.detectable.detectable.explanation.PropertyProvided)1 DetectableResult (com.synopsys.integration.detectable.detectable.result.DetectableResult)1 FailedDetectableResult (com.synopsys.integration.detectable.detectable.result.FailedDetectableResult)1 NpmNodeModulesNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.NpmNodeModulesNotFoundDetectableResult)1 PackageResolvedNotFoundDetectableResult (com.synopsys.integration.detectable.detectable.result.PackageResolvedNotFoundDetectableResult)1 PassedDetectableResult (com.synopsys.integration.detectable.detectable.result.PassedDetectableResult)1 PackageResolvedExtractor (com.synopsys.integration.detectable.detectables.swift.lock.PackageResolvedExtractor)1 PackageResolvedResult (com.synopsys.integration.detectable.detectables.swift.lock.model.PackageResolvedResult)1 XcodeWorkspaceResult (com.synopsys.integration.detectable.detectables.xcode.model.XcodeWorkspaceResult)1