Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Code Formatting #553

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1451,8 +1451,7 @@ private UsersGetResponse filterUsersBySingleAttribute(ExpressionNode node, Map<S
// Get total users based on the filter query without depending on pagination params.
if (SCIMCommonUtils.isGroupBasedUserFilteringImprovementsEnabled() &&
(isJDBCUSerStore(domainName) || isAllConfiguredUserStoresJDBC())) {
// Get the total user count by the filter query.
// This is only implemented for JDBC userstores.
// Get the total user count by the filter query. This is only implemented for JDBC userstores.
totalResults += getUserCountByAttribute(node, 1, maxLimit, sortBy, sortOrder, domainName);
} else {
totalResults += filterUsers(node, 1, maxLimit, sortBy, sortOrder, domainName).size();
Expand All @@ -1468,7 +1467,7 @@ private UsersGetResponse filterUsersBySingleAttribute(ExpressionNode node, Map<S
}

/**
* method to get user count by filtering parameter.
* Get user count by filtering parameter.
*
* @param node Expression node for single attribute filtering
* @param offset Starting index of the count
Expand Down Expand Up @@ -1733,7 +1732,7 @@ private Set<org.wso2.carbon.user.core.common.User> filterUsers(Node node, int of
}

/**
* Method to get User Count by Group filter
* Get user count by group filter.
*
* @param node Expression or Operation node.
* @param domainName Domain name.
Expand All @@ -1748,13 +1747,11 @@ private int getUserCountByGroup(Node node, String domainName)
// Set filter values.
String attributeName = ((ExpressionNode) node).getAttributeValue();
String filterOperation = ((ExpressionNode) node).getOperation();
String attributeValue = ((ExpressionNode) node).getValue();

/*
If there is a domain and if the domain separator is not found in the attribute value, append the domain
with the domain separator in front of the new attribute value.
*/
attributeValue = UserCoreUtil.addDomainToName(((ExpressionNode) node).getValue(), domainName);
String attributeValue = UserCoreUtil.addDomainToName(((ExpressionNode) node).getValue(), domainName);

try {
List<String> roleNames = getRoleNames(attributeName, filterOperation, attributeValue);
Expand Down
Loading