class RuleCompositionServiceImpl extends AbstractJargonService implements RuleCompositionService {

	@Override
	public Rule storeRule(final String ruleAbsolutePath, final Rule rule) throws JargonException {

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

		if (rule == null) {
			throw new IllegalArgumentException("null rule");
		}

		log.info("ruleAbsolutePath:{}", ruleAbsolutePath);
		log.info("rule:{}", rule);

		List<String> inputParameters = new ArrayList<String>();
		List<String> outputParameters = new ArrayList<String>();

		StringBuilder sb;

		for (IRODSRuleParameter parm : rule.getInputParameters()) {
			sb = new StringBuilder();
			sb.append(parm.getUniqueName());
			sb.append("=");
			sb.append(parm.retrieveStringValue());
			inputParameters.add(sb.toString());
		}

		for (IRODSRuleParameter parm : rule.getOutputParameters()) {
			outputParameters.add(parm.getUniqueName());
		}

		return storeRuleFromParts(ruleAbsolutePath, rule.getRuleBody(), inputParameters, outputParameters);

	}

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

}