Debian Codegraph @

bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java

raw
1 /*******************************************************************************
2 * Copyright (c) 2008, 2010 Code 9 and others.
3 *
4 * This
5 * program and the accompanying materials are made available under the terms of
6 * the Eclipse Public License 2.0 which accompanies this distribution, and is
7 * available at
8 * https://www.eclipse.org/legal/epl-2.0/
9 *
10 * SPDX-License-Identifier: EPL-2.0
11 *
12 * Contributors:
13 * Code 9 - initial API and implementation
14 * IBM - ongoing development
15 ******************************************************************************/
16 package org.eclipse.equinox.p2.publisher;
17
18 import java.util.Collection;
19 import org.eclipse.equinox.p2.metadata.Version;
20 import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
21 import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
22
23 public interface IPublisherInfo {
24
25 /**
26 * A bitwise flag to say whether or not the index for the artifact repository should
27 * be updated.
28 */
29 public static final int A_INDEX = 1;
30
31 /**
32 * A bitwise flag to say whether or the artifacts themselves should be published.
33 */
34 public static final int A_PUBLISH = 2;
35
36 /**
37 * A bitwise flag to say whether or not to overwrite disk content discovered
38 * in the repository when publishing an artifact
39 */
40 public static final int A_OVERWRITE = 4;
41
42 /**
43 * A bitwise flag indicating that MD5 hash should not be generated when
44 * publishing an artifact. When this flag is not specified the MD5 hash will
45 * be generated by default.
46 */
47 public static final int A_NO_MD5 = 8;
48
49 /**
50 * Returns the artifact repository into which any publishable artifacts are published
51 * or <code>null</code> if none.
52 * @return a destination artifact repository or <code>null</code>
53 */
54 public IArtifactRepository getArtifactRepository();
55
56 /**
57 * Returns the metadata repository into which any publishable metadata is published
58 * or <code>null</code> if none.
59 * @return a destination metadata repository or <code>null</code>
60 */
61 public IMetadataRepository getMetadataRepository();
62
63 /**
64 * Returns a bitflag that controls the publish operation, what is a bitwhise OR
65 * of {@link #A_INDEX},{@value #A_PUBLISH}, {@link #A_NO_MD5},
66 * {@link #A_OVERWRITE} or <code>0</code> if no flags are set.
67 */
68 public int getArtifactOptions();
69
70 /**
71 * Returns the registered advice for the given configuration of WS, OS and ARCH where the
72 * advice is of the given type. If mergeDefault is <code>true</code> then the advice for
73 * the default configuration is merged into the result.
74 * @param configSpec the configuration to query. Note that the given configuration
75 * must specify values for WS, OS and ARCH.
76 * @param type the type of advice to look for
77 * @param includeDefault whether or not to merge in the advice common to all configurations
78 * @return the set of advice of the given type for the given configuration
79 */
80 public <T extends IPublisherAdvice> Collection<T> getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class<T> type);
81
82 /**
83 * Add the given advice to the set of publishing advices.
84 * @param advice the advice to retain
85 */
86 public void addAdvice(IPublisherAdvice advice);
87
88 /**
89 * Returns the configurations being published. Each configuration is a string of the form
90 * ws.os.arch describing the window system, operating system, and architecture of each
91 * configuration.
92 * @return The configurations being published
93 * @see AbstractPublisherAction#createConfigSpec(String, String, String)
94 */
95 public String[] getConfigurations();
96
97 /**
98 * Returns the artifact repository given to the publisher as context for
99 * the publisher actions. May be <code>null</code>. Note that multiple
100 * repositories may be represented as one composite repository.
101 *
102 * @return the context artifact repository or <code>null</code> if none.
103 */
104 public IArtifactRepository getContextArtifactRepository();
105
106 /**
107 * Returns the metadata repository given to the publisher as context for
108 * the publisher actions. May be <code>null</code>. Note that multiple
109 * repositories may be represented as one composite repository.
110 *
111 * @return the context metadata repository or <code>null</code> if none.
112 */
113 public IMetadataRepository getContextMetadataRepository();
114 }