List of usage examples for com.liferay.portal.kernel.util Validator isHostName
public static boolean isHostName(String name)
true if the string is a valid host name. From source file:de.uhh.l2g.plugins.service.impl.HostLocalServiceImpl.java
License:Open Source License
protected void validate(String name, String streamer) throws PortalException { //only default host db entries name field is allowed to be empty if (Validator.isNull(name)) { throw new HostNameException(); }/*from w ww . ja va2 s . c om*/ if (Validator.isNull(streamer) || !Validator.isDomain(streamer) || !Validator.isHostName(streamer)) { throw new HostStreamerException(); } }