ruper2/src/java/core/org/krysalis/ruper/protocols ProtocolOperationsManager.java,1.6,1.7 VirtualResourceLocator.java,1.4,1.5

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/protocols
In directory sc8-pr-cvs1:/tmp/cvs-serv15024/src/java/core/org/krysalis/ruper/protocols

Modified Files:
	ProtocolOperationsManager.java VirtualResourceLocator.java 
Log Message:
1) created a Construuctor that takes (String id) on ResourceUpdater and RepositorySet,
so Anou's config can create them.

2) Created a simple <update ant task that leverages above to update a file.

Guts of (2) not completed.

Index: ProtocolOperationsManager.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/protocols/ProtocolOperationsManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ProtocolOperationsManager.java	8 Sep 2003 23:21:40 -0000	1.6
--- ProtocolOperationsManager.java	9 Sep 2003 18:37:03 -0000	1.7
***************
*** 15,18 ****
--- 15,19 ----
  import org.krysalis.ruper.RuperException;
  import org.krysalis.ruper.impl.ResourceUpdaterContext;
+ import org.krysalis.ruper.log.Logger;
  import org.krysalis.ruper.util.select.Selector;
  import org.krysalis.version.util.debug.DebugUtils;
***************
*** 100,103 ****
--- 101,105 ----
  		Selector selector)
  		throws Exception {
+ 		Logger.getLog().debug("Perform List " + container);
  		return determineProviderFor(container).list(container, selector);
  	}
***************
*** 112,115 ****
--- 114,118 ----
  	public boolean checkExists(VirtualResourceLocator container)
  		throws Exception {
+ 		Logger.getLog().debug("Check Exists " + container);
  		return determineProviderFor(container).exists(container);
  	}
***************
*** 127,130 ****
--- 130,136 ----
  		Selector selector)
  		throws Exception {
+ 			
+ 		Logger.getLog().debug("Perform Copy " + from + " -> " + to);
+ 			
  		determineProviderFor(from, to).copy(from, to, selector);
  	}
***************
*** 141,145 ****
  		if (null == sourceList)
  			throw new RuperException(
! 				"No providers for protocol : " + source.getProtocol());
  
  		List destinationList =
--- 147,151 ----
  		if (null == sourceList)
  			throw new RuperException(
! 				"No providers for source protocol : " + source.getProtocol());
  
  		List destinationList =
***************
*** 148,152 ****
  		if (null == destinationList)
  			throw new RuperException(
! 				"No providers for protocol : " + destination.getProtocol());
  
  		List providers = join(sourceList, destinationList);
--- 154,158 ----
  		if (null == destinationList)
  			throw new RuperException(
! 				"No providers for destination protocol : " + destination.getProtocol());
  
  		List providers = join(sourceList, destinationList);

Index: VirtualResourceLocator.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/protocols/VirtualResourceLocator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** VirtualResourceLocator.java	3 Sep 2003 22:56:35 -0000	1.4
--- VirtualResourceLocator.java	9 Sep 2003 18:37:03 -0000	1.5
***************
*** 8,11 ****
--- 8,12 ----
  import java.net.MalformedURLException;
  import java.net.URL;
+ import java.util.StringTokenizer;
  
  import org.krysalis.ruper.util.RuperConstants;
***************
*** 62,66 ****
  	private String createURLForFile(File file) {
  		StringBuffer url = new StringBuffer("file://");
! 		url.append(file.getAbsolutePath());
  		return url.toString();
  	}
--- 63,77 ----
  	private String createURLForFile(File file) {
  		StringBuffer url = new StringBuffer("file://");
! 		String path = file.getAbsolutePath();
! 		for (StringTokenizer tokens = new StringTokenizer(path, "\\");
! 			tokens.hasMoreTokens();
! 			) {
! 
! 			url.append(tokens.nextToken());
! 
! 			if (tokens.hasMoreTokens())
! 				url.append('/');
! 		}
! 
  		return url.toString();
  	}




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.