src/main/java/org/edgegallery/appstore/application/inner/AppService.java
public Release download(String appId, String packageId) {
        App app = appRepository.find(appId)
            .orElseThrow(() -> new EntityNotFoundException(App.class, appId, ResponseConst.RET_APP_NOT_FOUND));
        Release release = app.findByPackageId(packageId)
            .orElseThrow(() -> new UnknownReleaseExecption(packageId, ResponseConst.RET_PACKAGE_NOT_FOUND));
        app.downLoad();
        appRepository.store(app);
        return release;
    }
/**
     * download package by app id and package id.
     *
     * @param appId app id.
     * @param packageId package id.
     * @return release
     */
download package by app id and package id.
@param appId app id.
@param packageId package id.
@return release
download package by app id and package id . @param appId app id . @param packageId package id . @return release
public Release download(String appId, String packageId) {
        App app = appRepository.find(appId)
            .orElseThrow(() -> new EntityNotFoundException(App.class, appId, ResponseConst.RET_APP_NOT_FOUND));
        Release release = app.findByPackageId(packageId)
            .orElseThrow(() -> new UnknownReleaseExecption(packageId, ResponseConst.RET_PACKAGE_NOT_FOUND));
        app.downLoad();
        appRepository.store(app);
        return release;
    }
public Release download ( String appId , String packageId ) { App app = appRepository . find ( appId ) . orElseThrow ( ( ) -> new EntityNotFoundException ( App . class , appId , ResponseConst . RET_APP_NOT_FOUND ) ) ; Release release = app . findByPackageId ( packageId ) . orElseThrow ( ( ) -> new UnknownReleaseExecption ( packageId , ResponseConst . RET_PACKAGE_NOT_FOUND ) ) ; app . downLoad ( ) ; appRepository . store ( app ) ; return release ; }
download package by app id and package id.
download package by app id and package id .