cvs commit: spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/impl ComponentImpl.java ServiceImpl.java ServiceImplementationFactory.java ServiceImplementationImpl.java
Mike Hogan <[email protected]> Sun, 09 Nov 2003 06:00:48 -0800
| Newsgroups | gmane.comp.java.spice.cvs |
|---|---|
| Message-ID | <[email protected]> |
hogie 03/11/09 06:00:48
Modified: sandbox/repository/componenthaus/src/java/org/componenthaus/repository/impl
ComponentImpl.java ServiceImpl.java
Removed: sandbox/repository/componenthaus/src/java/org/componenthaus/repository/impl
ServiceImplementationFactory.java
ServiceImplementationImpl.java
Log:
If components are classes, show as little of the class as necessary to show service offering
Revision Changes Path
1.4 +1 -10 spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/impl/ComponentImpl.java
Index: ComponentImpl.java
===================================================================
RCS file: /cvsroot/spice/spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/impl/ComponentImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ComponentImpl.java 26 Oct 2003 13:46:41 -0000 1.3
+++ ComponentImpl.java 9 Nov 2003 14:00:48 -0000 1.4
@@ -1,13 +1,12 @@
package org.componenthaus.repository.impl;
import org.componenthaus.repository.api.Component;
-import org.componenthaus.repository.api.ServiceImplementation;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.List;
import java.util.Collections;
+import java.util.List;
public class ComponentImpl extends ServiceImpl implements Component, Serializable {
private String id = null;
@@ -30,14 +29,6 @@
public void setId(String id) {
this.id = id;
- }
-
- public Collection getImplementations() {
- return implementations;
- }
-
- public void addImplementation(ServiceImplementation impl) {
- implementations.add(impl);
}
public String getServiceInterface() {
1.3 +22 -2 spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/impl/ServiceImpl.java
Index: ServiceImpl.java
===================================================================
RCS file: /cvsroot/spice/spice/sandbox/repository/componenthaus/src/java/org/componenthaus/repository/impl/ServiceImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServiceImpl.java 24 Sep 2003 18:49:20 -0000 1.2
+++ ServiceImpl.java 9 Nov 2003 14:00:48 -0000 1.3
@@ -1,6 +1,7 @@
package org.componenthaus.repository.impl;
import org.componenthaus.repository.api.Service;
+import org.apache.commons.lang.builder.EqualsBuilder;
import java.util.List;
import java.util.Iterator;
@@ -28,8 +29,12 @@
}
private static String extractName(String fullyQualifiedName) {
- final int lastDot = fullyQualifiedName.lastIndexOf(".");
- return fullyQualifiedName.substring(lastDot + 1);
+ String result = fullyQualifiedName;
+ if ( fullyQualifiedName != null ) {
+ final int lastDot = fullyQualifiedName.lastIndexOf(".");
+ result = fullyQualifiedName.substring(lastDot + 1);
+ }
+ return result;
}
public String getName() {
@@ -91,5 +96,20 @@
public void setFullDescription(String fullDescription) {
this.fullDescription = fullDescription;
+ }
+
+ public boolean equals(Object o) {
+ if (!(o instanceof ServiceImpl)) {
+ return false;
+ }
+ ServiceImpl rhs = (ServiceImpl) o;
+ return new EqualsBuilder()
+ .append(name, rhs.name)
+ .append(version, rhs.version)
+ .append(fullyQualifiedName, rhs.fullyQualifiedName)
+ .append(authors, rhs.authors)
+ .append(oneLineDescription, rhs.oneLineDescription)
+ .append(fullDescription, rhs.fullDescription)
+ .isEquals();
}
}
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/