}
@Override
public Collection<? extends AccessCheck> getAccessChecks() {
final Collection<AccessCheck> checks = new ArrayList<AccessCheck>();
checks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(parentBean), "read"));
if (longOpt) {
try {
List<ConfigBeanProxy> children = (List<ConfigBeanProxy>) targetMethod.invoke(parentBean);
for (ConfigBeanProxy child : children) {
if (name == null || name.equals(Dom.unwrap(child).getKey())) {
checks.add(new AccessCheck(AccessRequired.Util.resourceNameFromConfigBeanProxy(child), "read"));
}
}
} catch (Exception ex) {
String msg = localStrings.getLocalString(GenericCrudCommand.class,
"GenericListCommand.accesschecks",