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


Java DocumentService.getByDocumentHeaderId方法代码示例

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


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

示例1: doRouteStatusChange

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的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: testRouteDocument

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
@Test
public final void testRouteDocument() throws Exception {
    //create PO
    PurchaseOrderDocument po = PurchaseOrderDocumentFixture.PO_ONLY_REQUIRED_FIELDS.createPurchaseOrderDocument();
    DocumentService documentService = SpringContext.getBean(DocumentService.class);
    po.prepareForSave();       
    AccountingDocumentTestUtils.routeDocument(po, "saving copy source document", null, documentService);
    WorkflowTestUtils.waitForDocumentApproval(po.getDocumentNumber());
    PurchaseOrderDocument poResult = (PurchaseOrderDocument) documentService.getByDocumentHeaderId(po.getDocumentNumber());
    
    //create Receiving
    LineItemReceivingDocument receivingLineDocument = LineItemReceivingDocumentFixture.EMPTY_LINE_ITEM_RECEIVING.createLineItemReceivingDocument();
    receivingLineDocument.populateReceivingLineFromPurchaseOrder(poResult);
    for(OleLineItemReceivingItem rli : (List<OleLineItemReceivingItem>)receivingLineDocument.getItems()){
        rli.setItemReceivedTotalQuantity( rli.getItemOrderedQuantity());
        rli.setItemReceivedTotalParts( rli.getItemOrderedParts());
    }
    receivingLineDocument.prepareForSave();
    assertFalse(DocumentStatus.ENROUTE.equals(receivingLineDocument.getDocumentHeader().getWorkflowDocument().getStatus()));
    routeDocument(receivingLineDocument, "routing line item receiving document", documentService);
    WorkflowTestUtils.waitForDocumentApproval(receivingLineDocument.getDocumentNumber());
    Document document = documentService.getByDocumentHeaderId(receivingLineDocument.getDocumentNumber());
    assertTrue("Document should now be final.", receivingLineDocument.getDocumentHeader().getWorkflowDocument().isEnroute());
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:25,代码来源:LineItemReceivingDocumentTest.java

示例3: testRouteDocumentWithPO

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
@Test
public final void testRouteDocumentWithPO()
throws Exception {
    PurchaseOrderDocument po = PurchaseOrderDocumentFixture.PO_ONLY_REQUIRED_FIELDS.createPurchaseOrderDocument();
    DocumentService documentService = SpringContext.getBean(DocumentService.class);
    po.prepareForSave();
    AccountingDocumentTestUtils.routeDocument(po, "saving copy source document", null, documentService);
    WorkflowTestUtils.waitForDocumentApproval(po.getDocumentNumber());
    PurchaseOrderDocument poResult = (PurchaseOrderDocument) documentService.getByDocumentHeaderId(po.getDocumentNumber());

    BulkReceivingDocument doc = BulkReceivingDocumentFixture.SIMPLE_DOCUMENT_FOR_PO.createBulkReceivingDocument(po);
    doc.prepareForSave();
    routeDocument(doc, "routing bulk receiving document", documentService);
    WorkflowTestUtils.waitForDocumentApproval(doc.getDocumentNumber());
    Document document = documentService.getByDocumentHeaderId(doc.getDocumentNumber());
    assertTrue("Document should now be final.", doc.getDocumentHeader().getWorkflowDocument().isEnroute());

}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:19,代码来源:BulkReceivingDocumentTest.java

示例4: testRouteDocumentWithPO

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
@ConfigureContext(session = parke, shouldCommitTransactions=true)
public final void testRouteDocumentWithPO()
throws Exception {
    PurchaseOrderDocument po = PurchaseOrderDocumentFixture.PO_ONLY_REQUIRED_FIELDS.createPurchaseOrderDocument();
    DocumentService documentService = SpringContext.getBean(DocumentService.class);
    po.prepareForSave();
    AccountingDocumentTestUtils.routeDocument(po, "saving copy source document", null, documentService);
    WorkflowTestUtils.waitForDocumentApproval(po.getDocumentNumber());
    PurchaseOrderDocument poResult = (PurchaseOrderDocument) documentService.getByDocumentHeaderId(po.getDocumentNumber());

    BulkReceivingDocument doc = BulkReceivingDocumentFixture.SIMPLE_DOCUMENT_FOR_PO.createBulkReceivingDocument(po);
    doc.prepareForSave();
    routeDocument(doc, "routing bulk receiving document", documentService);
    WorkflowTestUtils.waitForDocumentApproval(doc.getDocumentNumber());
    Document document = documentService.getByDocumentHeaderId(doc.getDocumentNumber());
    assertTrue("Document should now be final.", doc.getDocumentHeader().getWorkflowDocument().isFinal());

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

示例5: prepareAndSavePOWithChanges

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
 * Save a PO with the given attributes.  The last two parameters should be set together.
 * 
 * @param   itemInvoicedTotalQuantity           KualiDecimal
 * @param   itemOutstandingEncumberedAmount     KualiDecimal
 * @param   itemUnitPrice                       BigDecimal
 * @return A valid Integer PurchaseOrderIdentifier
 * @throws Exception
 */
private Integer prepareAndSavePOWithChanges(KualiDecimal itemInvoicedTotalQuantity,
        KualiDecimal itemOutstandingEncumberedAmount,
        BigDecimal itemUnitPrice) throws Exception {
    PurchaseOrderDocumentTest poDocTest = new PurchaseOrderDocumentTest();
    PurchaseOrderDocument po = poDocTest.buildSimpleDocument();
    
    PurchaseOrderItem poItem = (PurchaseOrderItem)po.getItemByLineNumber(1);
    poItem.setItemInvoicedTotalQuantity(itemInvoicedTotalQuantity);
    poItem.setItemUnitPrice(itemUnitPrice);
    poItem.setItemOutstandingEncumberedAmount(itemOutstandingEncumberedAmount);
    
    po.prepareForSave();
    DocumentService documentService = SpringContext.getBean(DocumentService.class);
    AccountingDocumentTestUtils.saveDocument(po, documentService);
    PurchaseOrderDocument poWithID = (PurchaseOrderDocument)documentService.getByDocumentHeaderId(po.getDocumentNumber());
    return poWithID.getPurapDocumentIdentifier();
}
 
开发者ID:kuali,项目名称:kfs,代码行数:27,代码来源:CreditMemoDocumentRuleTest.java

示例6: doRouteStatusChange

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

    // if new customer was created => dates have been already updated
    if (getMaintenanceAction().equalsIgnoreCase(KRADConstants.MAINTENANCE_NEW_ACTION)) {
        return;
    }

    if (documentHeader.getWorkflowDocument().isProcessed()) {
        DocumentService documentService = SpringContext.getBean(DocumentService.class);
        try {
            MaintenanceDocument document = (MaintenanceDocument) documentService.getByDocumentHeaderId(documentHeader.getDocumentNumber());
            Customer newCustomer = (Customer) document.getNewMaintainableObject().getBusinessObject();
            Customer oldCustomer = (Customer) document.getOldMaintainableObject().getBusinessObject();
            updateDates(oldCustomer, newCustomer);
        } catch (WorkflowException e) {
            LOG.error("caught exception while handling handleRouteStatusChange -> documentService.getByDocumentHeaderId(" + documentHeader.getDocumentNumber() + "). ", e);

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

示例7: cancelLinkedPaymentApplicationDocuments

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
 * This method cancels all linked Payment Application documents that are not already in approved status.
 *
 * @param cashControlDocument
 * @throws WorkflowException
 */
protected boolean cancelLinkedPaymentApplicationDocuments(CashControlDocument cashControlDocument) throws WorkflowException {
    boolean success = true;
    List<CashControlDetail> details = cashControlDocument.getCashControlDetails();

    for (CashControlDetail cashControlDetail : details) {
        DocumentService documentService = SpringContext.getBean(DocumentService.class);

        PaymentApplicationDocument applicationDocument = (PaymentApplicationDocument) documentService.getByDocumentHeaderId(cashControlDetail.getReferenceFinancialDocumentNumber());
        if (KFSConstants.DocumentStatusCodes.CANCELLED.equals(applicationDocument.getFinancialSystemDocumentHeader().getFinancialDocumentStatusCode())) {
            // Ignore this case, as it should not impact the ability to cancel a cash control doc.
        }
        else if (!KFSConstants.DocumentStatusCodes.APPROVED.equals(applicationDocument.getFinancialSystemDocumentHeader().getFinancialDocumentStatusCode())) {
            documentService.cancelDocument(applicationDocument, ArKeyConstants.DOCUMENT_DELETED_FROM_CASH_CTRL_DOC);
        }
        else {
            GlobalVariables.getMessageMap().putError(ArPropertyConstants.CashControlDetailFields.CASH_CONTROL_DETAILS_TAB, ArKeyConstants.ERROR_CANT_CANCEL_CASH_CONTROL_DOC_WITH_ASSOCIATED_APPROVED_PAYMENT_APPLICATION);
            success = false;
        }
    }
    return success;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:28,代码来源:CashControlDocumentAction.java

示例8: testRouteDocument

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
@ConfigureContext(session = parke, shouldCommitTransactions=true)
public final void testRouteDocument() throws Exception {
    //create PO
    PurchaseOrderDocument po = PurchaseOrderDocumentFixture.PO_ONLY_REQUIRED_FIELDS.createPurchaseOrderDocument();
    DocumentService documentService = SpringContext.getBean(DocumentService.class);
    po.prepareForSave();
    AccountingDocumentTestUtils.routeDocument(po, "saving copy source document", null, documentService);
    WorkflowTestUtils.waitForDocumentApproval(po.getDocumentNumber());
    PurchaseOrderDocument poResult = (PurchaseOrderDocument) documentService.getByDocumentHeaderId(po.getDocumentNumber());

    //create Receiving
    LineItemReceivingDocument receivingLineDocument = LineItemReceivingDocumentFixture.EMPTY_LINE_ITEM_RECEIVING.createLineItemReceivingDocument();
    receivingLineDocument.populateReceivingLineFromPurchaseOrder(poResult);
    for(LineItemReceivingItem rli : (List<LineItemReceivingItem>)receivingLineDocument.getItems()){
        rli.setItemReceivedTotalQuantity( rli.getItemOrderedQuantity());
    }
    receivingLineDocument.prepareForSave();
    assertFalse(DocumentStatus.ENROUTE.equals(receivingLineDocument.getDocumentHeader().getWorkflowDocument().getStatus()));
    routeDocument(receivingLineDocument, "routing line item receiving document", documentService);
    WorkflowTestUtils.waitForDocumentApproval(receivingLineDocument.getDocumentNumber());
    Document document = documentService.getByDocumentHeaderId(receivingLineDocument.getDocumentNumber());
    assertTrue("Document should now be final.", receivingLineDocument.getDocumentHeader().getWorkflowDocument().isFinal());
}
 
开发者ID:kuali,项目名称:kfs,代码行数:24,代码来源:LineItemReceivingDocumentTest.java

示例9: doRouteStatusChange

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的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

示例10: doRouteStatusChange

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的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

示例11: routePO

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
private PurchaseOrderDocument routePO(PurchaseOrderDocument poDocument)
throws Exception {
  String docId = poDocument.getDocumentNumber();
  DocumentService documentService = SpringContext.getBean(DocumentService.class);
  poDocument.prepareForSave();
  assertFalse(DocumentStatus.ENROUTE.equals(poDocument.getDocumentHeader().getWorkflowDocument().getStatus()));
  AccountingDocumentTestUtils.routeDocument(poDocument, "saving copy source document", null, documentService);
  WorkflowTestUtils.waitForDocumentApproval(poDocument.getDocumentNumber());

  PurchaseOrderDocument result = (PurchaseOrderDocument) documentService.getByDocumentHeaderId(docId);
  return result;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:13,代码来源:ThresholdTest.java

示例12: testAddAssignedAssetNumbers

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
@ConfigureContext(session = parke, shouldCommitTransactions=true)
public void testAddAssignedAssetNumbers() throws Exception {
    Integer purchaseOrderNumber = null;
    PurchaseOrderDocumentTest documentTest = new PurchaseOrderDocumentTest();

        PurchaseOrderDocument poDocument = documentTest.buildSimpleDocument();
        DocumentService documentService = SpringContext.getBean(DocumentService.class);
        poDocument.prepareForSave();       
        AccountingDocumentTestUtils.saveDocument(poDocument, documentService);
        PurchaseOrderDocument result = (PurchaseOrderDocument) documentService.getByDocumentHeaderId(poDocument.getDocumentNumber());
        purchaseOrderNumber = result.getPurapDocumentIdentifier();

    List<Long> assetNumbers = new ArrayList<Long>();
    assetNumbers.add(new Long("12345"));
    assetNumbers.add(new Long("12346"));
    String authorId = "khuntley";
    StringBuffer noteText = new StringBuffer("Asset Numbers have been created for this document: ");
    for (int i = 0; i<assetNumbers.size(); i++) {
        noteText.append(assetNumbers.get(i).toString());
        if (i < assetNumbers.size() -1) {
            noteText.append(", ");
        }
    }
    SpringContext.getBean(PurchasingAccountsPayableModuleService.class).addAssignedAssetNumbers(purchaseOrderNumber, authorId, noteText.toString());
    PurchaseOrderDocument po = SpringContext.getBean(PurchaseOrderService.class).getCurrentPurchaseOrder(purchaseOrderNumber);
    assertNotNull("PO should not have been null",po);
    List<Note> boNotes = po.getNotes();
    boolean hasNote = false;
    for( Note note : boNotes ) {
        if (note.getNoteText().contains("Asset Numbers have been created for this document:")) {
            hasNote = true;
            break;
        }
    }
    assertTrue("note was missing from PO",hasNote);
}
 
开发者ID:kuali,项目名称:kfs,代码行数:37,代码来源:PurchasingAccountsPayableModuleServiceTest.java

示例13: prepareAndSavePO

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
/**
 * Save a PO to get one with a valid poID in the database.
 * 
 * @return A valid Integer PurchaseOrderIdentifier
 * @throws Exception
 */
private Integer prepareAndSavePO() throws Exception {
    PurchaseOrderDocumentTest poDocTest = new PurchaseOrderDocumentTest();
    PurchaseOrderDocument po = poDocTest.buildSimpleDocument();
    po.setApplicationDocumentStatus(PurchaseOrderStatuses.APPDOC_OPEN);
    //po.prepareForSave(); Duplicated by saveDocument.
    DocumentService documentService = SpringContext.getBean(DocumentService.class);
    AccountingDocumentTestUtils.saveDocument(po, documentService);
    PurchaseOrderDocument poWithID = (PurchaseOrderDocument)documentService.getByDocumentHeaderId(po.getDocumentNumber());
    return poWithID.getPurapDocumentIdentifier();
}
 
开发者ID:kuali,项目名称:kfs,代码行数:17,代码来源:CreditMemoDocumentRuleTest.java

示例14: testRouteDocument

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
@Test
public final void testRouteDocument()
throws Exception {
    BulkReceivingDocument doc = BulkReceivingDocumentFixture.SIMPLE_DOCUMENT.createBulkReceivingDocument();
    doc.prepareForSave();
    DocumentService documentService = SpringContext.getBean(DocumentService.class);
    routeDocument(doc, "routing bulk receiving document", documentService);
    WorkflowTestUtils.waitForDocumentApproval(doc.getDocumentNumber());
    Document document = documentService.getByDocumentHeaderId(doc.getDocumentNumber());
    assertTrue("Document should now be final.", doc.getDocumentHeader().getWorkflowDocument().isEnroute());
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:12,代码来源:BulkReceivingDocumentTest.java

示例15: getParentMaintDoc

import org.kuali.rice.krad.service.DocumentService; //导入方法依赖的package包/类
private FinancialSystemMaintenanceDocument getParentMaintDoc() {
    //  how I wish for the ability to directly access the parent object
    DocumentService documentService = SpringContext.getBean(DocumentService.class);
    FinancialSystemMaintenanceDocument maintDoc = null;
    try {
        maintDoc =(FinancialSystemMaintenanceDocument) documentService.getByDocumentHeaderId(getDocumentNumber());
    }
    catch (WorkflowException e) {
        throw new RuntimeException(e);
    }
    return maintDoc;
}
 
开发者ID:kuali,项目名称:kfs,代码行数:13,代码来源:CustomerMaintenableImpl.java


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