}
}
public void createUser(String userName) {
if (!isValideUserName(userName)) {
throw new RulesRepositoryException("Invalide user name");
}
if (containsUser(userName)) {
throw new RulesRepositoryException("User name [" + userName + "] already exists");
}
try {
Node permsNode = getUserPermissionNode(userName);
permsNode.remove(); //remove this so we get a fresh set
permsNode = getUserPermissionNode(userName).addNode("jcr:content", "nt:unstructured");
this.repository.save();
} catch (RepositoryException e) {
throw new RulesRepositoryException(e);
}
}