List of usage examples for org.springframework.util MultiValueMap isEmpty
boolean isEmpty();
From source file:org.awesomeagile.webapp.security.AwesomeAgileConnectionRepositoryTest.java
@Test public void testFindConnectionsToUsers() throws Exception { MultiValueMap<String, Connection<?>> connectionsToUsers = connectionRepository.findConnectionsToUsers( CollectionUtils.toMultiValueMap(ImmutableMap.of(PROVIDER_ONE, ImmutableList.of(providerUserId())))); assertTrue(connectionsToUsers.isEmpty()); }
From source file:org.springframework.ws.wsdl.wsdl11.provider.AbstractPortTypesProvider.java
private void createOperations(Definition definition, PortType portType) throws WSDLException { MultiValueMap<String, Message> operations = new LinkedMultiValueMap<String, Message>(); for (Iterator<?> iterator = definition.getMessages().values().iterator(); iterator.hasNext();) { Message message = (Message) iterator.next(); String operationName = getOperationName(message); if (StringUtils.hasText(operationName)) { operations.add(operationName, message); }/*from w w w. j a va 2 s . co m*/ } if (operations.isEmpty() && logger.isWarnEnabled()) { logger.warn("No operations were created, make sure the WSDL contains messages"); } for (String operationName : operations.keySet()) { Operation operation = definition.createOperation(); operation.setName(operationName); List<Message> messages = operations.get(operationName); for (Message message : messages) { if (isInputMessage(message)) { Input input = definition.createInput(); input.setMessage(message); populateInput(definition, input); operation.setInput(input); } else if (isOutputMessage(message)) { Output output = definition.createOutput(); output.setMessage(message); populateOutput(definition, output); operation.setOutput(output); } else if (isFaultMessage(message)) { Fault fault = definition.createFault(); fault.setMessage(message); populateFault(definition, fault); operation.addFault(fault); } } operation.setStyle(getOperationType(operation)); operation.setUndefined(false); if (logger.isDebugEnabled()) { logger.debug("Adding operation [" + operation.getName() + "] to port type [" + portType.getQName() + "]"); } portType.addOperation(operation); } }