public static void createDatabaseUserInfo(DatabaseUserInfo info, DatabaseUser entity) {
    if (info == null || entity == null) {
      return;
    }
    info.setName(entity.getName());
    info.setPassword(entity.getPassword());
    Set<RSSInstance> instances = entity.getInstances();
    if (instances != null && !instances.isEmpty()) {
      String instanceName = instances.iterator().next().getName();
      if (RSSManagerConstants.RSSManagerTypes.RM_TYPE_SYSTEM.equalsIgnoreCase(entity.getType())) {
        instanceName = RSSManagerConstants.RSSManagerTypes.RM_TYPE_SYSTEM;
      }
      info.setRssInstanceName(instanceName);
    }

    info.setType(entity.getType());
    info.setUsername(entity.getUsername());
  }
 public static void validateDatabaseUserInfo(DatabaseUser user) throws RSSManagerException {
   checkIfParameterSecured(user.getName());
   checkIfParameterSecured(user.getPassword());
 }