public boolean isStarted(final Component comp) { boolean res = false; if (comp != null) { try { final LifeCycleController lifeCycleController = Fractal .getLifeCycleController(comp); if (lifeCycleController.getFcState() == LifeCycleController.STARTED) { res = true; } } catch (final NoSuchInterfaceException e) { // do nothing, return null res = false; } } return res; }
public void setFcContent( Object content ) throws IllegalLifeCycleException, ContentInstantiationException { /* * Lifecycle check. */ String state = _this_weaveableOptLC.getFcState(); if( ! state.equals(LifeCycleController.STOPPED) ) { String msg = "Component should be stopped"; throw new IllegalLifeCycleException(msg); } _super_setFcContent(content); }
private void checkFcStopped() throws IllegalLifeCycleException { if( _this_weaveableOptLC != null ) { String state = _this_weaveableOptLC.getFcState(); if( ! LifeCycleController.STOPPED.equals(state) ) { String msg = "Component " + _this_weaveableOptNC.getFcName() + " is not stopped"; throw new IllegalLifeCycleException(msg); } } }
/** * @see org.ow2.frascati.tinfi.control.content.SCAContentControllerMixin#setFcContent(java.lang.Object) */ public void setFcContent(Object content) throws IllegalLifeCycleException, ContentInstantiationException { String state = weaveableOptLC.getFcState(); if (!(state.equals(LifeCycleController.STOPPED))) { String msg = "Component should be stopped"; throw new IllegalLifeCycleException(msg); } sm.setFcContent(content); }
/** * @see org.ow2.frascati.tinfi.control.content.LifeCycleSCAContentMixin#setFcContent(java.lang.Object) */ public void setFcContent(java.lang.Object content) throws org.objectweb.fractal.api.control.IllegalLifeCycleException, org.ow2.frascati.tinfi.api.control.ContentInstantiationException { java.lang.String state = weaveableOptLC.getFcState(); if (!(state.equals(org.objectweb.fractal.api.control.LifeCycleController.STOPPED))) { java.lang.String msg = "Component should be stopped"; throw new org.objectweb.fractal.api.control.IllegalLifeCycleException(msg); } setFcContent$0(content); }
/** * @see org.objectweb.fractal.julia.control.content.LifeCycleContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ private void removeFcSubComponent$0(final org.objectweb.fractal.api.Component subComponent) throws org.objectweb.fractal.api.control.IllegalContentException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((weaveableOptLC) != null) { java.lang.String state = weaveableOptLC.getFcState(); if (!(org.objectweb.fractal.api.control.LifeCycleController.STOPPED.equals(state))) { throw new org.objectweb.fractal.julia.control.lifecycle.ChainedIllegalLifeCycleException(null, weaveableOptC, "The component is not stopped"); } } removeFcSubComponent$1(subComponent); }
/** * @see org.ow2.frascati.tinfi.control.intent.LifeCycleIntentMixin#checkFcStopped() */ private void checkFcStopped() throws org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((weaveableOptLC) != null) { java.lang.String state = weaveableOptLC.getFcState(); if (!(org.objectweb.fractal.api.control.LifeCycleController.STOPPED.equals(state))) { java.lang.String msg = ("Component " + (weaveableOptNC.getFcName())) + " is not stopped"; throw new org.objectweb.fractal.api.control.IllegalLifeCycleException(msg); } } }
/** * @see org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin#unbindFc(java.lang.String) */ public void unbindFc(final java.lang.String clientItfName) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((weaveableOptLC) != null) { java.lang.String state = weaveableOptLC.getFcState(); if (!(org.objectweb.fractal.api.control.LifeCycleController.STOPPED.equals(state))) { throw new org.objectweb.fractal.julia.control.lifecycle.ChainedIllegalLifeCycleException(null, weaveableOptC, "The component is not stopped"); } } unbindFc$0(clientItfName); }
public void setFcContentClass( Class<?> c ) throws IllegalLifeCycleException, ContentInstantiationException { /* * Lifecycle check. */ String state = _this_weaveableOptLC.getFcState(); if( ! state.equals(LifeCycleController.STOPPED) ) { String msg = "Component should be stopped"; throw new IllegalLifeCycleException(msg); } _super_setFcContentClass(c); }
/** * @see org.ow2.frascati.tinfi.control.content.LifeCycleSCAContentMixin#setFcContentClass(java.lang.Class<?>) */ public void setFcContentClass(java.lang.Class<?> c) throws org.objectweb.fractal.api.control.IllegalLifeCycleException, org.ow2.frascati.tinfi.api.control.ContentInstantiationException { java.lang.String state = weaveableOptLC.getFcState(); if (!(state.equals(org.objectweb.fractal.api.control.LifeCycleController.STOPPED))) { java.lang.String msg = "Component should be stopped"; throw new org.objectweb.fractal.api.control.IllegalLifeCycleException(msg); } setFcContentClass$0(c); }
/** * @see org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin#unbindFc(java.lang.String) */ public void unbindFc(final java.lang.String clientItfName) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((weaveableOptLC) != null) { java.lang.String state = weaveableOptLC.getFcState(); if (!(org.objectweb.fractal.api.control.LifeCycleController.STOPPED.equals(state))) { throw new org.objectweb.fractal.julia.control.lifecycle.ChainedIllegalLifeCycleException(null, weaveableOptC, "The component is not stopped"); } } unbindFc$0(clientItfName); }
/** * @see org.objectweb.fractal.julia.control.content.LifeCycleContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ private void removeFcSubComponent$0(final Component subComponent) throws IllegalContentException, IllegalLifeCycleException { if ((weaveableOptLC) != null) { String state = weaveableOptLC.getFcState(); if (!(LifeCycleController.STOPPED.equals(state))) { throw new ChainedIllegalLifeCycleException(null , weaveableOptC , "The component is not stopped"); } } removeFcSubComponent$1(subComponent); }
/** * @see org.ow2.frascati.tinfi.control.intent.LifeCycleIntentMixin#checkFcStopped() */ private void checkFcStopped() throws IllegalLifeCycleException { if ((weaveableOptLC) != null) { String state = weaveableOptLC.getFcState(); if (!(LifeCycleController.STOPPED.equals(state))) { String msg = ("Component " + (weaveableOptNC.getFcName())) + " is not stopped"; throw new IllegalLifeCycleException(msg); } } }
/** * @see org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin#unbindFc(java.lang.String) */ public void unbindFc(final java.lang.String clientItfName) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((weaveableOptLC) != null) { java.lang.String state = weaveableOptLC.getFcState(); if (!(org.objectweb.fractal.api.control.LifeCycleController.STOPPED.equals(state))) { throw new org.objectweb.fractal.julia.control.lifecycle.ChainedIllegalLifeCycleException(null, weaveableOptC, "The component is not stopped"); } } unbindFc$0(clientItfName); }
/** * @see org.ow2.frascati.tinfi.control.intent.LifeCycleIntentMixin#checkFcStopped() */ private void checkFcStopped() throws org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((weaveableOptLC) != null) { java.lang.String state = weaveableOptLC.getFcState(); if (!(org.objectweb.fractal.api.control.LifeCycleController.STOPPED.equals(state))) { java.lang.String msg = ("Component " + (weaveableOptNC.getFcName())) + " is not stopped"; throw new org.objectweb.fractal.api.control.IllegalLifeCycleException(msg); } } }
/** * Checks that the component is stopped and then calls the overriden method. */ public void undeploy() throws UndeploymentException { if (_this_weaveableOptLC != null) { String state = _this_weaveableOptLC.getFcState(); if (!LifeCycleController.STOPPED.equals(state)) { throw new ChainedUndeploymentException(null, _this_weaveableOptC, "The component is not stopped"); } } _super_undeploy(); }
/** * @see org.ow2.frascati.tinfi.control.content.SCAContentControllerMixin#setFcContentClass(java.lang.Class) */ public void setFcContentClass(Class<?> c) throws IllegalLifeCycleException, ContentInstantiationException { String state = weaveableOptLC.getFcState(); if (!(state.equals(LifeCycleController.STOPPED))) { String msg = "Component should be stopped"; throw new IllegalLifeCycleException(msg); } try { innerSetFcContentClass(c); } catch (IllegalContentClassMetaData e) { throw new ContentInstantiationException(e); } }
public int getStatus(final TreeView treeView) { final Component ci = (Component) treeView.getSelectedObject(); try { final Object itf = ci.getFcInterface("service"); if (!(itf instanceof Process)) { return MenuItem.NOT_VISIBLE_STATUS; } final LifeCycleController lcc = FcExplorer.getLifeCycleController(ci); final String status = lcc.getFcState(); if (status.equals(LifeCycleController.STARTED)) { return MenuItem.ENABLED_STATUS; } } catch (final NoSuchInterfaceException e) { return MenuItem.NOT_VISIBLE_STATUS; } return MenuItem.NOT_VISIBLE_STATUS; } }
public int getStatus(final TreeView treeView) { final Component ci = (Component) treeView.getSelectedObject(); try { final Object itf = ci.getFcInterface("scope"); if (!(itf instanceof Scope)) { return MenuItem.NOT_VISIBLE_STATUS; } final LifeCycleController lcc = FcExplorer.getLifeCycleController(ci); final String status = lcc.getFcState(); if (status.equals(LifeCycleController.STARTED)) { return MenuItem.ENABLED_STATUS; } } catch (final NoSuchInterfaceException e) { return MenuItem.NOT_VISIBLE_STATUS; } return MenuItem.NOT_VISIBLE_STATUS; } }
/** * Stop the component and then calls the overriden method. */ public void undeploy() throws UndeploymentException { if (_this_weaveableOptLC != null) { if (LifeCycleController.STARTED.equals(_this_weaveableOptLC .getFcState())) { try { _this_weaveableOptLC.stopFc(); } catch (IllegalLifeCycleException e) { throw new ChainedUndeploymentException(e, _this_weaveableC, e.getMessage()); } } } _super_undeploy(); }