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


Java Responsibility.getTemplate方法代码示例

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


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

示例1: createResponsibility

import org.kuali.rice.kim.api.responsibility.Responsibility; //导入方法依赖的package包/类
@Override
public Responsibility createResponsibility(final Responsibility responsibility)
        throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(responsibility, "responsibility");

    if (StringUtils.isNotBlank(responsibility.getId()) && getResponsibility(responsibility.getId()) != null) {
        throw new RiceIllegalStateException("the responsibility to create already exists: " + responsibility);
    }
    List<ResponsibilityAttributeBo> attrBos = Collections.emptyList();
    if (responsibility.getTemplate() != null) {
        attrBos = KimAttributeDataBo.createFrom(ResponsibilityAttributeBo.class, responsibility.getAttributes(), responsibility.getTemplate().getKimTypeId());
    }
    ResponsibilityBo bo = ResponsibilityBo.from(responsibility);
    bo.setAttributeDetails(attrBos);
    return ResponsibilityBo.to(getDataObjectService().save(bo));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:ResponsibilityServiceImpl.java

示例2: updateResponsibility

import org.kuali.rice.kim.api.responsibility.Responsibility; //导入方法依赖的package包/类
@Override
public Responsibility updateResponsibility(final Responsibility responsibility)
        throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(responsibility, "responsibility");

    if (StringUtils.isBlank(responsibility.getId()) || getResponsibility(responsibility.getId()) == null) {
        throw new RiceIllegalStateException("the responsibility does not exist: " + responsibility);
    }

   List<ResponsibilityAttributeBo> attrBos = Collections.emptyList();
    if (responsibility.getTemplate() != null) {
        attrBos = KimAttributeDataBo.createFrom(ResponsibilityAttributeBo.class, responsibility.getAttributes(), responsibility.getTemplate().getKimTypeId());
    }
    ResponsibilityBo bo = ResponsibilityBo.from(responsibility);

    if (bo.getAttributeDetails() != null) {
        bo.getAttributeDetails().clear();
        bo.setAttributeDetails(attrBos);
    }

    return ResponsibilityBo.to(getDataObjectService().save(bo));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:23,代码来源:ResponsibilityServiceImpl.java

示例3: getResponsibilityTypeServicesByTemplateId

import org.kuali.rice.kim.api.responsibility.Responsibility; //导入方法依赖的package包/类
private Map<String, ResponsibilityTypeService> getResponsibilityTypeServicesByTemplateId(Collection<Responsibility> responsibilities) {
    Map<String, ResponsibilityTypeService> responsibilityTypeServices = new HashMap<String, ResponsibilityTypeService>(responsibilities.size());
    for (Responsibility responsibility : responsibilities) {
        final Template t = responsibility.getTemplate();
        final KimType type = kimTypeInfoService.getKimType(t.getKimTypeId());

        final String serviceName = type.getServiceName();
        if (serviceName != null) {
            ResponsibilityTypeService responsibiltyTypeService = GlobalResourceLoader.getService(QName.valueOf(serviceName));
            if (responsibiltyTypeService != null) {
                responsibilityTypeServices.put(responsibility.getTemplate().getId(), responsibiltyTypeService);
            } else {
                responsibilityTypeServices.put(responsibility.getTemplate().getId(), defaultResponsibilityTypeService);
            }
        }
    }
    return Collections.unmodifiableMap(responsibilityTypeServices);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:ResponsibilityServiceImpl.java

示例4: from

import org.kuali.rice.kim.api.responsibility.Responsibility; //导入方法依赖的package包/类
/**
 * Converts a immutable object to its mutable counterpart
 *
 * @param im immutable object
 * @return the mutable bo
 */
public static ResponsibilityBo from(Responsibility im) {
    if (im == null) {
        return null;
    }
    ResponsibilityBo bo = new ResponsibilityBo();
    bo.id = im.getId();
    bo.namespaceCode = im.getNamespaceCode();
    bo.name = im.getName();
    bo.description = im.getDescription();
    bo.active = im.isActive();
    bo.templateId = im.getTemplate() != null ? im.getTemplate().getId() : null;
    bo.template = ResponsibilityTemplateBo.from(im.getTemplate());
    bo.attributes = im.getAttributes();
    bo.setVersionNumber(im.getVersionNumber());
    bo.setObjectId(im.getObjectId());
    return bo;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:24,代码来源:ReviewResponsibilityBo.java

示例5: createResponsibility

import org.kuali.rice.kim.api.responsibility.Responsibility; //导入方法依赖的package包/类
@Override
public Responsibility createResponsibility(final Responsibility responsibility)
        throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(responsibility, "responsibility");

    if (StringUtils.isNotBlank(responsibility.getId()) && getResponsibility(responsibility.getId()) != null) {
        throw new RiceIllegalStateException("the responsibility to create already exists: " + responsibility);
    }
    List<ResponsibilityAttributeBo> attrBos = Collections.emptyList();
    if (responsibility.getTemplate() != null) {
        attrBos = KimAttributeDataBo.createFrom(ResponsibilityAttributeBo.class, responsibility.getAttributes(), responsibility.getTemplate().getKimTypeId());
    }
    ResponsibilityBo bo = ResponsibilityBo.from(responsibility);
    bo.setAttributeDetails(attrBos);
    return ResponsibilityBo.to(businessObjectService.save(bo));
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:17,代码来源:ResponsibilityServiceImpl.java

示例6: updateResponsibility

import org.kuali.rice.kim.api.responsibility.Responsibility; //导入方法依赖的package包/类
@Override
public Responsibility updateResponsibility(final Responsibility responsibility)
        throws RiceIllegalArgumentException, RiceIllegalStateException {
    incomingParamCheck(responsibility, "responsibility");

    if (StringUtils.isBlank(responsibility.getId()) || getResponsibility(responsibility.getId()) == null) {
        throw new RiceIllegalStateException("the responsibility does not exist: " + responsibility);
    }

   List<ResponsibilityAttributeBo> attrBos = Collections.emptyList();
    if (responsibility.getTemplate() != null) {
        attrBos = KimAttributeDataBo.createFrom(ResponsibilityAttributeBo.class, responsibility.getAttributes(), responsibility.getTemplate().getKimTypeId());
    }
    ResponsibilityBo bo = ResponsibilityBo.from(responsibility);

    if (bo.getAttributeDetails() != null) {
        bo.getAttributeDetails().clear();
        bo.setAttributeDetails(attrBos);
    }

    return ResponsibilityBo.to(businessObjectService.save(bo));
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:23,代码来源:ResponsibilityServiceImpl.java


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