Example #1
0
 public boolean isPhotoOwner(Photo photo) {
   boolean result = false;
   Client client = getClient();
   if ((photo != null) && (client instanceof User)) {
     User user = (User) client;
     result = photo.getOwnerName().equals(user.getName());
   }
   return result;
 }
Example #2
0
 /** Returns some signifier of current user */
 public String getClientName() {
   String result = "anon";
   if (!StringUtil.isNullOrEmptyString(getEmailAddressAsString())) {
     result = getEmailAddressAsString();
     if (client instanceof User) {
       User user = (User) client;
       result = user.getName();
     }
   }
   return result;
 }