On Feb 12, 2005, at 10:38 AM, Anil Saldhana wrote:

Geir,
  I think all your commits make sense to me.
Basically, the scout implementation will be how we
interpret the JAXR spec. :-)

I'm slaughtering goats on the alter of Pointius Bracketus as fast as I can.



Only through team work can we get closer to spec compliance. :-)

Or peyote.


We should discuss everything in the spec that creates doubts in our minds.

Ok - I'm noting where I have doubts in the code w/ a TODO, and noting in the commit messages. If I'm stuck, I'll just post here...



I will be out for the next 3 weeks. So I will not be touching the Scout code.

Cheers,
Anil


--- [EMAIL PROTECTED] wrote:

Author: geirm
Date: Sat Feb 12 05:24:35 2005
New Revision: 153502

URL:
http://svn.apache.org/viewcvs?view=rev&rev=153502
Log:
looks scary, but it isn't (scary is from a minor
code reformat)

upshot : in LifeCycleManager, there are two methods
saveObjects() and
deleteObjects() that are useless w/o helper support
from BusinessLifeCycleManager,
it's decendent. (BLCM extends LCM).

THe methods in LCM were dummies, returning an empty
BulkResponseImpl, which
was just usless anyway.  Now, since there is no need
ever to do a
new LifeCycleManagerImpl(), I made those two methods
abstract.  There are
more to do this too if there are no howls of
protest.  Had to add a
concrete impl in the test case.


Modified:


webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/ registry/BusinessLifeCycleManagerImpl.java


webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/ registry/LifeCycleManagerImpl.java


webservices/scout/trunk/modules/scout/src/test/org/apache/ws/scout/ registry/LifeCycleManagerTest.java

Modified:

webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/ registry/BusinessLifeCycleManagerImpl.java
URL:

http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/ src/java/org/apache/ws/scout/registry/ BusinessLifeCycleManagerImpl.java?view=diff&r1=153501&r2=153502

======================================================================= =======
---

webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/ registry/BusinessLifeCycleManagerImpl.java
(original)
+++

webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/ registry/BusinessLifeCycleManagerImpl.java
Sat Feb 12 05:24:35 2005
@@ -43,6 +43,7 @@
 import javax.xml.registry.SaveException;
 import
javax.xml.registry.UnexpectedObjectException;
 import javax.xml.registry.LifeCycleManager;
+import
javax.xml.registry.UnsupportedCapabilityException;
 import javax.xml.registry.infomodel.Association;
 import
javax.xml.registry.infomodel.ClassificationScheme;
 import javax.xml.registry.infomodel.Concept;
@@ -67,142 +68,159 @@
  * @author <a href="mailto:[EMAIL PROTECTED]">Geir
Magnusson Jr.</a>
  */
 public class BusinessLifeCycleManagerImpl extends
LifeCycleManagerImpl
-        implements BusinessLifeCycleManager,
Serializable
-{
+        implements BusinessLifeCycleManager,
Serializable {

-    public
BusinessLifeCycleManagerImpl(RegistryService
registry)
-    {
+    public
BusinessLifeCycleManagerImpl(RegistryService
registry) {
         super(registry);
     }

-    //Override from Base Class
-    public BulkResponse deleteObjects(Collection
keys, String objectType) throws JAXRException
-    {
-        BulkResponse  bulk = null;
+    /**
+     * Deletes one or more previously submitted
objects from the registry
+     * using the object keys and a specified
objectType attribute.
+     *
+     * @param keys
+     * @param objectType
+     * @return
+     * @throws JAXRException
+     */
+    public BulkResponse deleteObjects(Collection
keys, String objectType) throws JAXRException {
+        BulkResponse bulk = null;

-        if(objectType ==
LifeCycleManager.ASSOCIATION)
-        {
+        if (objectType ==
LifeCycleManager.ASSOCIATION) {
             bulk = this.deleteAssociations(keys);
-        } else
-        if(objectType ==
LifeCycleManager.CLASSIFICATION_SCHEME)
-        {
+        }
+        else if (objectType ==
LifeCycleManager.CLASSIFICATION_SCHEME) {
             bulk =
this.deleteClassificationSchemes(keys);
-        } else
-        if(objectType == LifeCycleManager.CONCEPT)
-        {
+        }
+        else if (objectType ==
LifeCycleManager.CONCEPT) {
             bulk = this.deleteConcepts(keys);
-        } else
-        if(objectType ==
LifeCycleManager.ORGANIZATION)
-        {
-            bulk = this.deleteOrganizations(keys) ;
-        } else
-        if(objectType == LifeCycleManager.SERVICE)
-        {
+        }
+        else if (objectType ==
LifeCycleManager.ORGANIZATION) {
+            bulk = this.deleteOrganizations(keys);
+        }
+        else if (objectType ==
LifeCycleManager.SERVICE) {
             bulk = this.deleteServices(keys);
-        }else
-        if(objectType ==
LifeCycleManager.SERVICE_BINDING)
-        {
+        }
+        else if (objectType ==
LifeCycleManager.SERVICE_BINDING) {
             bulk =
this.deleteServiceBindings(keys);
-        }else
-        throw new JAXRException( "Delete Operation
for "+objectType + " not implemented by Scout");
+        }
+        else {
+            throw new JAXRException("Delete
Operation for " + objectType + " not implemented by
Scout");
+        }

         return bulk;
     }

-    public BulkResponse
deleteAssociations(Collection associationKeys)
throws JAXRException
-    {
+    public BulkResponse
deleteAssociations(Collection associationKeys)
throws JAXRException {
         return
this.deleteOperation(associationKeys,
"DELETE_ASSOCIATION");
     }

-    public BulkResponse
deleteClassificationSchemes(Collection schemeKeys)
throws JAXRException
-    {
+    public BulkResponse
deleteClassificationSchemes(Collection schemeKeys)
throws JAXRException {
         return this.deleteOperation(schemeKeys,
"DELETE_CLASSIFICATIONSCHEME");
     }

-    public BulkResponse deleteConcepts(Collection
conceptKeys) throws JAXRException
-    {
+    public BulkResponse deleteConcepts(Collection
conceptKeys) throws JAXRException {
         return this.deleteOperation(conceptKeys,
"DELETE_CONCEPT");
     }

-    public BulkResponse
deleteOrganizations(Collection orgkeys) throws
JAXRException
-    {
+    public BulkResponse
deleteOrganizations(Collection orgkeys) throws
JAXRException {
         return this.deleteOperation(orgkeys,
"DELETE_ORG");
     }

=== message truncated ===



                
__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Geir Magnusson Jr                                  +1-203-665-6437
[EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to