@Test(expected = NullPointerException.class) public void testGetCurrentPrincipals() { Set<String> strs = permissionAdministrationHelper.getCurrentPrincipals(null, null, null); }
@Override public Set<String> getCurrentPrincipals( IPermissionOwner owner, IPermissionActivity activity, String targetKey) { IPermission[] permissions = permissionStore.select( owner.getFname(), null, activity.getFname(), targetKey, null); Set<String> principals = new HashSet<String>(); for (IPermission p : permissions) { principals.add(p.getPrincipal()); } return principals; }
PermissionAdministrationHelper implements IPermissionAdministrationHelper { @Override public Set<String> getCurrentPrincipals( IPermissionOwner owner, IPermissionActivity activity, String targetKey) { IPermission[] permissions = permissionStore.select( owner.getFname(), null, activity.getFname(), targetKey, null); Set<String> principals = new HashSet<String>(); for (IPermission p : permissions) { principals.add(p.getPrincipal()); } return principals; } }
PermissionAdministrationHelper implements IPermissionAdministrationHelper { @Override public Set<String> getCurrentPrincipals( IPermissionOwner owner, IPermissionActivity activity, String targetKey) { IPermission[] permissions = permissionStore.select( owner.getFname(), null, activity.getFname(), targetKey, null); Set<String> principals = new HashSet<String>(); for (IPermission p : permissions) { principals.add(p.getPrincipal()); } return principals; }  }
PermissionAdministrationHelper implements IPermissionAdministrationHelper { @Override public Set<String> getCurrentPrincipals( IPermissionOwner owner, IPermissionActivity activity, String targetKey) { IPermission[] permissions = permissionStore.select( owner.getFname(), null, activity.getFname(), targetKey, null); Set<String> principals = new HashSet<String>(); for (IPermission p : permissions) { principals.add(p.getPrincipal()); } return principals; }  @Autowired(required = true) void setGroupListHelper(IGroupListHelper groupListHelper); @Autowired(required = true) void setPermissionStore(IPermissionStore permissionStore); @Override boolean canEditOwner(IPerson currentUser, String owner); @Override boolean canViewOwner(IPerson currentUser, String owner); @Override boolean canEditActivity(IPerson currentUser, String activity); @Override boolean canViewActivity(IPerson currentUser, String activity); @Override boolean canEditPermission(IPerson currentUser, String target); @Override boolean canViewPermission(IPerson currentUser, String target); @Override Set<JsonEntityBean> getEntitiesForPrincipals(Collection<String> principals); @Override Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities); @Override Set<String> getCurrentPrincipals(
            IPermissionOwner owner, IPermissionActivity activity, String targetKey); }
PermissionAdministrationHelper implements IPermissionAdministrationHelper { @Override public Set<String> getCurrentPrincipals( IPermissionOwner owner, IPermissionActivity activity, String targetKey) { IPermission[] permissions = permissionStore.select( owner.getFname(), null, activity.getFname(), targetKey, null); Set<String> principals = new HashSet<String>(); for (IPermission p : permissions) { principals.add(p.getPrincipal()); } return principals; }  @Autowired(required = true) void setGroupListHelper(IGroupListHelper groupListHelper); @Autowired(required = true) void setPermissionStore(IPermissionStore permissionStore); @Override boolean canEditOwner(IPerson currentUser, String owner); @Override boolean canViewOwner(IPerson currentUser, String owner); @Override boolean canEditActivity(IPerson currentUser, String activity); @Override boolean canViewActivity(IPerson currentUser, String activity); @Override boolean canEditPermission(IPerson currentUser, String target); @Override boolean canViewPermission(IPerson currentUser, String target); @Override Set<JsonEntityBean> getEntitiesForPrincipals(Collection<String> principals); @Override Set<String> getPrincipalsForEntities(Collection<JsonEntityBean> entities); @Override Set<String> getCurrentPrincipals(
            IPermissionOwner owner, IPermissionActivity activity, String targetKey);  }