while (list.hasNext())
{
try
{
JSPermission _js = new JSPermission();
InternalPermission p = (InternalPermission) list.next();
_js.setResource(p.getName());
_js.setActions(p.getActions());
_js.setId(p.getPermissionId());
_js.setType(_js.getTypeForClass(p.getClassname()));
Iterator list2 = p.getPrincipals().iterator();
while (list2.hasNext())
{
o = list2.next();
InternalPrincipal principal = (InternalPrincipal) o;
String path = principal.getFullPath();
if (path.startsWith("/role/"))
{
JSRole _tempRole = (JSRole) this.getObjectBehindPath(
roleMap, removeFromString(path, "/role/"));
if (_tempRole != null)
{
_js.addRole(_tempRole);
}
} else
{
if (path.startsWith("/group/"))
{
JSGroup _tempGroup = (JSGroup) this
.getObjectBehindPath(groupMap,
removeFromString(path, "/group/"));
if (_tempGroup != null)
{
_js.addGroup(_tempGroup);
}
} else
{
if (path.startsWith("/user/"))
{
JSUser _tempUser = (JSUser) this
.getObjectBehindPath(
userMap,
removeFromString(path, "/user/"));
if (_tempUser != null)
{
_js.addUser(_tempUser);
}
}
}
}
}
this.permissionMap.put(_js.getType(), _js);
((JSSeedData)getSnapshot()).getPermissions().add(_js);
} catch (Exception e)
{
throw new SerializerException(