equal
deleted
inserted
replaced
346 * @return the CommandInfo objects representing the preferred commands. |
346 * @return the CommandInfo objects representing the preferred commands. |
347 */ |
347 */ |
348 public synchronized CommandInfo[] getPreferredCommands(String mimeType) { |
348 public synchronized CommandInfo[] getPreferredCommands(String mimeType) { |
349 List cmdList = new ArrayList(); |
349 List cmdList = new ArrayList(); |
350 if (mimeType != null) |
350 if (mimeType != null) |
351 mimeType = mimeType.toLowerCase(); |
351 mimeType = mimeType.toLowerCase(Locale.ENGLISH); |
352 |
352 |
353 for (int i = 0; i < DB.length; i++) { |
353 for (int i = 0; i < DB.length; i++) { |
354 if (DB[i] == null) |
354 if (DB[i] == null) |
355 continue; |
355 continue; |
356 Map cmdMap = DB[i].getMailcapList(mimeType); |
356 Map cmdMap = DB[i].getMailcapList(mimeType); |
412 * @return the CommandInfo objects representing all the commands. |
412 * @return the CommandInfo objects representing all the commands. |
413 */ |
413 */ |
414 public synchronized CommandInfo[] getAllCommands(String mimeType) { |
414 public synchronized CommandInfo[] getAllCommands(String mimeType) { |
415 List cmdList = new ArrayList(); |
415 List cmdList = new ArrayList(); |
416 if (mimeType != null) |
416 if (mimeType != null) |
417 mimeType = mimeType.toLowerCase(); |
417 mimeType = mimeType.toLowerCase(Locale.ENGLISH); |
418 |
418 |
419 for (int i = 0; i < DB.length; i++) { |
419 for (int i = 0; i < DB.length; i++) { |
420 if (DB[i] == null) |
420 if (DB[i] == null) |
421 continue; |
421 continue; |
422 Map cmdMap = DB[i].getMailcapList(mimeType); |
422 Map cmdMap = DB[i].getMailcapList(mimeType); |
466 * @return the CommandInfo object corresponding to the command. |
466 * @return the CommandInfo object corresponding to the command. |
467 */ |
467 */ |
468 public synchronized CommandInfo getCommand(String mimeType, |
468 public synchronized CommandInfo getCommand(String mimeType, |
469 String cmdName) { |
469 String cmdName) { |
470 if (mimeType != null) |
470 if (mimeType != null) |
471 mimeType = mimeType.toLowerCase(); |
471 mimeType = mimeType.toLowerCase(Locale.ENGLISH); |
472 |
472 |
473 for (int i = 0; i < DB.length; i++) { |
473 for (int i = 0; i < DB.length; i++) { |
474 if (DB[i] == null) |
474 if (DB[i] == null) |
475 continue; |
475 continue; |
476 Map cmdMap = DB[i].getMailcapList(mimeType); |
476 Map cmdMap = DB[i].getMailcapList(mimeType); |
533 String mimeType) { |
533 String mimeType) { |
534 if (LogSupport.isLoggable()) |
534 if (LogSupport.isLoggable()) |
535 LogSupport.log( |
535 LogSupport.log( |
536 "MailcapCommandMap: createDataContentHandler for " + mimeType); |
536 "MailcapCommandMap: createDataContentHandler for " + mimeType); |
537 if (mimeType != null) |
537 if (mimeType != null) |
538 mimeType = mimeType.toLowerCase(); |
538 mimeType = mimeType.toLowerCase(Locale.ENGLISH); |
539 |
539 |
540 for (int i = 0; i < DB.length; i++) { |
540 for (int i = 0; i < DB.length; i++) { |
541 if (DB[i] == null) |
541 if (DB[i] == null) |
542 continue; |
542 continue; |
543 if (LogSupport.isLoggable()) |
543 if (LogSupport.isLoggable()) |
650 * @since JAF 1.1 |
650 * @since JAF 1.1 |
651 */ |
651 */ |
652 public synchronized String[] getNativeCommands(String mimeType) { |
652 public synchronized String[] getNativeCommands(String mimeType) { |
653 List cmdList = new ArrayList(); |
653 List cmdList = new ArrayList(); |
654 if (mimeType != null) |
654 if (mimeType != null) |
655 mimeType = mimeType.toLowerCase(); |
655 mimeType = mimeType.toLowerCase(Locale.ENGLISH); |
656 |
656 |
657 for (int i = 0; i < DB.length; i++) { |
657 for (int i = 0; i < DB.length; i++) { |
658 if (DB[i] == null) |
658 if (DB[i] == null) |
659 continue; |
659 continue; |
660 String[] cmds = DB[i].getNativeCommands(mimeType); |
660 String[] cmds = DB[i].getNativeCommands(mimeType); |