import org.onap.portalapp.portal.domain.EPUser;
import org.onap.portalapp.portal.logging.aop.EPMetricsLog;
import org.onap.portalapp.portal.domain.EPUser;
import org.onap.portalapp.portal.logging.aop.EPMetricsLog;
import org.onap.portalapp.portal.transport.UserWithNameSurnameTitle;
import org.onap.portalapp.portal.utils.EcompPortalUtils;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalapp.portal.transport.UserWithNameSurnameTitle;
import org.onap.portalapp.portal.utils.EcompPortalUtils;
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
List<String> tokens = EcompPortalUtils.parsingByRegularExpression(searchString, " ");
while (tokens.size() > 2) { // we use no more then first 2 tokens (userId is removed, see above)
tokens.remove(tokens.size() - 1);
}
EPUser attrUser = new EPUser();
List<String> tokens = EcompPortalUtils.parsingByRegularExpression(searchString, " ");
while (tokens.size() > 2) { // we use no more then first 2 tokens (userId is removed, see above)
tokens.remove(tokens.size() - 1);
}
EPUser attrUser = new EPUser();
List<UserWithNameSurnameTitle> resultOfSearch = new ArrayList<UserWithNameSurnameTitle>(), resultOfAdditionalSearch = null,
resultOfSearchUserId = new ArrayList<UserWithNameSurnameTitle>();
if (tokens.size() == 2) {
List<UserWithNameSurnameTitle> resultOfSearch = new ArrayList<UserWithNameSurnameTitle>(), resultOfAdditionalSearch = null,
resultOfSearchUserId = new ArrayList<UserWithNameSurnameTitle>();
if (tokens.size() == 2) {
resultOfSearch = this.searchUsersByName(attrUser);
resultOfSearchUserId = this.searchUsersByUserId(attrUser);
resultOfSearch = this.removeWrongFirstNames(resultOfSearch, tokens.get(0));
resultOfSearch = this.searchUsersByName(attrUser);
resultOfSearchUserId = this.searchUsersByUserId(attrUser);
resultOfSearch = this.removeWrongFirstNames(resultOfSearch, tokens.get(0));
resultOfSearch = this.cutSearchResultToMaximumSize(resultOfSearch);
ObjectMapper mapper = new ObjectMapper();
String result = "[]";
resultOfSearch = this.cutSearchResultToMaximumSize(resultOfSearch);
ObjectMapper mapper = new ObjectMapper();
String result = "[]";
@SuppressWarnings("rawtypes")
public List<UserWithNameSurnameTitle> searchUsersByUserId(EPUser attrUser) {
List<UserWithNameSurnameTitle> foundUsers = new ArrayList<UserWithNameSurnameTitle>();
@SuppressWarnings("rawtypes")
public List<UserWithNameSurnameTitle> searchUsersByUserId(EPUser attrUser) {
List<UserWithNameSurnameTitle> foundUsers = new ArrayList<UserWithNameSurnameTitle>();