Class AbstractOSGiResolver

    • Constructor Detail

      • AbstractOSGiResolver

        public AbstractOSGiResolver()
    • Method Detail

      • setRequirementStrategy

        public void setRequirementStrategy​(java.lang.String strategy)
      • setRepoDescriptor

        protected void setRepoDescriptor​(RepoDescriptor repoDescriptor)
      • ensureInit

        protected void ensureInit()
      • init

        protected abstract void init()
      • findIvyFileRef

        public ResolvedResource findIvyFileRef​(DependencyDescriptor dd,
                                               ResolveData data)
        Description copied from interface: DependencyResolver
        Finds the module descriptor for the specified DependencyDescriptor. If this resolver can't find the module descriptor, null is returned.
        Parameters:
        dd - the dependency descriptor
        data - the resolve data
        Returns:
        the module descriptor, or null
      • findResource

        public ResolvedResource findResource​(ResolvedResource[] rress,
                                             ResourceMDParser rmdparser,
                                             ModuleRevisionId mrid,
                                             java.util.Date date)
        Description copied from class: BasicResolver
        When the resolver has many choices, this function helps choosing one
        Overrides:
        findResource in class BasicResolver
        Parameters:
        rress - the list of resolved resource which the resolver found to fit the requirement
        rmdparser - the parser of module descriptor
        mrid - the module being resolved
        date - the current date
        Returns:
        the selected resource
      • filterNames

        protected java.util.Collection<java.lang.String> filterNames​(java.util.Collection<java.lang.String> names)
        Description copied from class: BasicResolver
        Filters names before returning them in the findXXXNames or findTokenValues method.

        Remember to call the super implementation when overriding this method.

        Overrides:
        filterNames in class BasicResolver
        Parameters:
        names - the list to filter.
        Returns:
        the filtered list
      • findNames

        protected java.util.Collection<java.lang.String> findNames​(java.util.Map<java.lang.String,​java.lang.String> tokenValues,
                                                                   java.lang.String token)
        Specified by:
        findNames in class BasicResolver
      • filterCapabilityValues

        private void filterCapabilityValues​(java.util.Set<java.lang.String> capabilityValues,
                                            java.util.Map<java.lang.String,​java.util.Set<ModuleDescriptor>> moduleByCapabilityValue,
                                            java.util.Map<java.lang.String,​java.lang.String> tokenValues,
                                            java.lang.String rev)
        Populate capabilityValues with capability values for which at least one module match the expected revision
      • listTokenValues

        private java.util.Set<java.util.Map<java.lang.String,​java.lang.String>> listTokenValues​(java.util.Set<java.lang.String> tokens,
                                                                                                      java.util.Map<java.lang.String,​java.lang.Object> criteria)
      • get

        protected long get​(Resource resource,
                           java.io.File dest)
                    throws java.io.IOException
        Specified by:
        get in class BasicResolver
        Throws:
        java.io.IOException
      • getResource

        protected Resource getResource​(java.lang.String source)
                                throws java.io.IOException
        Specified by:
        getResource in class BasicResolver
        Throws:
        java.io.IOException
      • publish

        public void publish​(Artifact artifact,
                            java.io.File src,
                            boolean overwrite)
                     throws java.io.IOException
        Throws:
        java.io.IOException