incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: rev 10050 - in incubator/depot/trunk/update/src: java/org/apache/depot/update java/org/apache/depot/update/ant/task java/org/apache/depot/update/config java/org/apache/depot/update/files java/org/apache/depot/update/impl java/org/apache/depot/update/protocols java/org/apache/depot/update/query java/org/apache/depot/update/repository java/org/apache/depot/update/tool java/org/apache/depot/update/util java/org/apache/depot/update/util/io java/org/apache/depot/update/util/net test/org/apache/depot/update/protocols test/org/apache/depot/update/query
Date Fri, 16 Apr 2004 19:11:43 GMT
Author: ajack
Date: Fri Apr 16 12:11:42 2004
New Revision: 10050

Added:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/util/UpdateConstants.java
Removed:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/util/RuperConstants.java
Modified:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ResourceUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/task/RepositoryToolTask.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/task/SynchronizeTask.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/config/RuperConfig.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceFilenameAnalyzer.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ResourceUpdaterContext.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/protocols/ProtocolOperationsManager.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQueryHelper.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractHierarchicalRepository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/DefaultRepository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManager.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySet.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySetSortContext.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoriesTool.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/util/io/FileUtils.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/util/net/VirtualResourceLocator.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/protocols/ProtocolOperationsManagerTests.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/query/QueryTests.java
Log:
More renaming...


Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ResourceUpdater.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ResourceUpdater.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ResourceUpdater.java	Fri
Apr 16 12:11:42 2004
@@ -41,7 +41,7 @@
 import org.apache.depot.update.repository.RepositorySetSortContext;
 import org.apache.depot.update.resource.Resource;
 import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.identity.GenericIdentifier;
 import org.apache.depot.update.util.reference.IReferenceable;
 import org.apache.depot.update.util.reference.NoSuchReferenceException;
@@ -78,7 +78,7 @@
 
 	public static ResourceUpdater getResourceUpdater() throws UpdateException {
 
-		return getResourceUpdater(RuperConstants.DEFAULT, true);
+		return getResourceUpdater(UpdateConstants.DEFAULT, true);
 	}
 
 	public static ResourceUpdater getResourceUpdater(
@@ -88,7 +88,7 @@
 
 		ResourceUpdater ruper = null;
 		GenericIdentifier identifier =
-			new GenericIdentifier(RuperConstants.DEFAULT, id);
+			new GenericIdentifier(UpdateConstants.DEFAULT, id);
 
 		if (ReferenceManager.hasReference(identifier)) {
 			try {
@@ -138,7 +138,7 @@
 	*/
 	public ResourceUpdater() {
 		ResourceUpdaterIdentifier ruperId =
-			new ResourceUpdaterIdentifier(RuperConstants.DEFAULT);
+			new ResourceUpdaterIdentifier(UpdateConstants.DEFAULT);
 		m_ruperEngine = new ResourceUpdaterEngine();
 		resourceConfigInit();
 	}
@@ -567,7 +567,7 @@
 	public static ResourceUpdater getDefaultResourceUpdater()
 		throws UpdateException {
 		return getResourceUpdater(
-			new ResourceUpdaterIdentifier(RuperConstants.DEFAULT),
+			new ResourceUpdaterIdentifier(UpdateConstants.DEFAULT),
 			true);
 	}
 

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/task/RepositoryToolTask.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/task/RepositoryToolTask.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/task/RepositoryToolTask.java
Fri Apr 16 12:11:42 2004
@@ -27,7 +27,7 @@
 import org.apache.depot.update.repository.RepositorySet;
 import org.apache.depot.update.resource.ResourceGroup;
 import org.apache.depot.update.resource.ResourceSpecifier;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.select.AllSelector;
 import org.apache.depot.version.ant.util.AntLogListener;
 import org.apache.tools.ant.BuildException;
@@ -39,8 +39,8 @@
  */
 public class RepositoryToolTask extends Task {
 
-	private String m_ruper = RuperConstants.DEFAULT;
-	private String m_repositories = RuperConstants.DEFAULT;
+	private String m_ruper = UpdateConstants.DEFAULT;
+	private String m_repositories = UpdateConstants.DEFAULT;
 	private String m_group = null;
 
 	/**

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/task/SynchronizeTask.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/task/SynchronizeTask.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/task/SynchronizeTask.java
Fri Apr 16 12:11:42 2004
@@ -21,7 +21,7 @@
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.version.ant.util.AntLogListener;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
@@ -33,9 +33,9 @@
 public class SynchronizeTask extends Task {
 
 	private String m_group = null;
-	private String m_ruper = RuperConstants.DEFAULT;
-	private String m_target = RuperConstants.LIBRARY;
-	private String m_repositories = RuperConstants.DEFAULT;
+	private String m_ruper = UpdateConstants.DEFAULT;
+	private String m_target = UpdateConstants.LIBRARY;
+	private String m_repositories = UpdateConstants.DEFAULT;
 
 	/**
 	 * @param string
@@ -86,13 +86,13 @@
 			//
 			// This uses default or configured stuff..
 			//
-			if (!RuperConstants.DEFAULT.equals(m_ruper))
+			if (!UpdateConstants.DEFAULT.equals(m_ruper))
 				log("Resource Updater: " + m_ruper, Project.MSG_INFO);
 
 			// Get the Resource Updater asked for
 			ResourceUpdater ruper = new ResourceUpdater(m_ruper);
 
-			if (!RuperConstants.LIBRARY.equals(m_target))
+			if (!UpdateConstants.LIBRARY.equals(m_target))
 				log("Target Repository: " + m_target, Project.MSG_INFO);
 
 			// Assigned the target (to copy into)

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/config/RuperConfig.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/config/RuperConfig.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/config/RuperConfig.java
Fri Apr 16 12:11:42 2004
@@ -22,7 +22,7 @@
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.common.util.envsafe.ClassLoaderContext;
 import org.apache.depot.update.impl.ReferenceManager;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.update.util.xml.XMLContext;
@@ -83,7 +83,7 @@
 
 	public static void configure() {
 		if (!l_configured) {
-			configure(RuperConstants.DEFAULT_CONFIG_XML);
+			configure(UpdateConstants.DEFAULT_CONFIG_XML);
 			l_configured = true;
 		}
 	}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceFilenameAnalyzer.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceFilenameAnalyzer.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceFilenameAnalyzer.java
Fri Apr 16 12:11:42 2004
@@ -34,7 +34,7 @@
 import org.apache.depot.update.resource.ResourceAttribute;
 import org.apache.depot.update.resource.ResourceGroup;
 import org.apache.depot.update.resource.ResourceType;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -91,30 +91,30 @@
 			String extension = resource.getExtension();
 
 			if ((null != extension)
-				&& (extension.endsWith(RuperConstants.MD5_EXTN))
-				&& (extension.length() > RuperConstants.MD5_EXTN.length())) {
+				&& (extension.endsWith(UpdateConstants.MD5_EXTN))
+				&& (extension.length() > UpdateConstants.MD5_EXTN.length())) {
 
 				Resource orig = new Resource(resource);
 
 				String newExtn =
 					extension.substring(
 						0,
-						extension.length() - RuperConstants.MD5_EXTN.length());
+						extension.length() - UpdateConstants.MD5_EXTN.length());
 				orig.setExtension(newExtn);
 
 				m_md5map.put(orig, resource.getLocation());
 			}
 			else if (
 				(null != extension)
-					&& (extension.endsWith(RuperConstants.ASC_EXTN))
-					&& (extension.length() > RuperConstants.ASC_EXTN.length())) {
+					&& (extension.endsWith(UpdateConstants.ASC_EXTN))
+					&& (extension.length() > UpdateConstants.ASC_EXTN.length())) {
 
 				Resource orig = new Resource(resource);
 
 				String newExtn =
 					extension.substring(
 						0,
-						extension.length() - RuperConstants.ASC_EXTN.length());
+						extension.length() - UpdateConstants.ASC_EXTN.length());
 				orig.setExtension(newExtn);
 
 				m_ascmap.put(orig, resource.getLocation());

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ResourceUpdaterContext.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ResourceUpdaterContext.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ResourceUpdaterContext.java
Fri Apr 16 12:11:42 2004
@@ -22,7 +22,7 @@
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.protocols.DefaultProtocolOperationsManager;
 import org.apache.depot.update.protocols.ProtocolOperationsManager;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.identity.GenericIdentifier;
 import org.apache.depot.update.util.reference.IReferenceable;
 
@@ -52,12 +52,12 @@
 
 	public ResourceUpdaterContext() {
 		m_baseFile = SystemUtils.getCWD();
-		initClass(new ResourceUpdaterContextIdentifier(RuperConstants.DEFAULT));
+		initClass(new ResourceUpdaterContextIdentifier(UpdateConstants.DEFAULT));
 	}
 
 	public ResourceUpdaterContext(File baseFile) {
 		m_baseFile = baseFile;
-		initClass(new ResourceUpdaterContextIdentifier(RuperConstants.DEFAULT));
+		initClass(new ResourceUpdaterContextIdentifier(UpdateConstants.DEFAULT));
 	}
 
 	private void initClass(ResourceUpdaterContextIdentifier identifier) {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/protocols/ProtocolOperationsManager.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/protocols/ProtocolOperationsManager.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/protocols/ProtocolOperationsManager.java
Fri Apr 16 12:11:42 2004
@@ -32,7 +32,7 @@
 import org.apache.depot.update.protocols.select.DestinationProtocolProviderSelector;
 import org.apache.depot.update.protocols.select.SourceDestinationProtocolProviderSelector;
 import org.apache.depot.update.protocols.select.SourceProtocolProviderSelector;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.chainprocess.HandlerManager;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.select.ISelector;
@@ -60,7 +60,7 @@
 		// create the selector handler chain and 
 		// add it to the list of handler chains
 		SelectorHandlerChain selectors =
-			new SelectorHandlerChain(RuperConstants.SELECTOR);
+			new SelectorHandlerChain(UpdateConstants.SELECTOR);
 		// add the selectors chain to the handler manager
 		this.addHandlerChain(selectors);
 	}
@@ -265,7 +265,7 @@
 		List selectorList = new ArrayList();
 		selectorList.add(selector);
 
-		setHandlers(RuperConstants.SELECTOR, selectorList);
+		setHandlers(UpdateConstants.SELECTOR, selectorList);
 
 		listOfProviders = process(m_providers);
 		return listOfProviders;

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQueryHelper.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQueryHelper.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQueryHelper.java
Fri Apr 16 12:11:42 2004
@@ -26,7 +26,7 @@
 import org.apache.depot.update.resource.ResourceSpecifier;
 import org.apache.depot.update.resource.compare.StandardResourceComparisons;
 import org.apache.depot.update.resource.select.StandardSelections;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.select.AllSelector;
 import org.apache.depot.update.util.select.ISelector;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -58,7 +58,7 @@
 		throws UpdateException {
 		return getResourceSpecifierQuery(
 			specifier,
-			RepositorySet.getRepositorySet(RuperConstants.DEFAULT, true));
+			RepositorySet.getRepositorySet(UpdateConstants.DEFAULT, true));
 	}
 
 	public static ResourceQuery getResourceSpecifierQuery(
@@ -98,7 +98,7 @@
 		throws UpdateException {
 		return getResourceGroupQuery(
 			group,
-			RepositorySet.getRepositorySet(RuperConstants.DEFAULT, true));
+			RepositorySet.getRepositorySet(UpdateConstants.DEFAULT, true));
 	}
 
 	public static ResourceQuery getResourceGroupQuery(

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractHierarchicalRepository.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractHierarchicalRepository.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractHierarchicalRepository.java
Fri Apr 16 12:11:42 2004
@@ -25,7 +25,7 @@
 import org.apache.depot.update.resource.Resource;
 import org.apache.depot.update.resource.ResourceGroup;
 import org.apache.depot.update.resource.compare.StandardResourceComparisons;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.compare.ComparisonHelper;
 import org.apache.depot.update.util.flag.Flag;
 import org.apache.depot.update.util.io.ResolvedFile;
@@ -148,10 +148,10 @@
 				}
 			}
 			else
-				results = RuperConstants.EMPTY_LIST;
+				results = UpdateConstants.EMPTY_LIST;
 		}
 		else
-			results = RuperConstants.EMPTY_LIST;
+			results = UpdateConstants.EMPTY_LIST;
 
 		return results;
 	}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/DefaultRepository.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/DefaultRepository.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/DefaultRepository.java
Fri Apr 16 12:11:42 2004
@@ -23,7 +23,7 @@
 import org.apache.depot.update.impl.ResourceUpdaterContext;
 import org.apache.depot.update.resource.Resource;
 import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.net.select.ChildVrlSelector;
@@ -99,11 +99,11 @@
 				results = SelectionHelper.select(analyzedGroupList, selector);
 			}
 			else
-				results = RuperConstants.EMPTY_LIST;
+				results = UpdateConstants.EMPTY_LIST;
 
 		}
 		else
-			results = RuperConstants.EMPTY_LIST;
+			results = UpdateConstants.EMPTY_LIST;
 
 		return results;
 	}
@@ -134,7 +134,7 @@
 			results = SelectionHelper.select(analyzedGroupList, selector);
 		}
 		else
-			results = RuperConstants.EMPTY_LIST;
+			results = UpdateConstants.EMPTY_LIST;
 
 		return results;
 	}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManager.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManager.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManager.java
Fri Apr 16 12:11:42 2004
@@ -24,7 +24,7 @@
 import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.impl.ResourceUpdaterEngine;
 import org.apache.depot.update.query.ResourceQuery;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.chainprocess.HandlerChain;
 import org.apache.depot.update.util.chainprocess.HandlerManager;
 import org.apache.depot.update.util.select.SelectorHandlerChain;
@@ -34,7 +34,7 @@
  */
 public class RepositoryManager extends HandlerManager {
 
-	private String m_sortContextID = RuperConstants.DEFAULT;
+	private String m_sortContextID = UpdateConstants.DEFAULT;
 	private RepositorySet m_defaultSortedRepositorySet;
 
 	public RepositoryManager() {
@@ -45,9 +45,9 @@
 	private void configure() {
 
 		// create the comparator and 
-		HandlerChain comparators = new HandlerChain(RuperConstants.COMPARATOR);
+		HandlerChain comparators = new HandlerChain(UpdateConstants.COMPARATOR);
 		SelectorHandlerChain selectors =
-			new SelectorHandlerChain(RuperConstants.SELECTOR);
+			new SelectorHandlerChain(UpdateConstants.SELECTOR);
 
 		// first add the selectors
 		this.addHandlerChain(selectors);
@@ -74,7 +74,7 @@
 		else{
 		
 			m_defaultSortedRepositorySet = RepositorySet.getRepositorySet(
-						new RepositorySetIdentifier(RuperConstants.DEFAULT),
+						new RepositorySetIdentifier(UpdateConstants.DEFAULT),
 						true);
 		}
 	}
@@ -82,7 +82,7 @@
 	private void sortDefaultRepositorySet() {
 		RepositorySet repositorySet =
 			RepositorySet.getRepositorySet(
-				new RepositorySetIdentifier(RuperConstants.DEFAULT),
+				new RepositorySetIdentifier(UpdateConstants.DEFAULT),
 				true);
 		try {
 			this.m_defaultSortedRepositorySet =
@@ -105,13 +105,13 @@
 	public void setRepositorySortContext(RepositorySetSortContext repositorySetSortContext)
{
 		// add the selectors to the chain
 		SelectorHandlerChain shandlerChain =
-			(SelectorHandlerChain) m_handlerChains.get(RuperConstants.SELECTOR);
+			(SelectorHandlerChain) m_handlerChains.get(UpdateConstants.SELECTOR);
 		shandlerChain.setHandlers(
 			repositorySetSortContext.getRepositorySelectors());
 
 		//	add the comparators to the chain
 		HandlerChain handlerChain =
-			(HandlerChain) m_handlerChains.get(RuperConstants.COMPARATOR);
+			(HandlerChain) m_handlerChains.get(UpdateConstants.COMPARATOR);
 		handlerChain.setHandlers(
 			repositorySetSortContext.getRepositoryComparators());
 
@@ -175,7 +175,7 @@
 			}
 			else {
 				// no sort context - set the default sort
-				if (!this.m_sortContextID.equals(RuperConstants.DEFAULT)) {
+				if (!this.m_sortContextID.equals(UpdateConstants.DEFAULT)) {
 					this.setDefaultRepositorySortContext();
 				}
 			}
@@ -186,7 +186,7 @@
 			if (repositorySet == null) {
 				repositorySet =
 					RepositorySet.getRepositorySet(
-						new RepositorySetIdentifier(RuperConstants.DEFAULT),
+						new RepositorySetIdentifier(UpdateConstants.DEFAULT),
 						false);
 			}
 

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySet.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySet.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySet.java
Fri Apr 16 12:11:42 2004
@@ -21,7 +21,7 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.impl.ReferenceManager;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.identity.GenericIdentifier;
 import org.apache.depot.update.util.reference.IReferenceable;
 import org.apache.depot.update.util.reference.NoSuchReferenceException;
@@ -41,11 +41,11 @@
 	 * 
 	 */
 	public RepositorySet() {
-		this(new RepositorySetIdentifier(RuperConstants.UNNAMED));
+		this(new RepositorySetIdentifier(UpdateConstants.UNNAMED));
 	}
 
 	public RepositorySet(ArrayList list) {
-		this(new RepositorySetIdentifier(RuperConstants.UNNAMED));
+		this(new RepositorySetIdentifier(UpdateConstants.UNNAMED));
 		this.m_repositories = list;
 	}
 
@@ -55,7 +55,7 @@
 	}
 
 	public RepositorySet(IRepository target) {
-		this(new RepositorySetIdentifier(RuperConstants.UNNAMED));
+		this(new RepositorySetIdentifier(UpdateConstants.UNNAMED));
 		m_repositories.add(target);
 	}
 

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySetSortContext.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySetSortContext.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySetSortContext.java
Fri Apr 16 12:11:42 2004
@@ -22,7 +22,7 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.impl.ReferenceManager;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.identity.GenericIdentifier;
 import org.apache.depot.update.util.reference.IReferenceable;
 import org.apache.depot.update.util.reference.NoSuchReferenceException;
@@ -102,7 +102,7 @@
 	}
 
 	public static RepositorySetSortContext getDefaultRepositorySetSortContext() {
-		return getRepositorySetSortContext(RuperConstants.DEFAULT);
+		return getRepositorySetSortContext(UpdateConstants.DEFAULT);
 	}
 
 	public static RepositorySetSortContext getRepositorySetSortContext(String identifier) {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoriesTool.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoriesTool.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoriesTool.java
Fri Apr 16 12:11:42 2004
@@ -20,7 +20,7 @@
 import org.apache.depot.common.util.cli.Option;
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.update.repository.RepositorySet;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 
 /**
  */
@@ -50,7 +50,7 @@
 		String setId =
 			cmdline.isSet(l_setOption)
 				? cmdline.getOptionValue(l_setOption)
-				: RuperConstants.DEFAULT;
+				: UpdateConstants.DEFAULT;
 
 		//DebugUtils.printSeparator();
 		//DebugUtils.dump(cmdline);

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/UpdateConstants.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/UpdateConstants.java
Fri Apr 16 12:11:42 2004
@@ -0,0 +1,90 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update.util;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.depot.update.util.net.VirtualResourceLocator;
+
+/**
+ * @author arb_jack
+ */
+public class UpdateConstants {
+	public final static List EMPTY_LIST = new ArrayList();
+
+	public final static String DEFAULT_CONFIG_XML = "depot-update.xml";
+	public final static String FILE_PREFIX = "file://";
+
+	public final static String STANDARD = "standard";
+	public final static String DEFAULT = "default";
+	public final static String UNNAMED = "unnamed";
+	
+	public final static String RUPER_HOME = "http://www.apache.org/depot/";
+
+	public final static String MD5 = "md5";
+	public final static String MD5_EXTN = "." + MD5;
+
+	public final static String ASC = "asc";
+	public final static String ASC_EXTN = "." + ASC;
+
+	public final static String LIBRARY = "lib";
+	public final static String TEST = "test";
+	public final static String MOCK = "mock";
+	
+	// Repository locations
+	public final static String APACHE_LOCATION = "http://www.apache.org/library/projects/";
+	public final static String MAVEN_LOCATION = "http://www.ibiblio.org/maven/";
+
+	// selector/comparator
+	public final static String SELECTOR = "SELECTOR";
+	public final static String COMPARATOR = "COMPARATOR";
+
+	// :TODO: How can I make these final?  -- probably don't need this, it should be in xml
+	public static URL MAVEN_URL;
+	static {
+		try {
+			MAVEN_URL = new URL(MAVEN_LOCATION);
+		}
+		catch (Exception e) {
+			e.printStackTrace(System.err);
+		}
+	}
+	
+	// :TODO: How can I make these final?
+	public static VirtualResourceLocator MAVEN_VRL;
+	static {
+		try {
+			MAVEN_VRL = new VirtualResourceLocator(MAVEN_LOCATION);
+		}
+		catch (Exception e) {
+			e.printStackTrace(System.err);
+		}
+	}
+	
+	// :TODO: How can I make these final?
+	public static VirtualResourceLocator APACHE_VRL;
+	static {
+		try {
+			APACHE_VRL = new VirtualResourceLocator(APACHE_LOCATION);
+		}
+		catch (Exception e) {
+			e.printStackTrace(System.err);
+		}
+	}
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/io/FileUtils.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/util/io/FileUtils.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/io/FileUtils.java	Fri
Apr 16 12:11:42 2004
@@ -27,7 +27,7 @@
 
 import org.apache.depot.common.util.io.IOUtils;
 import org.apache.depot.update.UpdateRuntimeException;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 
 public class FileUtils {
 
@@ -101,7 +101,7 @@
 		
 		String pathString = path.getAbsolutePath();
 
-		StringBuffer sb = new StringBuffer(RuperConstants.FILE_PREFIX);
+		StringBuffer sb = new StringBuffer(UpdateConstants.FILE_PREFIX);
 
 		// add an extra slash for filesystems with drive-specifiers
 		if (!pathString.startsWith(File.separator)) {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/util/net/VirtualResourceLocator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/util/net/VirtualResourceLocator.java
(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/util/net/VirtualResourceLocator.java
Fri Apr 16 12:11:42 2004
@@ -21,7 +21,7 @@
 import java.net.URL;
 
 import org.apache.depot.update.protocols.Protocol;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.io.FileUtils;
 import org.apache.depot.update.util.io.ResolvedFile;
 
@@ -110,9 +110,9 @@
 	 */
 	public File getFile() throws Exception {
 		String fileString = m_url;
-		if (fileString.startsWith(RuperConstants.FILE_PREFIX))
+		if (fileString.startsWith(UpdateConstants.FILE_PREFIX))
 			fileString =
-				fileString.substring(RuperConstants.FILE_PREFIX.length());
+				fileString.substring(UpdateConstants.FILE_PREFIX.length());
 
 		return new File(fileString);
 	}
@@ -195,6 +195,6 @@
 	}
 
 	public static VirtualResourceLocator getTestVRL() {
-		return new VirtualResourceLocator(RuperConstants.RUPER_HOME);
+		return new VirtualResourceLocator(UpdateConstants.RUPER_HOME);
 	}
 }

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/protocols/ProtocolOperationsManagerTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/protocols/ProtocolOperationsManagerTests.java
(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/protocols/ProtocolOperationsManagerTests.java
Fri Apr 16 12:11:42 2004
@@ -19,7 +19,7 @@
 import junit.framework.TestCase;
 
 import org.apache.depot.update.impl.ResourceUpdaterContext;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.select.AllSelector;
@@ -43,7 +43,7 @@
 
 	public void setUp() throws Exception {
 		m_pom = new DefaultProtocolOperationsManager(m_testContext);
-		m_http = new VirtualResourceLocator(RuperConstants.MAVEN_URL);
+		m_http = new VirtualResourceLocator(UpdateConstants.MAVEN_URL);
 		m_file = new VirtualResourceLocator(ResolvedFile.resolve("."));
 	}
 

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/query/QueryTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/query/QueryTests.java	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/query/QueryTests.java	Fri
Apr 16 12:11:42 2004
@@ -30,7 +30,7 @@
 import org.apache.depot.update.resource.select.ReleaseLevelSelector;
 import org.apache.depot.update.resource.select.TypeSelector;
 import org.apache.depot.update.resource.select.VersionSelector;
-import org.apache.depot.update.util.RuperConstants;
+import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.select.logic.AndSelector;
 import org.apache.depot.update.util.select.logic.OrSelector;
 import org.apache.depot.version.impl.ApacheVersion;
@@ -61,7 +61,7 @@
 
 		m_repoSet =
 			new RepositorySetWrapper(
-				RepositorySet.getRepositorySet(RuperConstants.MOCK, true),
+				RepositorySet.getRepositorySet(UpdateConstants.MOCK, true),
 				m_context);
 	}
 

Mime
View raw message