ruper2/src/java/core/org/krysalis/ruper2/impl ResourceUpdaterEngine.java,1.3,1.4 DefaultResourceUpdaterEngine.java,1.2,NONE

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

Modified Files:
	ResourceUpdaterEngine.java 
Removed Files:
	DefaultResourceUpdaterEngine.java 
Log Message:
Attempt to bring closer to working w/ Anou's API.

Index: ResourceUpdaterEngine.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/impl/ResourceUpdaterEngine.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ResourceUpdaterEngine.java	9 Oct 2003 14:05:39 -0000	1.3
--- ResourceUpdaterEngine.java	10 Oct 2003 21:26:25 -0000	1.4
***************
*** 8,15 ****
  
  import org.krysalis.ruper2.RuperException;
- import org.krysalis.ruper2.StandardResourceUpdater;
- import org.krysalis.ruper2.config.RuperConfig;
  import org.krysalis.ruper2.log.Logger;
  import org.krysalis.ruper2.messaging.ResourceRequest;
  import org.krysalis.ruper2.query.DefaultQueryEngine;
  import org.krysalis.ruper2.query.ResourceQuery;
--- 8,14 ----
  
  import org.krysalis.ruper2.RuperException;
  import org.krysalis.ruper2.log.Logger;
  import org.krysalis.ruper2.messaging.ResourceRequest;
+ import org.krysalis.ruper2.protocols.DefaultProtocolOperationsManager;
  import org.krysalis.ruper2.query.DefaultQueryEngine;
  import org.krysalis.ruper2.query.ResourceQuery;
***************
*** 22,28 ****
  import org.krysalis.ruper2.resource.Resource;
  import org.krysalis.ruper2.resource.ResourceIdentifier;
- import org.krysalis.ruper2.util.RuperConstants;
- import org.krysalis.ruper2.util.identity.GenericIdentifier;
- import org.krysalis.ruper2.util.reference.IReferenceable;
  import org.krysalis.ruper2.util.text.Messages;
  
--- 21,24 ----
***************
*** 31,43 ****
   * @author anou_mana
   */
! public class ResourceUpdaterEngine implements IReferenceable {
  
- 	static {
- 		// Configure from the XML file...
- 		//:TODO: *Maybe* move later, or allow user to pass filename
- 		RuperConfig.configure();
- 	}	
- 	
- 	private ResourceUpdaterIdentifier m_identifier = null;
  	private ResourceUpdaterContext m_context = null;
  	private DefaultQueryEngine m_engine = null;
--- 27,32 ----
   * @author anou_mana
   */
! public class ResourceUpdaterEngine {
  
  	private ResourceUpdaterContext m_context = null;
  	private DefaultQueryEngine m_engine = null;
***************
*** 49,75 ****
  	 * 
  	 */
! 	public ResourceUpdaterEngine(
! 		ResourceUpdaterIdentifier identifier,
! 		ResourceUpdaterContext context) {
! 		m_identifier = identifier;
  		m_context = context;
- 
  		initClass();
  	}
  
- 
- 
  	public ResourceUpdaterEngine(ResourceUpdaterIdentifier identifier) {
- 		m_identifier = identifier;
- 		initClass();
- 	}
- 
- 	public ResourceUpdaterEngine(String identifier) {
- 		m_identifier = new ResourceUpdaterIdentifier(identifier);
  		initClass();
  	}
  
  	public ResourceUpdaterEngine() {
- 		m_identifier = new ResourceUpdaterIdentifier(RuperConstants.DEFAULT);
  		initClass();
  	}
--- 38,51 ----
  	 * 
  	 */
! 	public ResourceUpdaterEngine(ResourceUpdaterContext context) {
  		m_context = context;
  		initClass();
  	}
  
  	public ResourceUpdaterEngine(ResourceUpdaterIdentifier identifier) {
  		initClass();
  	}
  
  	public ResourceUpdaterEngine() {
  		initClass();
  	}
***************
*** 83,91 ****
  		//	initialize the repository management
  		m_repositoryManager = new RepositoryManager();
! 	}	//
! 	// Instantiation/Configuration
! 	//
! 	public GenericIdentifier getIdentifier() {
! 		return m_identifier;
  	}
  
--- 59,65 ----
  		//	initialize the repository management
  		m_repositoryManager = new RepositoryManager();
! 		
! 		getContext().setProtocolManager(
! 			new DefaultProtocolOperationsManager(getContext()));
  	}
  
***************
*** 169,197 ****
  	}
  
- 
- 
- 	public static ResourceUpdaterEngine getResourceUpdater(
- 		ResourceUpdaterIdentifier identifier,
- 		final boolean createIfRequired)
- 		throws RuperException {
- 
- 		ResourceUpdaterEngine ruper = null;
- 
- 		if (ReferenceManager.hasReference(identifier)) {
- 			ruper = (ResourceUpdaterEngine) ReferenceManager.getReference(identifier);
- 		}
- 		else {
- 
- 			if (!createIfRequired)
- 				throw new RuperException(
- 					"Failed to access ResourceUpdater [" + identifier + "]");
- 
- 			ruper = new StandardResourceUpdater(identifier);
- 
- 			ReferenceManager.createReference(ruper);
- 		}
- 
- 		return ruper;
- 	}
  	/**
  	 * @return
--- 143,146 ----
***************
*** 207,211 ****
  		return m_repositoryManager.getDefaultRepositorySortContext();
  	}
! 	
  	/**
  	 * @return
--- 156,160 ----
  		return m_repositoryManager.getDefaultRepositorySortContext();
  	}
! 
  	/**
  	 * @return
***************
*** 230,240 ****
  
  	/**
- 	 * @param identifier
- 	 */
- 	public void setIdentifier(ResourceUpdaterIdentifier identifier) {
- 		m_identifier = identifier;
- 	}
- 
- 	/**
  	 * @param manager
  	 */
--- 179,182 ----
***************
*** 242,245 ****
  		m_repositoryManager = manager;
  	}
- 
  }
--- 184,186 ----

--- DefaultResourceUpdaterEngine.java DELETED ---




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
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.