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


Java DocumentHeader.getDocumentNumber方法代码示例

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


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

示例1: doRouteStatusChange

import org.kuali.rice.krad.bo.DocumentHeader; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#doRouteStatusChange(org.kuali.rice.krad.bo.DocumentHeader)
 */
@Override
public void doRouteStatusChange(DocumentHeader documentHeader) {
    super.doRouteStatusChange(documentHeader);

    if (documentHeader.getWorkflowDocument().isProcessed()) {
        DocumentService documentService = SpringContext.getBean(DocumentService.class);
        try {
            MaintenanceDocument document = (MaintenanceDocument) documentService.getByDocumentHeaderId(documentHeader.getDocumentNumber());
            SecurityPrincipal oldSecurityPrincipal = (SecurityPrincipal) document.getOldMaintainableObject().getBusinessObject();
            SecurityPrincipal newSecurityPrincipal = (SecurityPrincipal) document.getNewMaintainableObject().getBusinessObject();

            boolean newMaintenanceAction = getMaintenanceAction().equalsIgnoreCase(KRADConstants.MAINTENANCE_NEW_ACTION) || getMaintenanceAction().equalsIgnoreCase(KRADConstants.MAINTENANCE_COPY_ACTION);

            assignOrUpdatePrincipalMembershipToDefinitionRoles(oldSecurityPrincipal, newSecurityPrincipal, newMaintenanceAction);
            assignOrUpdatePrincipalModelRoles(newSecurityPrincipal);
        }
        catch (WorkflowException e) {
            LOG.error("caught exception while handling handleRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);
            throw new RuntimeException("caught exception while handling handleRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);
        }
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:26,代码来源:SecurityPrincipalMaintainableImpl.java

示例2: doRouteStatusChange

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

String docDescription = null;
PositionBo position = (PositionBo)this.getDataObject();
DocumentStatus documentStatus = documentHeader.getWorkflowDocument().getStatus();
	
//Set document description for real here
if (StringUtils.isEmpty(position.getPositionNumber())) {
	docDescription = "Process: " + position.getProcess() + " Position Status: " + position.getPositionStatus();
} else {
	docDescription = "Process: " + position.getProcess() + " Position Number: " + position.getPositionNumber() + " Position Status: " + position.getPositionStatus();
}

if (DocumentStatus.ENROUTE.equals(documentStatus)) {
	try {
		MaintenanceDocument md = (MaintenanceDocument)KRADServiceLocatorWeb.getDocumentService().getByDocumentHeaderId(documentHeader.getDocumentNumber());
        md.getDocumentHeader().setDocumentDescription(docDescription);
        md.getNewMaintainableObject().setDataObject(position);
        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,代码行数:27,代码来源:PositionMaintainableServiceImpl.java

示例3: 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

示例4: doRouteStatusChange

import org.kuali.rice.krad.bo.DocumentHeader; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#doRouteStatusChange(org.kuali.rice.krad.bo.DocumentHeader)
 */
@Override
public void doRouteStatusChange(DocumentHeader documentHeader) {
    super.doRouteStatusChange(documentHeader);

    if (documentHeader.getWorkflowDocument().isProcessed()) {
        DocumentService documentService = SpringContext.getBean(DocumentService.class);
        try {
            MaintenanceDocument document = (MaintenanceDocument) documentService.getByDocumentHeaderId(documentHeader.getDocumentNumber());
            SecurityModel oldSecurityModel = (SecurityModel) document.getOldMaintainableObject().getBusinessObject();
            SecurityModel newSecurityModel = (SecurityModel) document.getNewMaintainableObject().getBusinessObject();

            boolean newMaintenanceAction = getMaintenanceAction().equalsIgnoreCase(KRADConstants.MAINTENANCE_NEW_ACTION) || getMaintenanceAction().equalsIgnoreCase(KRADConstants.MAINTENANCE_COPY_ACTION);

            Role modelRole = createOrUpdateModelRole(newSecurityModel);
            assignOrUpdateModelMembershipToDefinitionRoles(modelRole, oldSecurityModel, newSecurityModel, newMaintenanceAction);
            assignOrUpdateModelMembers(modelRole, newSecurityModel);

            if (!newSecurityModel.isActive()) {
                inactivateModelRole(modelRole);
            }
        }
        catch (WorkflowException e) {
            LOG.error("caught exception while handling handleRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);
            throw new RuntimeException("caught exception while handling handleRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);
        }
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:31,代码来源:SecurityModelMaintainableImpl.java

示例5: doRouteStatusChange

import org.kuali.rice.krad.bo.DocumentHeader; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#doRouteStatusChange(org.kuali.rice.krad.bo.DocumentHeader)
 */
@Override
public void doRouteStatusChange(DocumentHeader documentHeader) {
    super.doRouteStatusChange(documentHeader);

    if (documentHeader.getWorkflowDocument().isProcessed()) {
        DocumentService documentService = SpringContext.getBean(DocumentService.class);
        try {
            MaintenanceDocument document = (MaintenanceDocument) documentService.getByDocumentHeaderId(documentHeader.getDocumentNumber());
            SecurityDefinition oldSecurityDefinition = (SecurityDefinition) document.getOldMaintainableObject().getBusinessObject();
            SecurityDefinition newSecurityDefinition = (SecurityDefinition) document.getNewMaintainableObject().getBusinessObject();

            oldSecurityDefinition.refreshNonUpdateableReferences();
            newSecurityDefinition.refreshNonUpdateableReferences();

            boolean newMaintenanceAction = getMaintenanceAction().equalsIgnoreCase(KRADConstants.MAINTENANCE_NEW_ACTION) || getMaintenanceAction().equalsIgnoreCase(KRADConstants.MAINTENANCE_COPY_ACTION);

            createOrUpdateDefinitionRole(oldSecurityDefinition, newSecurityDefinition);

            createOrUpdateDocumentPermissions(newSecurityDefinition);
            createOrUpdateLookupPermission(newSecurityDefinition);
            createOrUpdateInquiryPermissions(newSecurityDefinition);
        }
        catch (WorkflowException e) {
            LOG.error("caught exception while handling handleRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);
            throw new RuntimeException("caught exception while handling handleRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);
        }
    }
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:32,代码来源:SecurityDefinitionMaintainableImpl.java

示例6: exceptionsToAutoDisapproveProcess

import org.kuali.rice.krad.bo.DocumentHeader; //导入方法依赖的package包/类
/**
 * This method first checks the document's create date with system parameter date and then
 * checks the document type name to the system parameter values and returns true if the type name exists
 * @param document document to check for its document type,  documentCompareDate the system parameter specified date
 * to compare the current date to this date.
 * @return true if  document's create date is <= documentCompareDate and if document type is not in the
 * system parameter document types that are set to disallow.
 */
protected boolean exceptionsToAutoDisapproveProcess(DocumentHeader documentHeader, Date documentCompareDate) {
    boolean exceptionToDisapprove = true;
    Date createDate = null;

    String documentNumber =  documentHeader.getDocumentNumber();

    DateTime documentCreateDate = documentHeader.getWorkflowDocument().getDateCreated();
    createDate = documentCreateDate.toDate();

    Calendar calendar = Calendar.getInstance();
    calendar.setTime(documentCompareDate);
    String strCompareDate = calendar.getTime().toString();

    calendar.setTime(createDate);
    String strCreateDate = calendar.getTime().toString();

    if (createDate.before(documentCompareDate) || createDate.equals(documentCompareDate)) {
        String documentTypeName = documentHeader.getWorkflowDocument().getDocumentTypeName();

        ParameterEvaluator evaluatorDocumentType = /*REFACTORME*/SpringContext.getBean(ParameterEvaluatorService.class).getParameterEvaluator(AutoDisapproveDocumentsStep.class, KFSParameterKeyConstants.YearEndAutoDisapprovalConstants.YEAR_END_AUTO_DISAPPROVE_DOCUMENT_TYPES, documentTypeName);
        exceptionToDisapprove = !evaluatorDocumentType.evaluationSucceeds();
        if (exceptionToDisapprove) {
            LOG.info("Document Id: " + documentNumber + " - Exception to Auto Disapprove:  Document's type: " + documentTypeName + " is in the System Parameter For Document Types Exception List.");
        }
    }
    else {
        LOG.info("Document Id: " + documentNumber + " - Exception to Auto Disapprove:  Document's create date: " + strCreateDate + " is NOT less than or equal to System Parameter Compare Date: " + strCompareDate);
        exceptionToDisapprove = true;
    }

    return exceptionToDisapprove;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:41,代码来源:AutoDisapproveDocumentsServiceImpl.java

示例7: getNewSourceLine

import org.kuali.rice.krad.bo.DocumentHeader; //导入方法依赖的package包/类
/**
 * @see org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase#getNewSourceLine()
 */
@Override
public SourceAccountingLine getNewSourceLine() {
	// Getting the workflow document number created for the asset payment document.
    SessionDocumentService sessionService = SpringContext.getBean(SessionDocumentService.class);
    DocumentHeader documentHeader = this.getAssetPaymentDocument().getDocumentHeader();

    String worflowDocumentNumber = ObjectUtils.isNotNull(documentHeader) && !StringUtils.isEmpty(documentHeader.getDocumentNumber()) ? documentHeader.getDocumentNumber() : "";
	AssetPaymentDetail newSourceLine = (AssetPaymentDetail) super.getNewSourceLine();

	// Setting default document type.
	if (newSourceLine.getExpenditureFinancialDocumentTypeCode() == null || newSourceLine.getExpenditureFinancialDocumentTypeCode().trim().equals("")) {
		newSourceLine.setExpenditureFinancialDocumentTypeCode(KFSConstants.FinancialDocumentTypeCodes.ASSET_PAYMENT);
	}

	// Setting the default asset payment row document number.
	if (newSourceLine.getExpenditureFinancialDocumentNumber() == null || newSourceLine.getExpenditureFinancialDocumentNumber().trim().equals("")) {
		newSourceLine.setExpenditureFinancialDocumentNumber(worflowDocumentNumber);
	}

	// Setting the default asset payment row origination code.
	if (newSourceLine.getExpenditureFinancialSystemOriginationCode() == null || newSourceLine.getExpenditureFinancialSystemOriginationCode().trim().equals("")) {
		newSourceLine.setExpenditureFinancialSystemOriginationCode(KFSConstants.ORIGIN_CODE_KUALI);
	}

	return newSourceLine;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:30,代码来源:AssetPaymentForm.java

示例8: notifyRouteStatusChange

import org.kuali.rice.krad.bo.DocumentHeader; //导入方法依赖的package包/类
/**
 * @see org.kuali.kfs.integration.cab.CapitalAssetBuilderModuleService#notifyRouteStatusChange(java.lang.String,
 * java.lang.String)
 */
@Override
public void notifyRouteStatusChange(DocumentHeader documentHeader) {

    WorkflowDocument workflowDocument = documentHeader.getWorkflowDocument();
    String documentNumber = documentHeader.getDocumentNumber();

    String documentType = workflowDocument.getDocumentTypeName();

    if (workflowDocument.isCanceled() || workflowDocument.isDisapproved()) {
        // release CAB line items
        activateCabPOLines(documentNumber);
        activateCabGlLines(documentNumber);
    }
    if (workflowDocument.isProcessed()) {
        // update CAB GL lines if fully processed
        updatePOLinesStatusAsProcessed(documentNumber);
        updateGlLinesStatusAsProcessed(documentNumber);
        // report asset numbers to PO
        Integer poId = getPurchaseOrderIdentifier(documentNumber);
        if (poId != null) {
            List<Long> assetNumbers = null;
            if (DocumentTypeName.ASSET_ADD_GLOBAL.equalsIgnoreCase(documentType)) {
                assetNumbers = getAssetNumbersFromAssetGlobal(documentNumber);
            } else if (DocumentTypeName.ASSET_PAYMENT.equalsIgnoreCase(documentType)) {
                assetNumbers = getAssetNumbersFromAssetPayment(documentNumber);
            }

            if (!assetNumbers.isEmpty()) {
                String noteText = buildNoteTextForPurApDoc(documentType, assetNumbers);
                purchasingAccountsPayableModuleService.addAssignedAssetNumbers(poId, workflowDocument.getInitiatorPrincipalId(), noteText);
            }
        }
    }

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


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