List of usage examples for org.springframework.util Assert hasText
@Deprecated public static void hasText(@Nullable String text)
From source file:org.cloudfoundry.identity.uaa.api.common.model.UaaCredentials.java
/** * This constructor will be used for generating a resource owner token * /*from w ww . ja v a 2 s.c o m*/ * @param clientId * @param clientSecret * @param userId * @param password */ public UaaCredentials(String clientId, String clientSecret, String userId, String password) { Assert.hasText(clientId); this.clientId = clientId; this.clientSecret = clientSecret; this.userId = userId; this.password = password; }
From source file:org.italiangrid.storm.webdav.authz.VOMSFQANAuthority.java
public VOMSFQANAuthority(String fqan) { Assert.hasText(fqan); fqanAuthority = String.format("FQAN(%s)", fqan); }
From source file:com.streamreduce.core.dao.UserDAO.java
public User findUser(String signupKey, String userId) { Assert.hasText(signupKey); Assert.hasText(userId);//from w w w.j a v a 2 s . co m return ds.createQuery(entityClazz).field("secretKey").equal(signupKey).field("_id") .equal(new ObjectId(userId)).get(); }
From source file:com.azaptree.services.domain.entity.dao.JDBCEntityDAOSupport.java
public JDBCEntityDAOSupport(final JdbcTemplate jdbc, final String table) { Assert.notNull(jdbc, "jdbc is required"); Assert.hasText("table"); this.jdbc = jdbc; this.table = table; initFieldColumnMappings();/*from ww w .j a v a 2 s. co m*/ buildImmutableFieldColumnMappings(); }
From source file:org.italiangrid.storm.webdav.fs.attrs.DefaultExtendedFileAttributesHelper.java
@Override public void setExtendedFileAttribute(File f, String attributeName, String attributeValue) throws IOException { Assert.notNull(f);/* w ww .j a v a2 s. co m*/ Assert.hasText(attributeName); UserDefinedFileAttributeView faView = Files.getFileAttributeView(f.toPath(), UserDefinedFileAttributeView.class); if (faView == null) { throw new IOException("UserDefinedFileAttributeView not supported on file " + f.getAbsolutePath()); } faView.write(attributeName, StandardCharsets.UTF_8.encode(attributeValue)); }
From source file:net.groupbuy.service.impl.MemberServiceImpl.java
@Transactional(readOnly = true) public boolean usernameDisabled(String username) { Assert.hasText(username); Setting setting = SettingUtils.get(); if (setting.getDisabledUsernames() != null) { for (String disabledUsername : setting.getDisabledUsernames()) { if (StringUtils.containsIgnoreCase(username, disabledUsername)) { return true; }//from ww w . j a va2 s . c o m } } return false; }
From source file:org.red5.server.script.rhino.RhinoScriptFactory.java
public RhinoScriptFactory(String scriptSourceLocator) { Assert.hasText(scriptSourceLocator); this.scriptSourceLocator = scriptSourceLocator; this.scriptInterfaces = new Class[] {}; this.extendedClass = null; }
From source file:org.innobuilt.wicket.rest.example.dao.HibernatePersonDAO.java
public Person findPersonByEmail(String email) { Assert.hasText(email); String query = "from Person p where p.email = :email"; return (Person) getSession().createQuery(query).setString("email", email).uniqueResult(); }
From source file:com.azaptree.services.commons.TypeReferenceKey.java
protected TypeReferenceKey(final String name, final boolean required, final T defaultValue) { super();// www .j av a2 s .co m Assert.hasText(name); this.name = name; this.hashCode = name.hashCode(); this.required = required; this.defaultValue = defaultValue; }
From source file:com.dp2345.service.impl.ShopServiceImpl.java
@Transactional(readOnly = true) public boolean shopAliasDisabled(String shopAlias) { Assert.hasText(shopAlias); Setting setting = SettingUtils.get(); if (setting.getDisabledUsernames() != null) { for (String disabledUsername : setting.getDisabledUsernames()) { if (StringUtils.containsIgnoreCase(shopAlias, disabledUsername)) { return true; }//from w w w. java 2 s . c om } } return false; }