本文整理汇总了Java中org.kuali.rice.kcb.service.RecipientPreferenceService类的典型用法代码示例。如果您正苦于以下问题:Java RecipientPreferenceService类的具体用法?Java RecipientPreferenceService怎么用?Java RecipientPreferenceService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RecipientPreferenceService类属于org.kuali.rice.kcb.service包,在下文中一共展示了RecipientPreferenceService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveRecipientPreferences
import org.kuali.rice.kcb.service.RecipientPreferenceService; //导入依赖的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.RecipientPreferenceService; //导入依赖的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: setRecipientPreferenceService
import org.kuali.rice.kcb.service.RecipientPreferenceService; //导入依赖的package包/类
/**
* Set the RecipientPreferenceService
* @param recipientPreferenceService
*/
@Required
public void setRecipientPreferenceService(RecipientPreferenceService userPreferenceService) {
this.recipientPreferenceService = userPreferenceService;
}
示例4: setRecipientPreferenceService
import org.kuali.rice.kcb.service.RecipientPreferenceService; //导入依赖的package包/类
/**
* Sets the RecipientPreferencesService
* @param prefs the RecipientPreferenceService
*/
@Required
public void setRecipientPreferenceService(RecipientPreferenceService prefs) {
this.recipientPrefs = prefs;
}