Skip to content

Commit

Permalink
White noise
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Alessandroni committed Mar 21, 2018
1 parent 6b12461 commit e8a97ad
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/main/java/net/tirasa/connid/bundles/azure/AzureConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public void executeQuery(ObjectClass objectClass, Filter query, ResultsHandler h
users = client.getAuthenticated().getAllUsers();
}
} catch (Exception e) {
AzureUtils.wrapGeneralError("While getting users!", e);
AzureUtils.wrapGeneralError("While getting Users!", e);
}

for (User user : users) {
Expand Down Expand Up @@ -241,7 +241,7 @@ public void executeQuery(ObjectClass objectClass, Filter query, ResultsHandler h
groups = client.getAuthenticated().getAllGroups();
}
} catch (Exception e) {
AzureUtils.wrapGeneralError("While getting groups!", e);
AzureUtils.wrapGeneralError("While getting Groups!", e);
}

for (Group group : groups) {
Expand All @@ -258,7 +258,7 @@ public void executeQuery(ObjectClass objectClass, Filter query, ResultsHandler h
try {
result = client.getAuthenticated().getGroup(AttributeUtil.getAsStringValue(key));
} catch (Exception e) {
AzureUtils.wrapGeneralError("While getting group!", e);
AzureUtils.wrapGeneralError("While getting Group!", e);
}
handler.handle(fromGroup(result, attributesToGet));
}
Expand Down Expand Up @@ -300,7 +300,7 @@ public Uid create(ObjectClass objectClass, Set<Attribute> createAttributes, Oper
if (status == null
|| status.getValue() == null
|| status.getValue().isEmpty()) {
LOG.warn("{0} attribute value not correct or not found, won't handle user status",
LOG.warn("{0} attribute value not correct or not found, won't handle User status",
OperationalAttributes.ENABLE_NAME);
} else {
user.setAccountEnabled(Boolean.parseBoolean(status.getValue().get(0).toString()));
Expand All @@ -309,7 +309,7 @@ public Uid create(ObjectClass objectClass, Set<Attribute> createAttributes, Oper
user.fromAttributes(createAttributes);
client.getAuthenticated().createUser(user);
} catch (Exception e) {
AzureUtils.wrapGeneralError("Could not create user : " + username, e);
AzureUtils.wrapGeneralError("Could not create User : " + username, e);
}

List<Object> groups = accessor.findList(PredefinedAttributes.GROUPS_NAME);
Expand All @@ -319,7 +319,7 @@ public Uid create(ObjectClass objectClass, Set<Attribute> createAttributes, Oper
client.getAuthenticated().addUserToGroup(user.getObjectId(), group.toString());
} catch (Exception e) {
AzureUtils.wrapGeneralError(
"Could not add user :" + user.getObjectId() + " to group :" + group, e);
"Could not add User :" + user.getObjectId() + " to Group :" + group, e);
}
}
}
Expand All @@ -342,7 +342,7 @@ public Uid create(ObjectClass objectClass, Set<Attribute> createAttributes, Oper
group.fromAttributes(createAttributes);
client.getAuthenticated().createGroup(group);
} catch (Exception e) {
AzureUtils.wrapGeneralError("Could not create group : " + groupName, e);
AzureUtils.wrapGeneralError("Could not create Group : " + groupName, e);
}

return new Uid(group.getObjectId());
Expand Down Expand Up @@ -374,20 +374,20 @@ public void delete(ObjectClass objectClass, Uid uid, OperationOptions options) {
client.getAuthenticated().deleteUserFromGroup(uid.getUidValue(), group.getObjectId());
}
} catch (Exception e) {
LOG.error("Could not delete user {0} from groups", uid.getUidValue());
LOG.error("Could not delete User {0} from Groups", uid.getUidValue());
}

try {
client.getAuthenticated().deleteUser(uid.getUidValue());
} catch (Exception e) {
AzureUtils.wrapGeneralError("Could not delete user " + uid.getUidValue(), e);
AzureUtils.wrapGeneralError("Could not delete User " + uid.getUidValue(), e);
}

} else if (ObjectClass.GROUP.equals(objectClass)) {
try {
client.getAuthenticated().deleteGroup(uid.getUidValue());
} catch (Exception e) {
AzureUtils.wrapGeneralError("Could not delete group " + uid.getUidValue(), e);
AzureUtils.wrapGeneralError("Could not delete Group " + uid.getUidValue(), e);
}

} else {
Expand Down Expand Up @@ -425,7 +425,7 @@ public Uid update(ObjectClass objectClass, Uid uid, Set<Attribute> replaceAttrib
if (status == null
|| status.getValue() == null
|| status.getValue().isEmpty()) {
LOG.warn("{0} attribute value not correct, can't handle user status update",
LOG.warn("{0} attribute value not correct, can't handle User status update",
OperationalAttributes.ENABLE_NAME);
} else {
user.setAccountEnabled(Boolean.parseBoolean(status.getValue().get(0).toString()));
Expand All @@ -443,7 +443,7 @@ public Uid update(ObjectClass objectClass, Uid uid, Set<Attribute> replaceAttrib
}
} catch (Exception e) {
AzureUtils.wrapGeneralError(
"Could not update password for user " + uid.getUidValue(), e);
"Could not update password for User " + uid.getUidValue(), e);
}
}

Expand Down Expand Up @@ -508,7 +508,7 @@ public Uid update(ObjectClass objectClass, Uid uid, Set<Attribute> replaceAttrib
group.setObjectId(uid.getUidValue());

if (!uid.getUidValue().equals(groupID)) {
LOG.info("Update - uid value different from group ID");
LOG.info("Update - uid value different from Group ID");

group.setMailNickname(mailNickname);
group.setDisplayName(displayName);
Expand Down

0 comments on commit e8a97ad

Please sign in to comment.