protected Command doCreateCommand(ModifierHelper aHelper) { if (!aHelper.isComplete()) { setStatus(ERROR); return null; } Command command = null; if (aHelper.getFeature().isMany()) command = createManyCommand(aHelper); else command = createSingleCommand(aHelper); if (null != command) { List localHelpers = ModifierHelperRegistry.getInstance().getHelpers(aHelper); if (null != localHelpers) { extendedHelpers.addAll(localHelpers); } } return command; }
/** * Run using * * @aHelper. This will set a MOF attibute value to the owner of the helper. */ protected void primRun(ModifierHelper aHelper) { if (aHelper.isComplete()) { Object value = getValue(aHelper); if (valueChanged(aHelper.getOwner(), aHelper.getFeature(), value, aHelper.shouldUnsetValue())) setObjectAttribute(aHelper.getOwner(), aHelper.getFeature(), value, aHelper.shouldUnsetValue()); } }
/** * This will automatically get called from the J2EEModelModifier before executing so it is not * necessary to call it directly. */ public boolean isComplete() { boolean result = true; if (getOwnerHelper() != null) result = getOwnerHelper().isComplete(); if (!mustCreateValue()) result = getValue() != null || shouldUnsetValue(); else result = getFeatureType() != null; return result && getFeature() != null && (getOwner() != null || getOwnerHelper() != null); }