*@return the acls, or null if security is on (and the acls need to be fetched)
*/
protected static String[] getAcls(DocumentSpecification spec) {
Set<String> map = new HashSet<String>();
for (int i = 0; i < spec.getChildCount(); i++) {
SpecificationNode sn = spec.getChild(i);
if (sn.getType().equals(JOB_ACCESS_NODE_TYPE)) {
String token = sn.getAttributeValue(JOB_TOKEN_ATTRIBUTE);
map.add(token);
}
else if (sn.getType().equals(JOB_SECURITY_NODE_TYPE)) {
String onOff = sn.getAttributeValue(JOB_VALUE_ATTRIBUTE);
if (onOff != null && onOff.equals("on"))
return null;
}
}