• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DocumentHeader类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.kuali.rice.krad.bo.DocumentHeader的典型用法代码示例。如果您正苦于以下问题:Java DocumentHeader类的具体用法?Java DocumentHeader怎么用?Java DocumentHeader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DocumentHeader类属于org.kuali.rice.krad.bo包,在下文中一共展示了DocumentHeader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: isDocumentOverviewValid

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * Verifies that the document's overview fields are valid - it does required and format checks.
 *
 * @param document
 * @return boolean True if the document description is valid, false otherwise.
 */
public boolean isDocumentOverviewValid(Document document) {
    // add in the documentHeader path
    GlobalVariables.getMessageMap().addToErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);
    GlobalVariables.getMessageMap().addToErrorPath(KRADConstants.DOCUMENT_HEADER_PROPERTY_NAME);

    // check the document header for fields like the description
    getDictionaryValidationService().validateBusinessObject(document.getDocumentHeader());
    validateSensitiveDataValue(KRADPropertyConstants.EXPLANATION, document.getDocumentHeader().getExplanation(),
            getDataDictionaryService().getAttributeLabel(DocumentHeader.class, KRADPropertyConstants.EXPLANATION));
    validateSensitiveDataValue(KRADPropertyConstants.DOCUMENT_DESCRIPTION,
            document.getDocumentHeader().getDocumentDescription(), getDataDictionaryService().getAttributeLabel(
            DocumentHeader.class, KRADPropertyConstants.DOCUMENT_DESCRIPTION));

    // drop the error path keys off now
    GlobalVariables.getMessageMap().removeFromErrorPath(KRADConstants.DOCUMENT_HEADER_PROPERTY_NAME);
    GlobalVariables.getMessageMap().removeFromErrorPath(KRADConstants.DOCUMENT_PROPERTY_NAME);

    return GlobalVariables.getMessageMap().hasNoErrors();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:DocumentRuleBase.java


示例2: createTestingEntity

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
protected EntityDefault createTestingEntity() {
    IdentityManagementPersonDocument personDoc = initPersonDoc();

    WorkflowDocument document = WorkflowDocumentFactory.createDocument(adminPerson.getPrincipalId(),"TestDocumentType");
    DocumentHeader documentHeader = new DocumentHeader();
    documentHeader.setWorkflowDocument(document);
    documentHeader.setDocumentNumber(document.getDocumentId());
    personDoc.setDocumentHeader(documentHeader);

    // first - save them so we can inactivate them
    uiDocumentService.saveEntityPerson(personDoc);
    // verify that the record was saved
    EntityDefault entity = KimApiServiceLocator.getIdentityService().getEntityDefault(personDoc.getEntityId());
    assertNotNull( "Entity was not saved: " + personDoc, entity);
    assertNotNull( "Principal list was null on retrieved record", entity.getPrincipals() );
    assertEquals( "Principal list was incorrect length", 1, entity.getPrincipals().size() );
    assertTrue( "Principal is not active on saved record", entity.getPrincipals().get(0).isActive() );
    return entity;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:UiDocumentServiceImplTest.java


示例3: testInactivatePrincipal

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
@Test
public void testInactivatePrincipal() {
    createTestingEntity();
    // create a new person document and inactivate the record we just created
    IdentityManagementPersonDocument personDoc = initPersonDoc();

    WorkflowDocument document = WorkflowDocumentFactory.createDocument(adminPerson.getPrincipalId(),"TestDocumentType");
    DocumentHeader documentHeader = new DocumentHeader();
    documentHeader.setWorkflowDocument(document);
    documentHeader.setDocumentNumber(document.getDocumentId());
    personDoc.setDocumentHeader(documentHeader);

    personDoc.setActive(false);
    uiDocumentService.saveEntityPerson(personDoc);
    EntityDefault entity = KimApiServiceLocator.getIdentityService().getEntityDefault(personDoc.getEntityId());

    assertNotNull( "Entity missing after inactivation: " + personDoc, entity);
    assertNotNull( "Principal list was null on retrieved record", entity.getPrincipals() );
    assertEquals( "Principal list was incorrect length", 1, entity.getPrincipals().size() );
    assertFalse( "Principal is active on saved record (after inactivation)", entity.getPrincipals().get(0).isActive() );
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:UiDocumentServiceImplTest.java


示例4: doRouteStatusChange

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * This method overrides the parent method to check the status of the award document and change the linked
 * {@link ProposalStatus} to A (Approved) if the {@link Award} is now in approved status.
 *
 * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#doRouteStatusChange(org.kuali.rice.krad.bo.DocumentHeader)
 */
@Override
public void doRouteStatusChange(DocumentHeader header) {
    super.doRouteStatusChange(header);

    Award award = getAward();
    WorkflowDocument workflowDoc = header.getWorkflowDocument();

    // Use the isProcessed() method so this code is only executed when the final approval occurs
    if (workflowDoc.isProcessed()) {
        Proposal proposal = award.getProposal();
        proposal.setProposalStatusCode(Proposal.AWARD_CODE);
        SpringContext.getBean(BusinessObjectService.class).save(proposal);
    }

}
 
开发者ID:kuali,项目名称:kfs,代码行数:22,代码来源:AwardMaintainableImpl.java


示例5: doRouteStatusChange

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * Override to push chart manager id into KIM
 *
 * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#doRouteStatusChange(org.kuali.rice.kns.bo.DocumentHeader)
 */
@Override
public void doRouteStatusChange(DocumentHeader documentHeader) {
    if (documentHeader.getWorkflowDocument().isProcessed()) {
        Chart chart = (Chart) getBusinessObject();
        Person oldChartManager = SpringContext.getBean(ChartService.class).getChartManager(chart.getChartOfAccountsCode());

        // Only make the KIM calls if the chart manager was changed
        if ( oldChartManager == null || !StringUtils.equals(chart.getFinCoaManagerPrincipalId(), oldChartManager.getPrincipalId() ) ) {
            RoleService roleService = KimApiServiceLocator.getRoleService();

            Map<String,String> qualification = new HashMap<String,String>(1);
            qualification.put(OleKimAttributes.CHART_OF_ACCOUNTS_CODE, chart.getChartOfAccountsCode());

            if (oldChartManager != null) {
                roleService.removePrincipalFromRole(oldChartManager.getPrincipalId(), OLEConstants.CoreModuleNamespaces.OLE, OLEConstants.SysKimApiConstants.CHART_MANAGER_KIM_ROLE_NAME, qualification);
            }

            if (StringUtils.isNotBlank(chart.getFinCoaManagerPrincipalId())) {
                roleService.assignPrincipalToRole(chart.getFinCoaManagerPrincipalId(), OLEConstants.CoreModuleNamespaces.OLE, OLEConstants.SysKimApiConstants.CHART_MANAGER_KIM_ROLE_NAME, qualification);
            }
        }
    }

    super.doRouteStatusChange(documentHeader);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:31,代码来源:ChartMaintainableImpl.java


示例6: initiateSearchableAttributes

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
private void initiateSearchableAttributes(LeaveRequestDocument leaveRequestDocument) {
    DocumentHeader dh = leaveRequestDocument.getDocumentHeader();
    WorkflowDocument workflowDocument = dh.getWorkflowDocument();
    if (!DocumentStatus.FINAL.equals(workflowDocument.getStatus())) {
        try {
            workflowDocument.setApplicationContent(createSearchableAttributeXml(leaveRequestDocument, leaveRequestDocument.getLeaveBlock()));
            workflowDocument.saveDocument("");
            if (!"I".equals(workflowDocument.getStatus().getCode())) {
                if (GlobalVariables.getUserSession() != null && workflowDocument.getInitiatorPrincipalId().equals(GlobalVariables.getUserSession().getPrincipalId())) {
                    workflowDocument.saveDocument("");
                } else{
                    workflowDocument.saveDocumentData();
                }
            } else{
                workflowDocument.saveDocument("");
            }


        } catch (Exception e) {
            LOG.warn("Exception during searchable attribute update.");
            throw new RuntimeException(e);
        }
    }
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:25,代码来源:LeaveRequestDocumentServiceImpl.java


示例7: doRouteStatusChange

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
@Override
public void doRouteStatusChange(DocumentHeader documentHeader) {
     LOG.debug("doRouteStatusChange() starting");
    super.doRouteStatusChange(documentHeader);

    try {
        if (documentHeader.getWorkflowDocument().isFinal()) {
            OLEClaimNoticeBo oleClaimNoticeBo = (OLEClaimNoticeBo) this.getDataObject();
            OleMailer oleMail= GlobalResourceLoader.getService("oleMailer");
            if(oleClaimNoticeBo.getMailAddress()!=null && !oleClaimNoticeBo.getMailAddress().isEmpty()){
                LoanProcessor loanProcessor = new LoanProcessor();
                String fromMail = loanProcessor.getParameter(OLEParameterConstants.NOTICE_FROM_MAIL);
                oleMail.sendEmail(new EmailFrom(fromMail),new EmailTo(oleClaimNoticeBo.getMailAddress()), new EmailSubject("Claim Report"), new EmailBody(claimReportNotice(oleClaimNoticeBo)), true);
                if (LOG.isInfoEnabled()){
                    LOG.info("Mail send successfully to "+oleClaimNoticeBo.getMailAddress());
                }
            }
        }
    } catch (Exception e) {
        LOG.error("Exception saving routing data while saving document with id " + getDocumentNumber(), e);
    }
    LOG.debug("doRouteStatusChange() ending");
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:24,代码来源:OLEClaimNoticeMaintenanceImpl.java


示例8: populateDocumentDescription

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * Defaults the document description based on the credit memo source type.
 *
 * @param cmDocument - Credit Memo Document to Populate
 */
protected void populateDocumentDescription(VendorCreditMemoDocument cmDocument) {
    String description = "";
    if (cmDocument.isSourceVendor()) {
        description = "Vendor: " + cmDocument.getVendorName();
    } else {
        description = "PO: " + cmDocument.getPurchaseOrderDocument().getPurapDocumentIdentifier() + " Vendor: " + cmDocument.getVendorName();
    }

    // trim description if longer than whats specified in the data dictionary
    int noteTextMaxLength = dataDictionaryService.getAttributeMaxLength(DocumentHeader.class, KRADPropertyConstants.DOCUMENT_DESCRIPTION).intValue();
    if (noteTextMaxLength < description.length()) {
        description = description.substring(0, noteTextMaxLength);
    }

    cmDocument.getDocumentHeader().setDocumentDescription(description);
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:22,代码来源:CreditMemoServiceImpl.java


示例9: processAfterRetrieve

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * This is the default implementation which ensures that document note attachment references are loaded.
 * 
 * @see org.kuali.rice.krad.document.Document#processAfterRetrieve()
 */
@Override
public void processAfterRetrieve() {
    // set correctedByDocumentId manually, since OJB doesn't maintain that relationship
    try {
        DocumentHeader correctingDocumentHeader = SpringContext.getBean(FinancialSystemDocumentHeaderDao.class).getCorrectingDocumentHeader(getDocumentHeader().getWorkflowDocument().getDocumentId());
        if (correctingDocumentHeader != null) {
            getFinancialSystemDocumentHeader().setCorrectedByDocumentId(correctingDocumentHeader.getDocumentNumber());
        }
    } catch (RuntimeException e) {
        LOG.error("Received WorkflowException trying to get route header id from workflow document");
        throw new WorkflowRuntimeException(e);
    }
    // set the ad hoc route recipients too, since OJB doesn't maintain that relationship
    // TODO - see KULNRVSYS-1054

    super.processAfterRetrieve();
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:23,代码来源:FinancialSystemMaintenanceDocument.java


示例10: processAfterRetrieve

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * This is the default implementation which ensures that document note attachment references are loaded.
 *
 * @see org.kuali.rice.krad.document.Document#processAfterRetrieve()
 */
@Override
public void processAfterRetrieve() {
    // set correctedByDocumentId manually, since OJB doesn't maintain that relationship
    try {
        DocumentHeader correctingDocumentHeader = SpringContext.getBean(FinancialSystemDocumentHeaderDao.class).getCorrectingDocumentHeader(getFinancialSystemDocumentHeader().getDocumentNumber());
        if (correctingDocumentHeader != null) {
            getFinancialSystemDocumentHeader().setCorrectedByDocumentId(correctingDocumentHeader.getDocumentNumber());
        }
    } catch (Exception e) {
        LOG.error("Received WorkflowException trying to get route header id from workflow document.", e);
        throw new WorkflowRuntimeException(e);
    }
    // set the ad hoc route recipients too, since OJB doesn't maintain that relationship
    // TODO - see KULNRVSYS-1054

    super.processAfterRetrieve();
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:23,代码来源:FinancialSystemTransactionalDocumentBase.java


示例11: processAfterRetrieve

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * This is the default implementation which ensures that document note attachment references are loaded.
 *
 * @see org.kuali.rice.krad.document.Document#processAfterRetrieve()
 */
@Override
public void processAfterRetrieve() {
    // set correctedByDocumentId manually, since OJB doesn't maintain that relationship
    try {
        DocumentHeader correctingDocumentHeader = SpringContext.getBean(FinancialSystemDocumentHeaderDao.class).getCorrectingDocumentHeader(getFinancialSystemDocumentHeader().getDocumentNumber());
        if (ObjectUtils.isNotNull(correctingDocumentHeader) && !correctingDocumentHeader.getWorkflowDocument().isCanceled() && !correctingDocumentHeader.getWorkflowDocument().isDisapproved()) {
            getFinancialSystemDocumentHeader().setCorrectedByDocumentId(correctingDocumentHeader.getDocumentNumber());
        }
    } catch (Exception e) {
        LOG.error("Received WorkflowException trying to get route header id from workflow document.", e);
        throw new WorkflowRuntimeException(e);
    }
    // set the ad hoc route recipients too, since OJB doesn't maintain that relationship
    // TODO - see KULNRVSYS-1054

    super.processAfterRetrieve();
}
 
开发者ID:kuali,项目名称:kfs,代码行数:23,代码来源:FinancialSystemTransactionalDocumentBase.java


示例12: doRouteStatusChange

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
@Override
  public void doRouteStatusChange(DocumentHeader documentHeader) {

ClassificationBo classification = (ClassificationBo)this.getDataObject();
DocumentStatus documentStatus = documentHeader.getWorkflowDocument().getStatus();
	
//Set document description for real here
String docDescription = classification.getPositionClass() + ": " + classification.getClassificationTitle();

if (DocumentStatus.ENROUTE.equals(documentStatus)) {
	try {
		MaintenanceDocument md = (MaintenanceDocument)KRADServiceLocatorWeb.getDocumentService().getByDocumentHeaderId(documentHeader.getDocumentNumber());
        md.getDocumentHeader().setDocumentDescription(docDescription);
        md.getNewMaintainableObject().setDataObject(classification);
        KRADServiceLocatorWeb.getDocumentService().saveDocument(md);
	} catch (WorkflowException e) {
           LOG.error("caught exception while handling doRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);
           throw new RuntimeException("caught exception while handling doRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);
       }
}
  }
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:22,代码来源:ClassificationMaintainableImpl.java


示例13: getWorkFlowStatusString

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
public static String getWorkFlowStatusString(DocumentHeader documentHeader) {
    if (documentHeader.getWorkflowDocument().isInitiated()) {
        return "INITIATED";
    }
    else if (documentHeader.getWorkflowDocument().isEnroute()) {
        return "ENROUTE";
    }
    else if (documentHeader.getWorkflowDocument().isDisapproved()) {
        return "DISAPPROVED";
    }
    else if (documentHeader.getWorkflowDocument().isCanceled()) {
        return "CANCELLED";
    }
    else if (documentHeader.getWorkflowDocument().isApproved()) {
        return "APPROVED";
    }
    else {
        return StringUtils.EMPTY;
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:21,代码来源:PurapSearchUtils.java


示例14: populateDocumentDescription

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * Defaults the document description based on the credit memo source type.
 *
 * @param cmDocument - Credit Memo Document to Populate
 */
protected void populateDocumentDescription(VendorCreditMemoDocument cmDocument) {
    String description = "";
    if (cmDocument.isSourceVendor()) {
        description = "Vendor: " + cmDocument.getVendorName();
    }
    else {
        description = "PO: " + cmDocument.getPurchaseOrderDocument().getPurapDocumentIdentifier() + " Vendor: " + cmDocument.getVendorName();
    }

    // trim description if longer than whats specified in the data dictionary
    int noteTextMaxLength = dataDictionaryService.getAttributeMaxLength(DocumentHeader.class, KRADPropertyConstants.DOCUMENT_DESCRIPTION).intValue();
    if (noteTextMaxLength < description.length()) {
        description = description.substring(0, noteTextMaxLength);
    }

    cmDocument.getDocumentHeader().setDocumentDescription(description);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:23,代码来源:CreditMemoServiceImpl.java


示例15: createPreqDocumentDescription

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * @see org.kuali.kfs.module.purap.document.service.PaymentRequestService#createPreqDocumentDescription(java.lang.Integer,
 *      java.lang.String)
 */
@Override
@NonTransactional
public String createPreqDocumentDescription(Integer purchaseOrderIdentifier, String vendorName) {
    StringBuffer descr = new StringBuffer("");
    descr.append("PO: ");
    descr.append(purchaseOrderIdentifier);
    descr.append(" Vendor: ");
    descr.append(StringUtils.trimToEmpty(vendorName));

    int noteTextMaxLength = dataDictionaryService.getAttributeMaxLength(DocumentHeader.class, KRADPropertyConstants.DOCUMENT_DESCRIPTION).intValue();
    if (noteTextMaxLength >= descr.length()) {
        return descr.toString();
    }
    else {
        return descr.toString().substring(0, noteTextMaxLength);
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:22,代码来源:PaymentRequestServiceImpl.java


示例16: shouldRunValidation

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * Determines if this validation should be run at this node
 * @param document the document which is being validated
 * @return true if one of the validation nodes is within the current nodes and the validation should run; false otherwise
 */
@Override
protected boolean shouldRunValidation(Document document) {
    if (document == null) {
        throw new IllegalStateException("Attempting to run NodeSpecificValidation but the event didn't have a document associated with it");
    }
    final DocumentHeader documentHeader = document.getDocumentHeader();
    final WorkflowDocument workflowDocument = documentHeader.getWorkflowDocument();

    if (workflowDocument != null) {
        if (getValidationSkipNodes() != null && getValidationSkipNodes().contains(PRE_ROUTE)) {
            if (workflowDocument.isInitiated() || workflowDocument.isSaved()) {
                return false; // special pre-route check
            }
        }

        final Set<String> currentNodes = workflowDocument.getCurrentNodeNames();
        for (String validationNode : getValidationSkipNodes()) {
            if (currentNodes.contains(validationNode)) {
                return false;
            }
        }
    }
    return true;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:30,代码来源:NodeSkippingValidation.java


示例17: saveNewNote

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * Saves a new note instance to the data store if the document state allows it.
 *
 * @param form form instance containing the add note instance
 * @param document document instance the note is associated with
 * @param newNote note instance to save
 */
protected void saveNewNote(DocumentFormBase form, Document document, Note newNote) {
    DocumentHeader documentHeader = document.getDocumentHeader();

    if (!documentHeader.getWorkflowDocument().isInitiated() && StringUtils.isNotEmpty(
            document.getNoteTarget().getObjectId()) && !(document instanceof MaintenanceDocument && NoteType
            .BUSINESS_OBJECT.getCode().equals(newNote.getNoteTypeCode()))) {

        getNoteService().save(newNote);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:DocumentControllerServiceImpl.java


示例18: DocumentBase

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * Constructs a DocumentBase.java.
 */
public DocumentBase() {
    documentHeader = new DocumentHeader();
    pessimisticLocks = new ArrayList<PessimisticLock>();
    adHocRoutePersons = new ArrayList<AdHocRoutePerson>();
    adHocRouteWorkgroups = new ArrayList<AdHocRouteWorkgroup>();
    notes = new ArrayList<Note>();
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:DocumentBase.java


示例19: setNewDocumentHeader

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * Gets a new document header for this documents type and sets in the document instance.
 *
 * @throws WorkflowException
 */
protected void setNewDocumentHeader() throws WorkflowException {
    // collect the header information from the old document
    Person user = GlobalVariables.getUserSession().getPerson();
    WorkflowDocument sourceWorkflowDocument
            = KRADServiceLocatorWeb.getWorkflowDocumentService().loadWorkflowDocument(getDocumentNumber(), user);
    String sourceDocumentTypeName = sourceWorkflowDocument.getDocumentTypeName();

    // initiate the new workflow entry, get the workflow doc
    WorkflowDocument workflowDocument
            = KRADServiceLocatorWeb.getWorkflowDocumentService().createWorkflowDocument(sourceDocumentTypeName, user);
    UserSessionUtils.addWorkflowDocument(GlobalVariables.getUserSession(), workflowDocument);

    // set new values on the document header, including the document number from which it was copied
    Document newDocument = KRADServiceLocatorWeb.getDocumentService().getNewDocument(sourceDocumentTypeName);
    DocumentHeader newDocumentHeader = newDocument.getDocumentHeader();
    newDocumentHeader.setDocumentTemplateNumber(getDocumentNumber());
    newDocumentHeader.setDocumentDescription(getDocumentHeader().getDocumentDescription());
    newDocumentHeader.setOrganizationDocumentNumber(getDocumentHeader().getOrganizationDocumentNumber());

    // set the new document number on this document
    try {
        KRADServiceLocatorWeb.getLegacyDataAdapter().setObjectPropertyDeep(this,
                KRADPropertyConstants.DOCUMENT_NUMBER, documentNumber.getClass(), newDocument.getDocumentNumber());
    } catch (Exception e) {
        LOG.error("Unable to set document number property in copied document " + this, e);
        throw new RuntimeException("Unable to set document number property in copied document " + this, e);
    }

    // replace the current document header with the new document header
    setDocumentHeader(newDocument.getDocumentHeader());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:37,代码来源:DocumentBase.java


示例20: getDocumentHeader

import org.kuali.rice.krad.bo.DocumentHeader; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public DocumentHeader getDocumentHeader() {
    // during the transition time between OJB and JPA - the OJB hooks are not firing
    // so, we lazy load the document header.
    if ((documentHeader == null || documentHeader.getDocumentNumber() == null) && StringUtils.isNotBlank(documentNumber)) {
        documentHeader = KRADServiceLocatorWeb.getDocumentHeaderService().getDocumentHeaderById(documentNumber);
    }

    return this.documentHeader;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:DocumentBase.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OpenFileAction类代码示例发布时间:2022-05-22
下一篇:
Java BasePresenter类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap