class RuleCompositionServiceImpl extends AbstractJargonService implements RuleCompositionService {

	@Override
	public Rule deleteInputParameterFromRule(final String ruleAbsolutePath, final String parameterToDelete)
			throws FileNotFoundException, JargonException {
		log.info("deleteInputParameterFromRule()");

		if (ruleAbsolutePath == null || ruleAbsolutePath.isEmpty()) {
			throw new IllegalArgumentException("null or empty ruleAbsolutePath");
		}

		if (parameterToDelete == null || parameterToDelete.isEmpty()) {
			throw new IllegalArgumentException("null or empty parameterToDelete");
		}

		Rule currentRule = loadRuleFromIrods(ruleAbsolutePath);
		log.info("found current rule, recompose by deleting input parameter and reformatting");

		List<IRODSRuleParameter> newParms = new ArrayList<IRODSRuleParameter>();

		boolean updated = false;
		for (int i = 0; i < currentRule.getInputParameters().size(); i++) {
			if (currentRule.getInputParameters().get(i).getUniqueName().equals(parameterToDelete)) {
				log.info("found parameter, deleting");
				updated = true;
			} else {
				newParms.add(currentRule.getInputParameters().get(i));
			}
		}

		if (updated) {
			log.info("updated rule with deleted input param is:{}", currentRule);
			currentRule.setInputParameters(newParms);
			return storeRule(ruleAbsolutePath, currentRule);
		} else {
			log.info("no update necessary, just return the current rule info:{}", currentRule);
			return currentRule;
		}

	}

	public  RuleCompositionServiceImpl();
	public  RuleCompositionServiceImpl(final IRODSAccessObjectFactory irodsAccessObjectFactory,
			final IRODSAccount irodsAccount);

}