Package org.tubo.resource.component

Examples of org.tubo.resource.component.Component


        itemProps.putAll(flowNodeProps);

        //
        // FIXME: ONLY TEST, FIX THAT!!!!!!!!!!!!!!!!!!
        //        we need exception management  :D
        Component component = null;
        String methodName = null;
        try {
//
            // get component (via manager)
            component = componentManager.getComponent();
            //
            // check event listen
            String action = context.getOriginEvent().getAction();
            if(componentRef.isListenEvent(action)) {
                //
                // get method to execute
                methodName = componentRef.getListenEventDef(action).getExecute();
                //
                // call method
                Method method = component.getClass().getMethod(methodName, new Class[] {FlowContext.class});
                method.invoke(component,new Object[] {context});
            } else {
                //
                // execute default method
                component.execute(context);
            }
        } catch (NoSuchMethodException e) {
            Object args[] = {
                    component.getClass().getName(),
                    methodName,
                    componentId
            };
            throw resourceManager.getExceptionManager().getException(1500,args,e);
        } catch (IllegalAccessException e) {
            Object args[] = {
                    component.getClass().getName(),
                    methodName,
                    componentId
            };
            throw resourceManager.getExceptionManager().getException(1501,args,e);
        } catch (IllegalArgumentException e) {
            Object args[] = {
                    component.getClass().getName(),
                    methodName,
                    componentId
            };
            throw resourceManager.getExceptionManager().getException(1502,args,e);
        } catch (InvocationTargetException e) {
            Object args[] = {
                    component.getClass().getName(),
                    methodName,
                    componentId
            };
            throw resourceManager.getExceptionManager().getException(1503,args,e);
        } finally {
View Full Code Here

TOP

Related Classes of org.tubo.resource.component.Component

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.