public void extractPermissions(GroupPermissions accumulator, SecurityTarget target) {
policy.accept(new PermissionsExtractor(accumulator, target));
}
public void parse(String contents) {
Rule policyFile = PolicyParser.get().PolicyFile();
ParsingResult<Object> result = new ReportingParseRunner<Object>(policyFile).run(contents);
if (!result.parseErrors.isEmpty()) {
throw new IllegalArgumentException(ErrorUtils.printParseErrors(result.parseErrors));
}