Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

cvs commit: spice/sandbox/repository/componenthaus/src/java/org/componentha: msg#00067

java.spice.cvs

Subject: cvs commit: spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/api ComponentRepository.java RepositoryImpl.java

hogie 03/09/22 12:20:49

Modified:
sandbox/repository/componenthaus/src/java/org/componenthaus/repository/api
ComponentRepository.java RepositoryImpl.java
Log:
Initial integration of Lucene search service. Last component overwrites
Lucene index at the minute

Revision Changes Path
1.2 +4 -0
spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/api/ComponentRepository.java

Index: ComponentRepository.java
===================================================================
RCS file:
/cvsroot/spice/spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/api/ComponentRepository.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ComponentRepository.java 21 Sep 2003 13:41:57 -0000 1.1
+++ ComponentRepository.java 22 Sep 2003 19:20:49 -0000 1.2
@@ -10,4 +10,8 @@
void registerDownloadable(String componentId, File downloadable);
File getDownloadable(String componentId);
ServiceImplementation getImplementation(String componentId, String
implId);
+
+ public static interface Monitor {
+ public void componentAdded(final Component component);
+ }
}



1.2 +15 -1
spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/api/RepositoryImpl.java

Index: RepositoryImpl.java
===================================================================
RCS file:
/cvsroot/spice/spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/api/RepositoryImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RepositoryImpl.java 21 Sep 2003 13:41:57 -0000 1.1
+++ RepositoryImpl.java 22 Sep 2003 19:20:49 -0000 1.2
@@ -1,6 +1,8 @@
package org.componenthaus.repository.api;

import org.prevayler.implementation.AbstractPrevalentSystem;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.context.ApplicationContextException;

import java.util.HashMap;
import java.util.Map;
@@ -9,21 +11,33 @@
import java.util.Iterator;
import java.io.File;

-public class RepositoryImpl extends AbstractPrevalentSystem implements
ComponentRepository {
+public class RepositoryImpl extends AbstractPrevalentSystem implements
ComponentRepository,InitializingBean {
private final Map components;
private final Map downloadables;
+ private ComponentRepository.Monitor monitor = null;

public RepositoryImpl() {
components = new HashMap();
downloadables = new HashMap();
}

+ public void setMonitor(ComponentRepository.Monitor monitor) {
+ this.monitor = monitor;
+ }
+
+ public void afterPropertiesSet() throws Exception {
+ if ( monitor == null ) {
+ throw new ApplicationContextException("Must set property
'monitor' on " + getClass());
+ }
+ }
+
public String add(Component component) {
assert component != null;
assert component.getId() == null; //I'm in charge of ids
component.setId(""+components.size());
components.put(component.getId(),component);
giveIdsToImplementations(component);
+ monitor.componentAdded(component);
return component.getId();
}






-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe