List of usage examples for org.springframework.util Assert hasText
@Deprecated public static void hasText(@Nullable String text)
From source file:com.devnexus.ting.web.controller.PresentationController.java
private PresentationList preparePresentationsForEvent(Event event, Model model, String order, PresentationSearchQuery presentationSearchQuery) { Assert.hasText(order); model.addAttribute("event", event); final PresentationList presentationList = new PresentationList(); List<Presentation> presentations; if (presentationSearchQuery == null) { if ("track".equalsIgnoreCase(order)) { presentations = businessService.getPresentationsForEventOrderedByTrack(event.getId()); } else if ("room".equalsIgnoreCase(order)) { presentations = businessService.getPresentationsForEventOrderedByRoom(event.getId()); } else if ("name".equalsIgnoreCase(order)) { presentations = businessService.getPresentationsForEventOrderedByName(event.getId()); } else {/*from w w w . j av a 2 s. c o m*/ throw new IllegalArgumentException("Order " + order + " not supported."); } presentationList.setPresentations(presentations); model.addAttribute("presentationList", presentationList); } else { presentations = businessService.findPresentations(presentationSearchQuery); if (presentationSearchQuery.getTrack() != null) { final Track track = businessService.getTrack(presentationSearchQuery.getTrack().getId()); model.addAttribute("track", track); } presentationList.setPresentations(presentations); model.addAttribute("presentationList", presentationList); } return presentationList; }
From source file:org.cloudfoundry.identity.uaa.api.client.impl.UaaClientOperationsImpl.java
public BaseClientDetails create(BaseClientDetails client) { Assert.notNull(client); Assert.hasText(client.getClientId()); return helper.post("/oauth/clients", client, CLIENT_REF); }
From source file:com.icfcc.cache.interceptor.CacheOperation.java
public void setName(String name) { Assert.hasText(name); this.name = name; }
From source file:org.red5.server.script.jython.JythonScriptFactory.java
public JythonScriptFactory(String scriptSourceLocator) { Assert.hasText(scriptSourceLocator); this.scriptSourceLocator = scriptSourceLocator; this.scriptInterfaces = new Class[] {}; this.arguments = null; }
From source file:com.streamreduce.core.dao.UserDAO.java
public User findInvitedUser(String inviteKey, String accountId) { Assert.hasText(inviteKey); Assert.hasText(accountId);//from w w w . jav a 2 s. com User user = ds.createQuery(entityClazz).field("secretKey").equal(inviteKey).get(); if (user != null) { if ((user.getAccount().getId().toString().equals(accountId))) { return user; } } return null; }
From source file:org.cloudfoundry.identity.uaa.api.user.impl.UaaUserOperationsImpl.java
public ScimUser createUser(ScimUser user) { Assert.notNull(user);/*from ww w. j a va2 s .c om*/ Assert.hasText(user.getUserName()); user.setSchemas(SCHEMAS); return helper.post("/Users", user, USER_REF); }
From source file:com.hongqiang.shop.common.utils.FreeMarkers.java
public static TemplateModel getVariable(String name, Environment env) throws TemplateModelException { Assert.hasText(name); Assert.notNull(env);// ww w .j a va 2 s. c o m return env.getVariable(name); }
From source file:org.cloudfoundry.identity.uaa.security.web.UaaRequestMatcher.java
public UaaRequestMatcher(String path) { Assert.hasText(path);/* w ww. j av a 2 s.c o m*/ if (path.contains("*")) { throw new IllegalArgumentException("UaaRequestMatcher is not intended for use with wildcards"); } this.path = path; }
From source file:com.frank.search.solr.server.support.HttpSolrClientFactoryBean.java
@Override
public void afterPropertiesSet() throws Exception {
Assert.hasText(url);
initSolrClient();
}
From source file:org.cloudfoundry.identity.uaa.api.client.impl.UaaClientOperationsImpl.java
public BaseClientDetails findById(String clientId) { Assert.hasText(clientId); return helper.get("/oauth/clients/{id}", CLIENT_REF, clientId); }