From: <st...@us...> - 2006-10-31 17:26:30
|
Revision: 3551 http://svn.sourceforge.net/smartfrog/?rev=3551&view=rev Author: steve_l Date: 2006-10-31 09:26:19 -0800 (Tue, 31 Oct 2006) Log Message: ----------- more eventing Modified Paths: -------------- trunk/core/extras/cdl/src/org/smartfrog/services/cddlm/cdl/base/CdlCompoundImpl.java trunk/core/extras/cdl/src/org/smartfrog/services/cddlm/cdl/base/LifecycleStateEnum.java trunk/core/extras/cdl/src/org/smartfrog/sfcore/languages/cdl/CdlCatalog.java Modified: trunk/core/extras/cdl/src/org/smartfrog/services/cddlm/cdl/base/CdlCompoundImpl.java =================================================================== --- trunk/core/extras/cdl/src/org/smartfrog/services/cddlm/cdl/base/CdlCompoundImpl.java 2006-10-31 17:22:34 UTC (rev 3550) +++ trunk/core/extras/cdl/src/org/smartfrog/services/cddlm/cdl/base/CdlCompoundImpl.java 2006-10-31 17:26:19 UTC (rev 3551) @@ -34,7 +34,8 @@ import java.rmi.RemoteException; /** - * Base component for CDL components. It is a compound, obviously. + * Base component for CDL components. It is a compound, obviously. Lifecycle events + * can be relayed to a lifecycle listener * created 01-Feb-2006 11:19:17 */ @@ -92,6 +93,8 @@ log.error(e); } } + + /** * Resolve a reference * @param name qname of the reference @@ -133,7 +136,7 @@ } catch (URISyntaxException e) { throw SmartFrogException.forward(e); } - this.listener = target; + listener = target; sfReplaceAttribute(ATTR_JOBURI, uri); } Modified: trunk/core/extras/cdl/src/org/smartfrog/services/cddlm/cdl/base/LifecycleStateEnum.java =================================================================== --- trunk/core/extras/cdl/src/org/smartfrog/services/cddlm/cdl/base/LifecycleStateEnum.java 2006-10-31 17:22:34 UTC (rev 3550) +++ trunk/core/extras/cdl/src/org/smartfrog/services/cddlm/cdl/base/LifecycleStateEnum.java 2006-10-31 17:26:19 UTC (rev 3551) @@ -21,6 +21,7 @@ package org.smartfrog.services.cddlm.cdl.base; import org.smartfrog.sfcore.prim.Prim; +import org.smartfrog.sfcore.languages.cdl.faults.CdlXmlParsingException; import java.rmi.RemoteException; @@ -43,10 +44,26 @@ private final String xmlName; - public static LifecycleStateEnum extract(String text) { - return valueOf(text); + /** + * Convert the XML value into an enumeration entry + * @param text text to parse + * @return the enumeration + * @throws org.smartfrog.sfcore.languages.cdl.faults.CdlXmlParsingException if we cannot parse + */ + public static LifecycleStateEnum extract(String text) + throws CdlXmlParsingException{ + if(undefined.hasXmlName(text)) return undefined; + if (instantiated.hasXmlName(text)) return instantiated; + if (initialized.hasXmlName(text)) return initialized; + if (running.hasXmlName(text)) return running; + if (failed.hasXmlName(text)) return failed; + if (terminated.hasXmlName(text)) return terminated; + throw new CdlXmlParsingException("No CDL state matches ["+text+"]"); } + private boolean hasXmlName(String name) { + return xmlName.equals(name); + } public String getXmlName() { return xmlName; Modified: trunk/core/extras/cdl/src/org/smartfrog/sfcore/languages/cdl/CdlCatalog.java =================================================================== --- trunk/core/extras/cdl/src/org/smartfrog/sfcore/languages/cdl/CdlCatalog.java 2006-10-31 17:22:34 UTC (rev 3550) +++ trunk/core/extras/cdl/src/org/smartfrog/sfcore/languages/cdl/CdlCatalog.java 2006-10-31 17:26:19 UTC (rev 3551) @@ -86,6 +86,10 @@ WSRF_PACKAGE + XML_FILENAME_SOAP_12, SOAP11_NAMESPACE, WSRF_PACKAGE + XML_FILENAME_SOAP_11, + MUWS_P1_NAMESPACE, + WSRF_PACKAGE + XML_FILENAME_SOAP_11, + MUWS_P2_NAMESPACE, + WSRF_PACKAGE + XML_FILENAME_WSDM_MUWS_P2, }; private static final String[][] names = { @@ -99,6 +103,8 @@ {"cdl", XML_CDL_NAMESPACE}, {"cmp", CDL_CMP_TYPES_NAMESPACE}, {"cmpw", CDL_CMP_WSDL_NAMESPACE}, + {"muws-p1-xs", MUWS_P2_NAMESPACE}, + {"muws-p2-xs", MUWS_P2_NAMESPACE}, {"wsrf-bf", WSRF_WSBF_NAMESPACE}, {"wsrf-rl", WSRF_WSRL_NAMESPACE}, {"wsrf-rp", WSRF_WSRP_NAMESPACE}, @@ -113,7 +119,6 @@ loadCDDLMMappings(); } - /** * load in the standard CDDLM mappings */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |