1 16 package org.apache.cocoon.mail; 17 18 import javax.mail.MessagingException ; 19 import javax.mail.internet.MimePart ; 20 21 28 public class IndexerCtPref implements ContentTypePreference { 29 35 public int preference(MimePart part) { 36 try { 37 if (part.isMimeType("text/html")) { 38 return 5; 39 } 40 if (part.isMimeType("text/*")) { 41 return 10; 42 } 43 if (part.isMimeType("text")) { 44 return 9; 45 } 46 return 0; 47 } catch (MessagingException messagingexception) { 48 return 0; 49 } 50 } 51 } 52 53 54 | Popular Tags |