private void addAsTyped(Collection res, RmsEntry e) {
if (e.getType() == RmsEntry.RESOURCE_TYPE_USER) {
res.add(new DefaultUserResource
(rasCtx, e.getKey(), e.getDisplayName()));
} else if (e.getType() == RmsEntry.RESOURCE_TYPE_ROLE) {
res.add(new DefaultRoleResource
(rasCtx, e.getKey(), e.getDisplayName()));
} else if (e.getType() == RmsEntry.RESOURCE_TYPE_GROUP) {
res.add(new DefaultGroupResource
(rasCtx, e.getKey(), e.getDisplayName()));
} else {