Interface AppModelResolver


  • public interface AppModelResolver
    Application model resolver used to resolve application and/or its dependency artifacts.
    Author:
    Alexey Loubyansky
    • Method Detail

      • resolveUserDependencies

        default List<AppDependency> resolveUserDependencies​(AppArtifact artifact)
                                                     throws AppModelResolverException
        Resolve application direct and transitive dependencies configured by the user. Note that deployment dependencies are not included in the result.
        Parameters:
        artifact - application artifact
        Returns:
        the list of dependencies configured by the user
        Throws:
        AppModelResolverException - in case of a failure
      • resolveUserDependencies

        List<AppDependency> resolveUserDependencies​(AppArtifact artifact,
                                                    List<AppDependency> deps)
                                             throws AppModelResolverException
        Resolve application direct and transitive dependencies configured by the user, given the specific versions of the direct dependencies. Note that deployment dependencies are not included in the result.
        Parameters:
        artifact - application artifact
        deps - some or all of the direct dependencies that should be used in place of the original ones
        Returns:
        the list of dependencies configured by the user
        Throws:
        AppModelResolverException - in case of a failure
      • listLaterVersions

        List<String> listLaterVersions​(AppArtifact artifact,
                                       String upToVersion,
                                       boolean inclusive)
                                throws AppModelResolverException
        Lists versions released later than the version of the artifact up to the version specified or all the later versions in case the up-to-version is not provided.
        Parameters:
        artifact - artifact to list the versions for
        Returns:
        the list of versions released later than the version of the artifact
        Throws:
        AppModelResolverException - in case of a failure
      • getNextVersion

        String getNextVersion​(AppArtifact artifact,
                              String fromVersion,
                              boolean fromVersionIncluded,
                              String upToVersion,
                              boolean upToVersionIncluded)
                       throws AppModelResolverException
        Returns the next version of the artifact from the specified range. In case the next version is not available, the method returns null.
        Parameters:
        artifact - artifact
        fromVersion - the lowest version of the range
        fromVersionIncluded - whether the specified lowest version should be included in the range
        upToVersion - the highest version of the range
        upToVersionIncluded - whether the specified highest version should be included in the range
        Returns:
        the next version from the specified range or null if the next version is not available
        Throws:
        AppModelResolverException - in case of a failure
      • getLatestVersion

        String getLatestVersion​(AppArtifact artifact,
                                String upToVersion,
                                boolean inclusive)
                         throws AppModelResolverException
        Returns the latest version for the artifact up to the version specified. In case there is no later version available, the artifact's version is returned.
        Parameters:
        artifact - artifact
        upToVersion - max version boundary
        inclusive - whether the upToVersion should be included in the range or not
        Returns:
        the latest version up to specified boundary
        Throws:
        AppModelResolverException - in case of a failure
      • getLatestVersionFromRange

        String getLatestVersionFromRange​(AppArtifact appArtifact,
                                         String range)
                                  throws AppModelResolverException
        Resolves the latest version from the specified range. The version of the artifact is ignored.
        Parameters:
        appArtifact - the artifact
        range - the version range
        Returns:
        the latest version of the artifact from the range or null, if no version was found for the specified range
        Throws:
        AppModelResolverException - in case of a failure