public String formatExportCmd(String dataMover,List<VNXFileExport> exports,Map<String,String> userInfo,String netBios){
  if (exports.isEmpty()) {
    _log.debug("There is no entry to export");
    return null;
  }
  String mountPoint=entryPathsDiffer(exports);
  if (mountPoint == null) {
    _log.debug("Single ssh API command is being applied to multiple paths.");
    return null;
  }
  String protocol=entryProtocolsDiffer(exports);
  if (protocol == null) {
    _log.debug("Single ssh API command is being applied to multiple protocols.");
    return null;
  }
  StringBuilder options=new StringBuilder();
  String result=null;
  if (protocol.equalsIgnoreCase(VNX_CIFS)) {
    result=formatCifsCmd(exports,netBios);
  }
 else {
    result=formatNfsCmd(exports,userInfo);
  }
  options.append(result);
  options.append(" ");
  StringBuilder cmd=new StringBuilder();
  cmd.append(dataMover);
  cmd.append(options.toString());
  cmd.append(mountPoint);
  return cmd.toString();
}

public String formatExportCmd ( String dataMover , List < VNXFileExport > exports , Map < String , String > userInfo , String netBios ) { if ( exports . isEmpty ( ) ) { _log . debug ( "There is no entry to export" ) ; return null ; } String mountPoint = entryPathsDiffer ( exports ) ; if ( mountPoint == null ) { _log . debug ( "Single ssh API command is being applied to multiple paths." ) ; return null ; } String protocol = entryProtocolsDiffer ( exports ) ; if ( protocol == null ) { _log . debug ( "Single ssh API command is being applied to multiple protocols." ) ; return null ; } StringBuilder options = new StringBuilder ( ) ; String result = null ; if ( protocol . equalsIgnoreCase ( VNX_CIFS ) ) { result = formatCifsCmd ( exports , netBios ) ; } else { result = formatNfsCmd ( exports , userInfo ) ; } options . append ( result ) ; options . append ( " " ) ; StringBuilder cmd = new StringBuilder ( ) ; cmd . append ( dataMover ) ; cmd . append ( options . toString ( ) ) ; cmd . append ( mountPoint ) ; return cmd . toString ( ) ; }
create the command string for exporting a file system .
