本文整理匯總了Java中org.kuali.rice.kcb.service.MessageDelivererRegistryService類的典型用法代碼示例。如果您正苦於以下問題:Java MessageDelivererRegistryService類的具體用法?Java MessageDelivererRegistryService怎麽用?Java MessageDelivererRegistryService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MessageDelivererRegistryService類屬於org.kuali.rice.kcb.service包,在下文中一共展示了MessageDelivererRegistryService類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: saveRecipientPreferences
import org.kuali.rice.kcb.service.MessageDelivererRegistryService; //導入依賴的package包/類
@Test
public void saveRecipientPreferences() throws ErrorList {
RecipientPreferenceService impl = services.getRecipientPreferenceService();
MessageDelivererRegistryService delivererService = services.getMessageDelivererRegistryService();
MessageDeliverer deliverer = delivererService.getDelivererByName(VALID_DELIVERER_NAME);
if (deliverer == null) {
throw new RuntimeException("Message deliverer could not be obtained");
}
HashMap<String, String> userprefs = new HashMap<String, String>();
userprefs.put(VALID_PROPERTY, VALID_VALUE);
userprefs.put("Email.email_delivery_format", "text");
impl.saveRecipientPreferences(VALID_USER_ID, userprefs, deliverer);
QueryByCriteria.Builder criteria = QueryByCriteria.Builder.create();
criteria.setPredicates(equal("recipientId", VALID_USER_ID));
List<RecipientPreference> prefs =
KRADServiceLocator.getDataObjectService().findMatching(RecipientPreference.class, criteria.build()).getResults();
assertEquals(2, prefs.size());
}
示例2: saveRecipientPreferences
import org.kuali.rice.kcb.service.MessageDelivererRegistryService; //導入依賴的package包/類
@Test
public void saveRecipientPreferences() throws ErrorList {
RecipientPreferenceService impl = services.getRecipientPreferenceService();
MessageDelivererRegistryService delivererService = services.getMessageDelivererRegistryService();
MessageDeliverer deliverer = delivererService.getDelivererByName(VALID_DELIVERER_NAME);
if (deliverer == null) {
throw new RuntimeException("Message deliverer could not be obtained");
}
HashMap<String, String> userprefs = new HashMap<String, String>();
userprefs.put(VALID_PROPERTY, VALID_VALUE);
userprefs.put("Email.email_delivery_format", "text");
impl.saveRecipientPreferences(VALID_USER_ID, userprefs, deliverer);
RecipientPreference recipientPreference = new RecipientPreference();
recipientPreference.setRecipientId(VALID_USER_ID);
Collection<RecipientPreference> prefs = services.getKcbGenericDao().findMatchingByExample(recipientPreference);
assertEquals(2, prefs.size());
}
示例3: setMessageDelivererRegistryService
import org.kuali.rice.kcb.service.MessageDelivererRegistryService; //導入依賴的package包/類
/**
* Set the MessageDelivererRegistryService
* @param messageDelivererRegistryService
*/
@Required
public void setMessageDelivererRegistryService(MessageDelivererRegistryService messageDelivererRegistryService) {
this.messageDelivererRegistryService = messageDelivererRegistryService;
}
示例4: setMessageDelivererRegistry
import org.kuali.rice.kcb.service.MessageDelivererRegistryService; //導入依賴的package包/類
/**
* Sets the {@link MessageDelivererRegistryService}
* @param registry the {@link MessageDelivererRegistryService}
*/
@Required
public void setMessageDelivererRegistry(MessageDelivererRegistryService registry) {
this.registry = registry;
}