ruper2/src/java/core/org/krysalis/ruper ResourceUpdater.java,1.11,1.12

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

Modified Files:
	ResourceUpdater.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: ResourceUpdater.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/ResourceUpdater.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ResourceUpdater.java	8 Sep 2003 23:21:41 -0000	1.11
--- ResourceUpdater.java	9 Sep 2003 18:37:05 -0000	1.12
***************
*** 55,58 ****
--- 55,64 ----
  	}
  
+ 	public ResourceUpdater(String identifier) {
+ 		m_identifier = new ResourceUpdaterIdentifier(identifier);
+ 		m_context = new ResourceUpdaterContext(RuperConstants.DEFAULT);
+ 		m_engine = new DefaultQueryEngine();
+ 	}
+ 
  	public ResourceUpdater() {
  		m_identifier = new ResourceUpdaterIdentifier(RuperConstants.DEFAULT);
***************
*** 89,116 ****
  	}
  
- 	public static ResourceUpdater getResourceUpdater(
- 		ResourceUpdaterIdentifier identifier,
- 		final boolean createIfRequired)
- 		throws RuperException {
- 
- 		ResourceUpdater ruper = null;
- 
- 		if (ReferenceManager.hasReference(identifier)) {
- 			ruper = (ResourceUpdater) ReferenceManager.getReference(identifier);
- 		}
- 		else {
- 
- 			if (!createIfRequired)
- 				throw new RuperException(
- 					"Failed to access ResourceUpdater [" + identifier + "]");
- 
- 			ruper = new StandardResourceUpdater(identifier);
- 
- 			ReferenceManager.createReference(ruper);
- 		}
- 
- 		return ruper;
- 	}
- 
  	public void perform(ResourceRequest request) throws RuperException {
  		ResourceResult result = performRequest(request);
--- 95,98 ----
***************
*** 171,174 ****
--- 153,180 ----
  
  		return wrappers;
+ 	}
+ 
+ 	public static ResourceUpdater getResourceUpdater(
+ 		ResourceUpdaterIdentifier identifier,
+ 		final boolean createIfRequired)
+ 		throws RuperException {
+ 
+ 		ResourceUpdater ruper = null;
+ 
+ 		if (ReferenceManager.hasReference(identifier)) {
+ 			ruper = (ResourceUpdater) ReferenceManager.getReference(identifier);
+ 		}
+ 		else {
+ 
+ 			if (!createIfRequired)
+ 				throw new RuperException(
+ 					"Failed to access ResourceUpdater [" + identifier + "]");
+ 
+ 			ruper = new StandardResourceUpdater(identifier);
+ 
+ 			ReferenceManager.createReference(ruper);
+ 		}
+ 
+ 		return ruper;
  	}
  }




-------------------------------------------------------
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.