public String getCurrentUserName() {
    String currentUserName = getUsername();

    return currentUserName == null || currentUserName.length() == 0 ?
      " " : currentUserName;
  }
Get the validation the state of the instance.

@param viewEntity the view entity to which this instance will be bound
@param context the validation context

@return the instance validation result
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java