return arg != null && (! "".equals(arg));
}
private SecurityHandler makeSecurityHandler(String realm, String consoleUser, String consolePassword, String curatorUser, String curatorPassword)
{
HashUserRealm userRealm = new HashUserRealm(realm);
userRealm.put(consoleUser, Credential.getCredential(consolePassword));
userRealm.addUserToRole(consoleUser,"console");
userRealm.put(curatorUser, Credential.getCredential(curatorPassword));
userRealm.addUserToRole(curatorUser, "curator");
Constraint console = new Constraint();
console.setName("consoleauth");
console.setRoles(new String[]{"console"});
console.setAuthenticate(true);