@Override protected void doEditAction(SubjectType subject) throws EditException { if (subject.getConfiguration() == null) { previousBean = null; } else { try { previousBean = beanSerialiser.beanAsElement(subject .getConfiguration()); } catch (Exception e) { logger.error("Error serializing configuration bean for: " + subject); throw new EditException( "Error serializing configuration bean for: " + subject, e); } } try { // FIXME: Should clone bean on configuration to prevent caller from // modifying bean afterwards subject.configure(configurationBean); if (subject instanceof DisabledActivity) { cl = ((ActivityAndBeanWrapper)configurationBean).getActivity().getClass().getClassLoader(); } } catch (ConfigurationException e) { logger.error("Error configuring :" + subject.getClass().getSimpleName(), e); throw new EditException(e); } }
@Override protected void doEditAction(SubjectType subject) throws EditException { if (subject.getConfiguration() == null) { previousBean = null; } else { try { previousBean = beanSerialiser.beanAsElement(subject .getConfiguration()); } catch (Exception e) { logger.error("Error serializing configuration bean for: " + subject); throw new EditException( "Error serializing configuration bean for: " + subject, e); } } try { // FIXME: Should clone bean on configuration to prevent caller from // modifying bean afterwards subject.configure(configurationBean); } catch (ConfigurationException e) { logger.error("Error configuring :" + subject.getClass().getSimpleName(), e); throw new EditException(e); } }
protected Object cloneBean(Object object) throws JDOMException, IOException { Element element = beanSerialiser.beanAsElement(object); return beanDeSerialiser.createBean(element); }
protected Object cloneBean(Object object) throws JDOMException, IOException { Element element = beanSerialiser.beanAsElement(object); return beanDeSerialiser.createBean(element); }