if(urd.notOKorIsEmpty()) {
return Result.err(urd);
}
- Map<String, Namespace> lm = new HashMap<String,Namespace>();
- Map<String, Namespace> other = full || endsWith==null?null:new TreeMap<String,Namespace>();
+ Map<String, Namespace> lm = new HashMap<>();
+ Map<String, Namespace> other = full || endsWith==null?null:new TreeMap<>();
for(UserRoleDAO.Data urdd : urd.value) {
if(full) {
if(endsWith==null || urdd.role.endsWith(endsWith)) {
}
if(namespace==null) {
namespace = new Namespace(nsd.value);
- namespace.admin=new ArrayList<String>();
- namespace.owner=new ArrayList<String>();
+ namespace.admin=new ArrayList<>();
+ namespace.owner=new ArrayList<>();
}
if(endsWith==null || urdd.role.endsWith(endsWith)) {
lm.put(namespace.name,namespace);
return Result.err(rnd);
}
- Set<Namespace> lm = new HashSet<Namespace>();
+ Set<Namespace> lm = new HashSet<>();
Result<List<NsDAO.Data>> rlnd = ques.nsDAO.dao().getChildren(trans, parent);
if(rlnd.isOK()) {
if(rlnd.isEmpty()) {
}
// Create a set of Update Roles, which are in Internal Format
- Set<String> updtRoles = new HashSet<String>();
+ Set<String> updtRoles = new HashSet<>();
Result<NsSplit> nss;
for(String role : updt.value.roles(false)) {
nss = ques.deriveNsSplit(trans, role);
// filter = false;
// Get list of roles per user, then add to Roles as we go
- HashSet<UserRoleDAO.Data> userSet = new HashSet<UserRoleDAO.Data>();
+ HashSet<UserRoleDAO.Data> userSet = new HashSet<>();
Result<List<UserRoleDAO.Data>> rlurd = ques.userRoleDAO.readByRole(trans, role);
if(rlurd.isOK()) {
for(UserRoleDAO.Data data : rlurd.value) {
List<UserRoleDAO.Data> content;
if(mustFilter) {
- content = new ArrayList<UserRoleDAO.Data>(rlurd.value.size()); // avoid multi-memory redos
+ content = new ArrayList<>(rlurd.value.size()); // avoid multi-memory redos
for(UserRoleDAO.Data data : rlurd.value) {
ndd.name=data.ns;
return Result.err(Status.ERR_BadData,v.errs());
}
- Set<String> currRoles = new HashSet<String>();
+ Set<String> currRoles = new HashSet<>();
Result<List<UserRoleDAO.Data>> rlurd = ques.userRoleDAO.readByUser(trans, rurdd.value.user);
if(rlurd.isOK()) {
for(UserRoleDAO.Data data : rlurd.value) {
return Result.err(nsr);
}
- Set<String> currUsers = new HashSet<String>();
+ Set<String> currUsers = new HashSet<>();
Result<List<UserRoleDAO.Data>> rlurd = ques.userRoleDAO.readByRole(trans, rurdd.value.role);
if(rlurd.isOK()) {
for(UserRoleDAO.Data data : rlurd.value) {
return Result.err(rnd);
}
- HashSet<UserRoleDAO.Data> userSet = new HashSet<UserRoleDAO.Data>();
+ HashSet<UserRoleDAO.Data> userSet = new HashSet<>();
Result<List<UserRoleDAO.Data>> rlurd = ques.userRoleDAO.readUserInRole(trans, user, role);
if(rlurd.isOK()) {
for(UserRoleDAO.Data data : rlurd.value) {
}
}
- HashSet<UserRoleDAO.Data> userSet = new HashSet<UserRoleDAO.Data>();
+ HashSet<UserRoleDAO.Data> userSet = new HashSet<>();
Result<List<UserRoleDAO.Data>> rlurd = ques.userRoleDAO.readByRole(trans, role);
if(rlurd.isOK()) {
for(UserRoleDAO.Data data : rlurd.value) {
// Get list of roles per Permission,
// Then loop through Roles to get Users
// Note: Use Sets to avoid processing or responding with Duplicates
- Set<String> roleUsed = new HashSet<String>();
- Set<UserRoleDAO.Data> userSet = new HashSet<UserRoleDAO.Data>();
+ Set<String> roleUsed = new HashSet<>();
+ Set<UserRoleDAO.Data> userSet = new HashSet<>();
if(!nss.isEmpty()) {
Result<List<PermDAO.Data>> rlp = ques.permDAO.readByType(trans, nss.value.ns, nss.value.name);
}
if(curr.isOKhasData()) {
- Map<String, Result<List<DelegateDAO.Data>>> delegateCache = new HashMap<String, Result<List<DelegateDAO.Data>>>();
- Map<UUID, FutureDAO.Data> futureCache = new HashMap<UUID, FutureDAO.Data>();
+ Map<String, Result<List<DelegateDAO.Data>>> delegateCache = new HashMap<>();
+ Map<UUID, FutureDAO.Data> futureCache = new HashMap<>();
FutureDAO.Data hasDeleted = new FutureDAO.Data();
for(ApprovalDAO.Data cd : curr.value) {
return Result.err(Status.ERR_BadData,v.errs());
}
- List<ApprovalDAO.Data> listRapds = new ArrayList<ApprovalDAO.Data>();
+ List<ApprovalDAO.Data> listRapds = new ArrayList<>();
Result<List<ApprovalDAO.Data>> myRapd = ques.approvalDAO.readByApprover(trans, approver);
if(myRapd.notOK()) {