List of usage examples for org.springframework.util Assert hasLength
@Deprecated public static void hasLength(@Nullable String text)
From source file:com.orange.cepheus.broker.LocalRegistrationsTest.java
@Test public void testRegistration() throws Exception { RegisterContext registerContext = createRegistrationContext(); String registrationId = localRegistrations.updateRegistrationContext(registerContext); Assert.hasLength(registrationId); Registration registration = localRegistrations.getRegistration(registrationId); assertNotNull(registration);/* ww w.ja v a 2 s . co m*/ assertNotNull(registration.getExpirationDate()); verify(remoteRegistrations).registerContext(eq(registerContext), eq(registrationId)); verify(registrationsRepository).getRegistration(eq(registrationId)); verify(registrationsRepository).saveRegistration(eq(registration)); }
From source file:org.jcf.MultiUserChatImpl.java
public void createRoom(String room) { Assert.hasLength(room); setRoomID(room);/*from www .j av a 2 s. c o m*/ multiUserChat = new MultiUserChat(((ConnectionImpl) jCFConnection).getXMPPconnection(), roomID); roomNikname = jCFConnection.getUserName() + "@" + room; try { multiUserChat.create(roomNikname); multiUserChat.sendConfigurationForm(new Form(Form.TYPE_SUBMIT)); } catch (XMPPException e) { throw new JCFException("error createRoom: " + roomID, e); } graphicObjectHandler = JCFFactory.newGraphicObjectHandler(roomNikname, room); addListener(); }
From source file:io.kahu.hawaii.util.logger.RequestLogBuilder.java
public RequestLogBuilder param(String name, long value) { Assert.hasLength(name); try {/*from ww w .j a v a 2 s.c om*/ this.params.put(name, value); } catch (JSONException cant_happen) { // } return this; }
From source file:com.javaeeeee.entities.Bookmark.java
public void setUrl(String url) { Assert.hasLength(url); this.url = url; }
From source file:com.javaeeeee.entities.User.java
public void setUsername(String username) { Assert.hasLength(username); this.username = username; }
From source file:io.kahu.hawaii.util.logger.RequestLogBuilder.java
public RequestLogBuilder param(String name, double value) { Assert.hasLength(name); try {// w w w. j av a 2 s .c o m this.params.put(name, value); } catch (JSONException cant_happen) { // } return this; }
From source file:com.javaeeeee.entities.User.java
public void setPassword(String password) { Assert.hasLength(password); this.password = password; }
From source file:io.kahu.hawaii.util.logger.RequestLogBuilder.java
public RequestLogBuilder param(String name, String value) { Assert.hasLength(name); try {//from w w w .j a va 2 s .c o m this.params.put(name, value); } catch (JSONException cant_happen) { // } return this; }
From source file:org.jcf.MultiUserChatImpl.java
public void joinRoom(String room) { Assert.hasLength(room); setRoomID(room);// w ww .j ava 2 s .c om multiUserChat = new MultiUserChat(((ConnectionImpl) jCFConnection).getXMPPconnection(), roomID); roomNikname = jCFConnection.getUserName() + "@" + room; try { multiUserChat.join(roomNikname); } catch (XMPPException e) { throw new JCFException("error createRoom: " + roomID, e); } graphicObjectHandler = JCFFactory.newGraphicObjectHandler(roomNikname, room); addListener(); }
From source file:io.kahu.hawaii.util.logger.RequestLogBuilder.java
public RequestLogBuilder param(String name, String[] values) { Assert.hasLength(name); if (values.length > 0) { try {/*from w ww . j a v a 2s .co m*/ this.params.put(name, new JSONArray(Arrays.asList(values))); } catch (JSONException cant_happen) { // } } return this; }