You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@depot.apache.org by mm...@apache.org on 2004/07/13 19:44:33 UTC
svn commit: rev 22877 - in incubator/depot/trunk/update/src/java: . org/apache/depot/update/config org/apache/depot/update/download org/apache/depot/update/impl org/apache/depot/update/protocols org/apache/depot/update/util/xml
Author: mmay
Date: Tue Jul 13 12:44:32 2004
New Revision: 22877
Modified:
incubator/depot/trunk/update/src/java/depot-update.xml
incubator/depot/trunk/update/src/java/org/apache/depot/update/config/ConfigXMLEntryTable.java
incubator/depot/trunk/update/src/java/org/apache/depot/update/download/DownloadManager.java
incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterContext.java
incubator/depot/trunk/update/src/java/org/apache/depot/update/protocols/DefaultProtocolOperationsManager.java
incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLEntryTable.java
incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLHandler.java
incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLParser.java
Log:
Added JavaDocs for a better understanding of the API
Modified: incubator/depot/trunk/update/src/java/depot-update.xml
==============================================================================
--- incubator/depot/trunk/update/src/java/depot-update.xml (original)
+++ incubator/depot/trunk/update/src/java/depot-update.xml Tue Jul 13 12:44:32 2004
@@ -4,7 +4,7 @@
Default Depot Configuration
-====================;lo[oj[oj llnnioh==========================================================
+==============================================================================
-->
<config>
<repositoryset id="mock">
Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/config/ConfigXMLEntryTable.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/config/ConfigXMLEntryTable.java (original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/config/ConfigXMLEntryTable.java Tue Jul 13 12:44:32 2004
@@ -24,7 +24,48 @@
import org.apache.depot.update.util.xml.XMLTagConstants;
/**
- * @author anou_mana
+ * Concrete Implementation of an XMLEntryTable, provides some default classes for the configuration:
+ * <br/>
+ * <table>
+ * <tr>
+ * <th>Tag</th>
+ * <th>Class</th>
+ * </tr>
+ * <tr>
+ * <td>config</td>
+ * <td>XMLGrouperElement</td>
+ * </tr>
+ * <tr>
+ * <td>repositoryset</td>
+ * <td>RepositorySet</td>
+ * </tr>
+ * <tr>
+ * <td>repository</td>
+ * <td>DefaultRepository</td>
+ * </tr>
+ * <tr>
+ * <td>repository.url</td>
+ * <td>VirtualResourceLocator</td>
+ * </tr>
+ * <tr>
+ * <td>repository.active</td>
+ * <td>RepositoryAttribute</td>
+ * </tr>
+ * <tr>
+ * <td>repository.remote</td>
+ * <td>RepositoryAttribute</td>
+ * </tr>
+ * </table>
+ * <br/>
+ * Every class used here must provide the methods for the provided attributes.
+ *
+ * @see org.apache.depot.update.repository.RepositoryAttribute
+ * @see org.apache.depot.update.repository.DefaultRepository
+ * @see org.apache.depot.update.repository.RepositorySet
+ * @see org.apache.depot.update.util.net.VirtualResourceLocator
+ * @see org.apache.depot.update.util.xml.XMLGrouperElement
+ *
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
*/
public class ConfigXMLEntryTable extends XMLEntryTable {
@@ -56,4 +97,4 @@
XMLTagConstants.REPOSITORY_REMOTE_TAG,
RepositoryAttribute.REPOSITORY_ATTRIBUTE_CLASSNAME);
}
-}
+}
\ No newline at end of file
Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/download/DownloadManager.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/download/DownloadManager.java (original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/download/DownloadManager.java Tue Jul 13 12:44:32 2004
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.depot.update.download;
import java.util.Iterator;
@@ -36,7 +35,10 @@
private final ArtifactUpdaterContext m_context;
/**
+ * Constructor
+ * Initializes a Downloadmanager with a given ArtifactUpdaterContext
*
+ * @param context An ArtifactUpdaterContext
*/
public DownloadManager(ArtifactUpdaterContext context) {
m_context = context;
@@ -86,4 +88,5 @@
}
}
}
+
}
Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterContext.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterContext.java (original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterContext.java Tue Jul 13 12:44:32 2004
@@ -29,7 +29,10 @@
import org.apache.depot.update.util.reference.IReferenceable;
/**
- * @author arb_jack
+ * The ArtifactUpdaterContext provides some contextual information for an Artifact
+ *
+ *
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
*/
public class ArtifactUpdaterContext implements IReferenceable {
Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/protocols/DefaultProtocolOperationsManager.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/protocols/DefaultProtocolOperationsManager.java (original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/protocols/DefaultProtocolOperationsManager.java Tue Jul 13 12:44:32 2004
@@ -37,6 +37,8 @@
public DefaultProtocolOperationsManager(ArtifactUpdaterContext context) {
super(context);
+// :TODO: HttpClient should be the default, only if needed shoot for VFS (currently VFS not needed at all)
+// so basically the defaultProtocol is HTTP
// Shoot for VFS, but fallback to HttpClient or basic URL
try {
ClassLoaderContext loader = new ClassLoaderContext(context);
Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLEntryTable.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLEntryTable.java (original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLEntryTable.java Tue Jul 13 12:44:32 2004
@@ -19,21 +19,24 @@
import java.util.HashMap;
/**
- * @author anou_mana
+ * Implementation to store xml configuration tags and values in the provided classes. These classes
+ * can be provided through the xml-tag "class". Some standard-Classes are normally provided by the
+ * sub-classes
+ *
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
*/
public class XMLEntryTable
{
protected HashMap m_entryToClassMap = new HashMap();
/**
- *
+ * Constructor
*/
public XMLEntryTable()
{
super();
}
-
public void put(String entry, Class clazz)
{
this.m_entryToClassMap.put(entry, clazz);
@@ -49,8 +52,14 @@
return this.m_entryToClassMap.get(entry);
}
+ /**
+ * This returns the Class to the given entry
+ *
+ * @param entry
+ * @return
+ */
public Object getClass(String entry)
{
return this.m_entryToClassMap.get(entry);
}
-}
+}
\ No newline at end of file
Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLHandler.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLHandler.java (original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLHandler.java Tue Jul 13 12:44:32 2004
@@ -78,7 +78,7 @@
String clazzName = null;
- // find out if the tag - class is defined in the ruper.xml / XMLEntryTable
+ // find out if the tag - class is defined in the depot-update.xml / XMLEntryTable
if (classAttributeName != null
&& !classAttributeName.equals("")){
clazzName = classAttributeName;
Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLParser.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLParser.java (original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/xml/XMLParser.java Tue Jul 13 12:44:32 2004
@@ -30,14 +30,19 @@
import org.xml.sax.XMLReader;
/**
- * @author anou_mana
+ * Parser for xml-configuration files
+ *
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
*/
public class XMLParser {
private XMLEntryTable m_xmlEntryTable;
private ClassLoaderContext m_classLoaderHelper;
/**
+ * Constructor for the XMLParser
*
+ * @param xmlEntryTable a XMLEntryTable
+ * @param loaderHelper a ClassLoaderContext
*/
public XMLParser(
XMLEntryTable xmlEntryTable,