private IStatus executePublisherAction(BundlesAction action) { IPublisherAction[] actions = new IPublisherAction[] { action }; publisherResult = new PublisherResult(); return new Publisher(publisherInfo, publisherResult).publish(actions, null); }
public void merge(IPublisherResult result, int mode) { if (mode == MERGE_MATCHING) { addIUs(result.getIUs(null, ROOT), ROOT); addIUs(result.getIUs(null, NON_ROOT), NON_ROOT); } else if (mode == MERGE_ALL_ROOT) { addIUs(result.getIUs(null, ROOT), ROOT); addIUs(result.getIUs(null, NON_ROOT), ROOT); } else if (mode == MERGE_ALL_NON_ROOT) { addIUs(result.getIUs(null, ROOT), NON_ROOT); addIUs(result.getIUs(null, NON_ROOT), NON_ROOT); } }
@Override protected void initialize(PublisherInfo publisherInfo) throws ProvisionException { super.initialize(publisherInfo); if (publisherInfo.getConfigurations().length == 0) publisherInfo.setConfigurations(new String[] {""}); //$NON-NLS-1$ }
private void initializePublisher() { info = new PublisherInfo(); info.setArtifactRepository(artifactRepository); info.setMetadataRepository(metadataRepository); info.addAdvice(advice); info.setArtifactOptions(IPublisherInfo.A_INDEX | IPublisherInfo.A_NO_MD5); }
private IStatus generateMetadata(UpdateSite updateSite, IMetadataRepository repository, IProgressMonitor monitor) { PublisherInfo info = new PublisherInfo(); info.setMetadataRepository(repository); IPublisherAction[] actions = new IPublisherAction[] {new RemoteUpdateSiteAction(updateSite, null)}; Publisher publisher = new Publisher(info); return publisher.publish(actions, monitor); }
protected void savePublishedIUs() { IMetadataRepository metadataRepository = info.getMetadataRepository(); if (metadataRepository != null) { Collection<IInstallableUnit> ius = results.getIUs(null, null); metadataRepository.addInstallableUnits(ius); } } }
protected void initialize(PublisherInfo publisherInfo) throws ProvisionException { if (inplace) { File location = new File(source); if (metadataLocation == null) metadataLocation = location.toURI(); if (artifactLocation == null) artifactLocation = location.toURI(); publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH); } initializeRepositories(publisherInfo); }
/** * Returns the normalized string form of the given config spec. This is useful for putting * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec * may not work on the result). * @param configSpec the config spec to format * @return the readable format of the given config spec */ protected String createIdString(String configSpec) { String[] config = parseConfigSpec(configSpec); return config[0] + '.' + config[1] + '.' + config[2]; }
/** * Adds all applicable touchpoint advice to the given installable unit. * @param iu The installable unit to add touchpoint advice to * @param currentInstructions The set of touchpoint instructions assembled for this IU so far * @param info The publisher info */ protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info) { processTouchpointAdvice(iu, currentInstructions, info, null); }
protected void initialize(PublisherInfo publisherInfo) throws ProvisionException { super.initialize(publisherInfo); if (publisherInfo.getConfigurations().length == 0) publisherInfo.setConfigurations(new String[] {""}); //$NON-NLS-1$ }
protected void savePublishedIUs() { IMetadataRepository metadataRepository = info.getMetadataRepository(); if (metadataRepository != null) { Collection<IInstallableUnit> ius = results.getIUs(null, null); metadataRepository.addInstallableUnits(ius); } } }
public void merge(IPublisherResult result, int mode) { if (mode == MERGE_MATCHING) { addIUs(result.getIUs(null, ROOT), ROOT); addIUs(result.getIUs(null, NON_ROOT), NON_ROOT); } else if (mode == MERGE_ALL_ROOT) { addIUs(result.getIUs(null, ROOT), ROOT); addIUs(result.getIUs(null, NON_ROOT), ROOT); } else if (mode == MERGE_ALL_NON_ROOT) { addIUs(result.getIUs(null, ROOT), NON_ROOT); addIUs(result.getIUs(null, NON_ROOT), NON_ROOT); } }
protected void initialize(PublisherInfo publisherInfo) throws ProvisionException { if (inplace) { File location = new File(source); if (metadataLocation == null) metadataLocation = location.toURI(); if (artifactLocation == null) artifactLocation = location.toURI(); publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH); } initializeRepositories(publisherInfo); }
/** * Returns the normalized string form of the given config spec. This is useful for putting * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec * may not work on the result). * @param configSpec the config spec to format * @return the readable format of the given config spec */ protected String createIdString(String configSpec) { String[] config = parseConfigSpec(configSpec); return config[0] + '.' + config[1] + '.' + config[2]; }
/** * Adds all applicable touchpoint advice to the given installable unit. * @param iu The installable unit to add touchpoint advice to * @param currentInstructions The set of touchpoint instructions assembled for this IU so far * @param info The publisher info */ protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info) { processTouchpointAdvice(iu, currentInstructions, info, null); }
protected void initialize(PublisherInfo publisherInfo) throws ProvisionException { super.initialize(publisherInfo); if (publisherInfo.getConfigurations().length == 0) publisherInfo.setConfigurations(new String[] {""}); //$NON-NLS-1$ }
protected void savePublishedIUs() { IMetadataRepository metadataRepository = info.getMetadataRepository(); if (metadataRepository != null) { Collection<IInstallableUnit> ius = results.getIUs(null, null); metadataRepository.addInstallableUnits(ius); } } }
public void merge(IPublisherResult result, int mode) { if (mode == MERGE_MATCHING) { addIUs(result.getIUs(null, ROOT), ROOT); addIUs(result.getIUs(null, NON_ROOT), NON_ROOT); } else if (mode == MERGE_ALL_ROOT) { addIUs(result.getIUs(null, ROOT), ROOT); addIUs(result.getIUs(null, NON_ROOT), ROOT); } else if (mode == MERGE_ALL_NON_ROOT) { addIUs(result.getIUs(null, ROOT), NON_ROOT); addIUs(result.getIUs(null, NON_ROOT), NON_ROOT); } }
/** * Returns the normalized string form of the given config spec. This is useful for putting * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec * may not work on the result). * @param configSpec the config spec to format * @return the readable format of the given config spec */ protected String createIdString(String configSpec) { String[] config = parseConfigSpec(configSpec); return config[0] + '.' + config[1] + '.' + config[2]; }
@Override public void merge(IPublisherResult result, int mode) { if (mode == MERGE_MATCHING) { addIUs(result.getIUs(null, ROOT), ROOT); addIUs(result.getIUs(null, NON_ROOT), NON_ROOT); } else if (mode == MERGE_ALL_ROOT) { addIUs(result.getIUs(null, ROOT), ROOT); addIUs(result.getIUs(null, NON_ROOT), ROOT); } else if (mode == MERGE_ALL_NON_ROOT) { addIUs(result.getIUs(null, ROOT), NON_ROOT); addIUs(result.getIUs(null, NON_ROOT), NON_ROOT); } }