当前位置: 首页>>代码示例>>Java>>正文


Java RecipientPreferenceService类代码示例

本文整理汇总了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());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:RecipientPreferenceServiceTest.java

示例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());
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:21,代码来源:RecipientPreferenceServiceTest.java

示例3: setRecipientPreferenceService

import org.kuali.rice.kcb.service.RecipientPreferenceService; //导入依赖的package包/类
/**
 * Set the RecipientPreferenceService
 * @param recipientPreferenceService
 */
@Required
public void setRecipientPreferenceService(RecipientPreferenceService userPreferenceService) {
    this.recipientPreferenceService = userPreferenceService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:UserPreferencesController.java

示例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;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:MessagingServiceImpl.java


注:本文中的org.kuali.rice.kcb.service.RecipientPreferenceService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。