Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2010-03-08 14:57:41 -0500
committerJohn Arthorne2010-03-08 14:57:41 -0500
commitf320415599a1ef7f1c2ef42277167ab204588da0 (patch)
treead15ee771420fb5085f01233744a94bb29e18f75 /bundles/org.eclipse.equinox.p2.repository
parent0ad884af4592f26894833393b189059827e7f3dd (diff)
downloadrt.equinox.p2-f320415599a1ef7f1c2ef42277167ab204588da0.tar.gz
rt.equinox.p2-f320415599a1ef7f1c2ef42277167ab204588da0.tar.xz
rt.equinox.p2-f320415599a1ef7f1c2ef42277167ab204588da0.zip
Filled in missing javadoc
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactKeyQuery.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepositoryManager.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IFileArtifactRepository.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java18
7 files changed, 72 insertions, 16 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactKeyQuery.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactKeyQuery.java
index 02e154322..596257f5d 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactKeyQuery.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/ArtifactKeyQuery.java
@@ -12,12 +12,12 @@
package org.eclipse.equinox.p2.repository.artifact;
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
import org.eclipse.equinox.p2.metadata.expression.IExpression;
+import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
+import org.eclipse.equinox.p2.query.IQueryable;
/**
* A general purpose query for matching {@link IArtifactKey} instances
@@ -48,6 +48,10 @@ public class ArtifactKeyQuery extends ExpressionMatchQuery<IArtifactKey> {
return ExpressionUtil.getFactory().<IArtifactKey> matchExpression(matchIDClassifierRange, id, classifier, range);
}
+ /**
+ * A singleton artifact key query that will always match every artifact key in
+ * the given {@link IQueryable}.
+ */
public static final ArtifactKeyQuery ALL_KEYS = new ArtifactKeyQuery();
/**
@@ -65,6 +69,11 @@ public class ArtifactKeyQuery extends ExpressionMatchQuery<IArtifactKey> {
super(IArtifactKey.class, ExpressionUtil.TRUE_EXPRESSION);
}
+ /**
+ * Creates an artifact key query that will match any key equal to the
+ * provided key
+ * @param key the input key to test for equality in the query
+ */
public ArtifactKeyQuery(IArtifactKey key) {
super(IArtifactKey.class, createMatchExpression(key));
}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java
index fa8af1b91..610490121 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java
@@ -74,12 +74,27 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> {
public boolean contains(IArtifactKey key);
/**
- * Write to the given output stream the bytes represented by the artifact descriptor processed by the processing steps of the given descriptor.
+ * Writes to the given output stream the bytes represented by the artifact descriptor.
+ * Any processing steps defined by the descriptor will be applied to the artifact bytes
+ * before they are sent to the provided output stream.
+ *
+ * @param descriptor the descriptor to transfer
+ * @param destination the stream to write the final artifact output to
+ * @param monitor a progress monitor, or <code>null</code> if progress
+ * reporting and cancellation are not desired
+ * @return the result of the artifact transfer
*/
public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
/**
- * Write to the given output stream the bytes represented by the artifact descriptor without processing by the steps of the given descriptor.
+ * Writes to the given output stream the bytes represented by the artifact descriptor.
+ * Any processing steps defined by the descriptor will <b>not</b> be applied to the artifact bytes.
+ *
+ * @param descriptor the descriptor to transfer
+ * @param destination the stream to write the final artifact output to
+ * @param monitor a progress monitor, or <code>null</code> if progress
+ * reporting and cancellation are not desired
+ * @return the result of the artifact transfer
*/
public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor);
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepositoryManager.java
index c86defc10..1ebda19e9 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepositoryManager.java
@@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.equinox.p2.repository.artifact;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
import java.net.URI;
import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
@@ -32,12 +31,19 @@ public interface IArtifactRepositoryManager extends IRepositoryManager<IArtifact
*/
public static final String SERVICE_NAME = IArtifactRepositoryManager.class.getName();
+ /**
+ * A convenience constant representing an empty set of artifact requests.
+ */
public static final IArtifactRequest[] NO_ARTIFACT_REQUEST = new IArtifactRequest[0];
/**
* Repository type for a simple repository based on a URL or local file system location.
*/
public static final String TYPE_SIMPLE_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository.simpleRepository"; //$NON-NLS-1$
+
+ /**
+ * Repository type for a composite repository based on a URL or local file system location.
+ */
public static final String TYPE_COMPOSITE_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository.compositeRepository"; //$NON-NLS-1$
/**
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IFileArtifactRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IFileArtifactRepository.java
index 6ab35438e..bc1561595 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IFileArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IFileArtifactRepository.java
@@ -22,6 +22,7 @@ public interface IFileArtifactRepository extends IArtifactRepository {
* Return the location of the full local file corresponding to the given
* artifact key to the given key, or <code>null</code> if not available.
*
+ * @param key the artifact key for the file to be returned
* @return the location of the requested artifact or<code>null</code> if not available
*/
public File getArtifactFile(IArtifactKey key);
@@ -30,6 +31,7 @@ public interface IFileArtifactRepository extends IArtifactRepository {
* Return the location of the local file corresponding to the given
* artifact descriptor, or <code>null</code> if not available.
*
+ * @param descriptor the artifact descriptor for the file to be returned
* @return the location of the requested descriptor or<code>null</code> if not available
*/
public File getArtifactFile(IArtifactDescriptor descriptor);
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java
index 5b45e0279..f24d48591 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IProcessingStepDescriptor.java
@@ -28,6 +28,11 @@ public interface IProcessingStepDescriptor {
*/
public abstract String getProcessorId();
+ /**
+ * An argument that is passed to the processing step instance. The structure
+ * and content of the data is specific to the particular processing step being used.
+ * @return the processing step data
+ */
public abstract String getData();
/**
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java
index 95261f4ce..3587ec6dd 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java
@@ -35,29 +35,29 @@ public class ProcessingStepDescriptor implements IProcessingStepDescriptor {
this.required = required;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor#getProcessorId()
+ /**
+ * {@inheritDoc}
*/
public String getProcessorId() {
return processorId;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor#getData()
+ /**
+ * {@inheritDoc}
*/
public String getData() {
return data;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor#isRequired()
+ /**
+ * {@inheritDoc}
*/
public boolean isRequired() {
return required;
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
+ /**
+ * {@inheritDoc}
*/
public int hashCode() {
final int prime = 31;
@@ -68,8 +68,8 @@ public class ProcessingStepDescriptor implements IProcessingStepDescriptor {
return result;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
+ /**
+ * {@inheritDoc}
*/
public boolean equals(Object obj) {
if (this == obj)
@@ -96,6 +96,7 @@ public class ProcessingStepDescriptor implements IProcessingStepDescriptor {
/**
* Returns a string representation of this descriptor for debugging purposes only.
+ * @return a string representation ofthe processing step descriptor
*/
public String toString() {
return "Processor: " + processorId + (required ? "(req)" : "(notReq)") + " ,data: " + data; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java
index 562aab222..e2022f062 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java
@@ -54,6 +54,9 @@ public class RepositoryReference implements IRepositoryReference {
this.nickname = nickname;
}
+ /**
+ * {@inheritDoc}
+ */
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -70,22 +73,37 @@ public class RepositoryReference implements IRepositoryReference {
return true;
}
+ /**
+ * {@inheritDoc}
+ */
public URI getLocation() {
return location;
}
+ /**
+ * {@inheritDoc}
+ */
public int getType() {
return type;
}
+ /**
+ * {@inheritDoc}
+ */
public int getOptions() {
return options;
}
+ /**
+ * {@inheritDoc}
+ */
public String getNickname() {
return nickname;
}
+ /**
+ * {@inheritDoc}
+ */
public int hashCode() {
final int prime = 31;
int result = 1;

Back to the top