Examples of ArtifactDescriptor


Examples of net.java.trueupdate.artifact.spec.ArtifactDescriptor

                downloadUpdateVersionsFromServer();
            }

            void downloadUpdateVersionsFromServer() throws Exception {
                for (final UpdateMessage um : sessions) {
                    final ArtifactDescriptor ad = um.artifactDescriptor();
                    final UpdateDescriptor ud = uds.get(ad);
                    if (null == ud)
                        uds.put(ad, updateDescriptor(ad,
                                updateClient().version(ad)));
                }
            }

            @Override public Void call() throws Exception {
                tellUpdateResolver();
                notifySubscribers();
                return null;
            }

            void tellUpdateResolver() throws Exception {
                synchronized (updateResolver) {
                    updateResolver.restart();
                    for (UpdateMessage um : sessions)
                        for (UpdateDescriptor ud : availableUpdate(um))
                            updateResolver.allocate(ud);
                }
            }

            void notifySubscribers() throws Exception {
                for (UpdateMessage um : sessions)
                    for (UpdateDescriptor ud : availableUpdate(um))
                        if (!blacklisted.contains(ud))
                            sendAndLog(updateNotice(um, ud.updateVersion()));
            }

            @SuppressWarnings("unchecked")
            List<UpdateDescriptor> availableUpdate(UpdateMessage um) {
                final ArtifactDescriptor ad = um.artifactDescriptor();
                final UpdateDescriptor ud = uds.get(ad);
                return ud.updateVersion().equals(ad.version())
                        ? Collections.EMPTY_LIST
                        : Collections.singletonList(ud);
            }

            UpdateMessage updateNotice(UpdateMessage um, String uv) {
View Full Code Here

Examples of net.java.trueupdate.artifact.spec.ArtifactDescriptor

        logSent(message);
    }

    private static UpdateMessage installationSuccessResponse(
            final UpdateMessage request) {
        final ArtifactDescriptor ad = request
                .artifactDescriptor()
                .update()
                .version(request.updateVersion())
                .build();
        return responseFor(request)
View Full Code Here

Examples of net.java.trueupdate.artifact.spec.ArtifactDescriptor

                downloadUpdateVersionsFromServer();
            }

            void downloadUpdateVersionsFromServer() throws Exception {
                for (final UpdateMessage um : sessions) {
                    final ArtifactDescriptor ad = um.artifactDescriptor();
                    final UpdateDescriptor ud = uds.get(ad);
                    if (null == ud)
                        uds.put(ad, updateDescriptor(ad,
                                updateClient().version(ad)));
                }
View Full Code Here

Examples of net.java.trueupdate.artifact.spec.ArtifactDescriptor

                            sendAndLog(updateNotice(um, ud.updateVersion()));
            }

            @SuppressWarnings("unchecked")
            List<UpdateDescriptor> availableUpdate(UpdateMessage um) {
                final ArtifactDescriptor ad = um.artifactDescriptor();
                final UpdateDescriptor ud = uds.get(ad);
                return ud.updateVersion().equals(ad.version())
                        ? Collections.EMPTY_LIST
                        : Collections.singletonList(ud);
            }
View Full Code Here

Examples of net.java.trueupdate.artifact.spec.ArtifactDescriptor

    @Override
    public @Nullable UpdateMessage unmarshal(
            final @CheckForNull UpdateMessageDto dto)
    throws Exception {
        if (null == dto) return null;
        final ArtifactDescriptor ad = new ArtifactDescriptorAdapter()
                .unmarshal(dto.artifactDescriptor);
        final List<LogRecord> lrs = new LogRecordsAdapter()
                .unmarshal(dto.logRecords);
        final UpdateMessage um = UpdateMessage
                .builder()
View Full Code Here

Examples of net.java.trueupdate.artifact.spec.ArtifactDescriptor

            @Override protected void doStart() throws Exception {
                deltaZip = File.createTempFile("delta", ".zip");
            }

            @Override protected void doPerform() throws Exception {
                final ArtifactDescriptor ad = descriptor.artifactDescriptor();
                final String uv = descriptor.updateVersion();
                Copy.copy(updateClient().diff(ad, uv), new FileStore(deltaZip));
            }

            @Override protected void doRevert() throws Exception {
View Full Code Here

Examples of net.java.trueupdate.artifact.spec.ArtifactDescriptor

            @Override protected void doStart() throws Exception {
                deltaZip = File.createTempFile("delta", ".zip");
            }

            @Override protected void doPerform() throws Exception {
                final ArtifactDescriptor ad = descriptor.artifactDescriptor();
                final String uv = descriptor.updateVersion();
                Copy.copy(updateClient().diff(ad, uv), new FileStore(deltaZip));
            }
View Full Code Here

Examples of org.eclipse.tycho.ArtifactDescriptor

       
    //LinkedList<TargetPlatform> pList = getPlatformsForSessionProjects();
    ProductConfiguration product = loadProduct(DefaultReactorProject.adapt(project));
   
    for (PluginRef ref : product.getPlugins()) {
      ArtifactDescriptor artifact = tp.getArtifact(org.eclipse.tycho.ArtifactKey.TYPE_ECLIPSE_PLUGIN, ref.getId(), ref.getVersion());
//          getArtifact(pList,
//          org.eclipse.tycho.ArtifactKey.TYPE_ECLIPSE_PLUGIN,
//          ref.getId(), ref.getVersion());
      if (artifact == null) {
        throw new MojoExecutionException(" MISSING ARTIFACT: " + ref.getId());
View Full Code Here

Examples of org.eclipse.tycho.ArtifactDescriptor

   
    LinkedList<TargetPlatform> pList = getPlatformsForSessionProjects();
    ProductConfiguration product = loadProduct(DefaultReactorProject.adapt(project));
   
    for (PluginRef ref : product.getPlugins()) {
      ArtifactDescriptor artifact = getArtifact(pList,
          org.eclipse.tycho.ArtifactKey.TYPE_ECLIPSE_PLUGIN,
          ref.getId(), ref.getVersion());
      if (artifact == null) {
        throw new MojoExecutionException(" MISSING ARTIFACT: " + ref.getId());
      } else {
View Full Code Here

Examples of org.eclipse.tycho.ArtifactDescriptor

  }

  private ArtifactDescriptor getArtifact(LinkedList<TargetPlatform> pList,
      String typeEclipsePlugin, String id, String version) {
    for (TargetPlatform t : pList) {
      ArtifactDescriptor artifact = t.getArtifact(typeEclipsePlugin, id,
          version);
      if (artifact != null) {
        return artifact;
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.