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


Java NotificationContentTypeBo.setDescription方法代码示例

本文整理汇总了Java中org.kuali.rice.ken.bo.NotificationContentTypeBo.setDescription方法的典型用法代码示例。如果您正苦于以下问题:Java NotificationContentTypeBo.setDescription方法的具体用法?Java NotificationContentTypeBo.setDescription怎么用?Java NotificationContentTypeBo.setDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.ken.bo.NotificationContentTypeBo的用法示例。


在下文中一共展示了NotificationContentTypeBo.setDescription方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addContentType

import org.kuali.rice.ken.bo.NotificationContentTypeBo; //导入方法依赖的package包/类
/**
 * addContentType
 * @param request : a servlet request
 * @param response : a servlet response
 * @throws ServletException : an exception
 * @throws IOException : an exception
 * @return a ModelAndView object
 */   
public ModelAndView addContentType(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    view = "ContentTypeManager";
    String id = request.getParameter("id");
    String name = request.getParameter("name");
    String description = request.getParameter("description");
    String namespace = request.getParameter("namespace");
    String xsd = request.getParameter("xsd");
    String xsl = request.getParameter("xsl");
    
    LOG.debug("id: "+id);
    LOG.debug("name: "+name);
    LOG.debug("description: "+description);
    LOG.debug("namespace: "+namespace);
    LOG.debug("xsd: "+xsd);
    LOG.debug("xsl: "+xsl);
    
    NotificationContentTypeBo notificationContentType = new NotificationContentTypeBo();
    notificationContentType.setName(name);
    notificationContentType.setDescription(description);
    notificationContentType.setNamespace(namespace);
    notificationContentType.setXsd(xsd);
    notificationContentType.setXsl(xsl);
    
    notificationContentTypeService.saveNotificationContentType(notificationContentType);
    
    Collection<NotificationContentTypeBo> contentTypes = this.notificationContentTypeService.getAllCurrentContentTypes();
    Map<String, Object> model = new HashMap<String, Object>();
    model.put("contentTypes", contentTypes);            
    return new ModelAndView(view, model);     
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:39,代码来源:ContentTypeController.java

示例2: updateContentType

import org.kuali.rice.ken.bo.NotificationContentTypeBo; //导入方法依赖的package包/类
/**
 * updateContentType
 * @param request : a servlet request
 * @param response : a servlet response
 * @throws ServletException : an exception
 * @throws IOException : an exception
 * @return a ModelAndView object
 */   
public ModelAndView updateContentType(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    view = "ContentTypeManager";
    String id = request.getParameter("id");
    String name = request.getParameter("name");
    String description = request.getParameter("description");
    String namespace = request.getParameter("namespace");
    String xsd = request.getParameter("xsd");
    String xsl = request.getParameter("xsl");
    
    LOG.debug("id: "+id);
    LOG.debug("name: "+name);
    LOG.debug("description: "+description);
    LOG.debug("namespace: "+namespace);
    LOG.debug("xsd: "+xsd);
    LOG.debug("xsl: "+xsl);
    
    NotificationContentTypeBo notificationContentType = this.notificationContentTypeService.getNotificationContentType(name);
     
    notificationContentType.setName(name);
    notificationContentType.setDescription(description);
    notificationContentType.setNamespace(namespace);
    notificationContentType.setXsd(xsd);
    notificationContentType.setXsl(xsl);
    
    this.notificationContentTypeService.saveNotificationContentType(notificationContentType);
    
    
    // get updated content type collection
    Collection<NotificationContentTypeBo> contentTypes = this.notificationContentTypeService.getAllCurrentContentTypes();
    Map<String, Object> model = new HashMap<String, Object>();
    model.put("contentTypes", contentTypes);
    return new ModelAndView(view, model);     
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:42,代码来源:ContentTypeController.java

示例3: testVersioning

import org.kuali.rice.ken.bo.NotificationContentTypeBo; //导入方法依赖的package包/类
@Test public void testVersioning() {
    NotificationContentTypeService impl = services.getNotificationContentTypeService();
    int originalCurrentSize = impl.getAllCurrentContentTypes().size();
    int originalSize = impl.getAllContentTypes().size();

    NotificationBo n = services.getNotificationService().getNotification(TestConstants.NOTIFICATION_1);
    
    NotificationContentTypeBo ct = n.getContentType();
    int originalVersion = ct.getVersion();
    assertTrue(ct.isCurrent());

    ct.setDescription("I was updated");
    impl.saveNotificationContentType(ct);
    
    assertEquals(originalCurrentSize, impl.getAllCurrentContentTypes().size());
    assertEquals(originalSize + 1, impl.getAllContentTypes().size());

    ct = impl.getNotificationContentType(ct.getName());
    assertEquals("I was updated", ct.getDescription());
    assertTrue(ct.isCurrent());
    assertEquals(originalVersion + 1, ct.getVersion().intValue());
    
    n = services.getNotificationService().getNotification(TestConstants.NOTIFICATION_1);
    NotificationContentTypeBo nct = n.getContentType();
    assertEquals(ct.getId(), nct.getId());
    assertEquals(ct.getVersion(), nct.getVersion());
    assertEquals(ct.isCurrent(), nct.isCurrent());
    assertEquals(originalVersion + 1, nct.getVersion().intValue());
    
    
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:32,代码来源:NotificationContentTypeServiceImplTest.java

示例4: buildTestNotificationContentType

import org.kuali.rice.ken.bo.NotificationContentTypeBo; //导入方法依赖的package包/类
/**
 * This method is a helper to build a NotificationContentType instance.
 * @param name
 * @param description
 * @param namespace
 * @param xsd
 * @return NotificationContentType
 */
public static final NotificationContentTypeBo buildTestNotificationContentType(String name, String description, String namespace, String xsd, String xsl) {
    NotificationContentTypeBo contentType = new NotificationContentTypeBo();
    contentType.setName(name);
    contentType.setDescription(description);
    contentType.setNamespace(namespace);
    contentType.setXsd(xsd);
    contentType.setXsl(xsl);
    return contentType;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:MockObjectsUtil.java

示例5: addContentType

import org.kuali.rice.ken.bo.NotificationContentTypeBo; //导入方法依赖的package包/类
/**
 * addContentType
 * @param request : a servlet request
 * @param response : a servlet response
 * @throws ServletException : an exception
 * @throws IOException : an exception
 * @return a ModelAndView object
 */   
public ModelAndView addContentType(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    view = "ContentTypeManager";
    String id = request.getParameter("id");
    String name = request.getParameter("name");
    String description = request.getParameter("description");
    String namespace = request.getParameter("namespace");
    String xsd = request.getParameter("xsd");
    String xsl = request.getParameter("xsl");
    
    LOG.debug("id: "+id);
    LOG.debug("name: "+name);
    LOG.debug("description: "+description);
    LOG.debug("namespace: "+namespace);
    LOG.debug("xsd: "+xsd);
    LOG.debug("xsl: "+xsl);
    
    NotificationContentTypeBo notificationContentType = new NotificationContentTypeBo();
    notificationContentType.setName(name);
    notificationContentType.setDescription(description);
    notificationContentType.setNamespace(namespace);
    notificationContentType.setXsd(xsd);
    notificationContentType.setXsl(xsl);
    
    this.notificationContentTypeService.saveNotificationContentType(notificationContentType);
    
    Collection<NotificationContentTypeBo> contentTypes = this.notificationContentTypeService.getAllCurrentContentTypes();
    Map<String, Object> model = new HashMap<String, Object>();
    model.put("contentTypes", contentTypes);            
    return new ModelAndView(view, model);     
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:39,代码来源:ContentTypeController.java


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