public Object run(ConfigBeanProxy param) throws PropertyVetoException, TransactionFailure { // remove the child from the parent. WriteableView writeableParent = (WriteableView) Proxy.getInvocationHandler(param); _deleteChild(parent, writeableParent, child); return child; } }, readableView);
public Object run(ConfigBeanProxy param) throws PropertyVetoException, TransactionFailure { // remove the child from the parent. WriteableView writeableParent = (WriteableView) Proxy.getInvocationHandler(param); _deleteChild(parent, writeableParent, child); return child; } }, readableView);
public Object run(ConfigBeanProxy param) throws PropertyVetoException, TransactionFailure { // remove the child from the parent. WriteableView writeableParent = (WriteableView) Proxy.getInvocationHandler(param); _deleteChild(parent, writeableParent, child); return child; } }, readableView);
/** * Runs the following command passing the configration object. The code will be run * within a transaction, returning true will commit the transaction, false will abort * it. * * @param param is the configuration object protected by the transaction * @return any object that should be returned from within the transaction code * @throws java.beans.PropertyVetoException * if the changes cannot be applied * to the configuration */ public Object run(ConfigBeanProxy param) throws PropertyVetoException, TransactionFailure { // remove the child from the parent. WriteableView writeableParent = (WriteableView) Proxy.getInvocationHandler(param); _deleteChild(parent, writeableParent, child); return child; } }, readableView);
/** * Runs the following command passing the configration object. The code will be run * within a transaction, returning true will commit the transaction, false will abort * it. * * @param param is the configuration object protected by the transaction * @return any object that should be returned from within the transaction code * @throws java.beans.PropertyVetoException * if the changes cannot be applied * to the configuration */ public Object run(ConfigBeanProxy param) throws PropertyVetoException, TransactionFailure { // remove the child from the parent. WriteableView writeableParent = (WriteableView) Proxy.getInvocationHandler(param); _deleteChild(parent, writeableParent, child); return child; } }, readableView);
@Override public Object run(ConfigBeanProxy parentProxy) throws PropertyVetoException, TransactionFailure { ConfigSupport._deleteChild(child.parent(), (WriteableView) Proxy.getInvocationHandler(parentProxy), child); DeletionDecorator<ConfigBeanProxy, ConfigBeanProxy> decorator = habitat.getService(delete.decorator()); if (decorator==null) { String msg = localStrings.getLocalString(GenericCrudCommand.class, "GenericCreateCommand.deletion_decorator_not_found", "The DeletionDecorator {0} could not be found in the habitat,is it annotated with @Service ?", delete.decorator().toString()); result.failure(logger, msg); throw new TransactionFailure(msg); } else { // inject the decorator with any parameters from the initial CLI invocation manager.inject(decorator, paramResolver); // invoke the decorator decorator.decorate(context, parentProxy, tgt); } return null; } }, parentProxy);
@Override public Object run(ConfigBeanProxy parentProxy) throws PropertyVetoException, TransactionFailure { ConfigSupport._deleteChild(child.parent(), (WriteableView) Proxy.getInvocationHandler(parentProxy), child); DeletionDecorator<ConfigBeanProxy, ConfigBeanProxy> decorator = habitat.getComponent(delete.decorator()); if (decorator==null) { String msg = localStrings.getLocalString(GenericCrudCommand.class, "GenericCreateCommand.deletion_decorator_not_found", "The DeletionDecorator {0} could not be found in the habitat,is it annotated with @Service ?", delete.decorator().toString()); result.failure(logger, msg); throw new TransactionFailure(msg); } else { // inject the decorator with any parameters from the initial CLI invocation manager.inject(decorator, paramResolver); // invoke the decorator decorator.decorate(context, parentProxy, target); } return null; } }, parentProxy);