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


Java Note.setRemoteObjectIdentifier方法代码示例

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


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

示例1: createNote

import org.kuali.rice.krad.bo.Note; //导入方法依赖的package包/类
/**
    * TODO this method seems awfully out of place in this service
    *
    */
   @Override
public Note createNote(Note noteToCopy, GloballyUnique bo, String authorPrincipalId) {
   	validateNoteNotNull(noteToCopy);
   	if (bo == null) {
   		throw new IllegalArgumentException("The bo must not be null.");
   	}
   	if (StringUtils.isBlank(authorPrincipalId)) {
   		throw new IllegalArgumentException("The authorPrincipalId must not be null.");
   	}

       Note tmpNote = new CopiedObject<Note>(noteToCopy).getContent();
       tmpNote.setRemoteObjectIdentifier(bo.getObjectId());
       tmpNote.setAuthorUniversalIdentifier(authorPrincipalId);

       return tmpNote;
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:NoteServiceImpl.java

示例2: disapproveDocument

import org.kuali.rice.krad.bo.Note; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.DocumentService#disapproveDocument(org.kuali.rice.krad.document.Document,
 *      java.lang.String)
 */
@Override
public Document disapproveDocument(Document document, String annotation) throws Exception {
    checkForNulls(document);

    Note note = createNoteFromDocument(document, annotation);
    //if note type is BO, override and link disapprove notes to Doc Header
    if (document.getNoteType().equals(NoteType.BUSINESS_OBJECT)) {
        note.setNoteTypeCode(NoteType.DOCUMENT_HEADER.getCode());
        note.setRemoteObjectIdentifier(document.getDocumentHeader().getObjectId());
    }
    document.addNote(note);

    //SAVE THE NOTE
    //Note: This save logic is replicated here and in KualiDocumentAction, when to save (based on doc state) should be moved
    //      into a doc service method
    getNoteService().save(note);

    prepareWorkflowDocument(document);
    getWorkflowDocumentService().disapprove(document.getDocumentHeader().getWorkflowDocument(), annotation);
    UserSessionUtils.addWorkflowDocument(GlobalVariables.getUserSession(),
            document.getDocumentHeader().getWorkflowDocument());
    removeAdHocPersonsAndWorkgroups(document);
    return document;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:DocumentServiceImpl.java

示例3: testNoteSave_LargePersonId

import org.kuali.rice.krad.bo.Note; //导入方法依赖的package包/类
/**
 * tests saving notes
 * 
 * @throws Exception
 */
@Test public void testNoteSave_LargePersonId() throws Exception {
    Note note = new Note();
    note.setAuthorUniversalIdentifier("superLongNameUsersFromWorkflow");
    note.setNotePostedTimestamp(CoreApiServiceLocator.getDateTimeService().getCurrentTimestamp());
    note.setNoteText("i like notes");
    note.setRemoteObjectIdentifier("1209348109834u");
    note.setNoteTypeCode(NoteType.BUSINESS_OBJECT.getCode());
    try {
        KRADServiceLocator.getNoteService().save(note);
    } catch (Exception e) {
        fail("Saving a note should not fail");
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:NoteServiceTest.java

示例4: setNewNoteProperties

import org.kuali.rice.krad.bo.Note; //导入方法依赖的package包/类
/**
 * Defaults properties (posted timestamp, object id, author) on the note instance that will be added.
 *
 * @param form form instance containing the add note instance
 * @param document document instance the note will be added to
 * @param newNote note instance to set properties on
 */
protected void setNewNoteProperties(DocumentFormBase form, Document document, Note newNote) {
    newNote.setNotePostedTimestampToCurrent();
    newNote.setRemoteObjectIdentifier(document.getNoteTarget().getObjectId());

    Person kualiUser = GlobalVariables.getUserSession().getPerson();
    if (kualiUser == null) {
        throw new IllegalStateException("Current UserSession has a null Person.");
    }

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

示例5: linkNoteRemoteObjectId

import org.kuali.rice.krad.bo.Note; //导入方法依赖的package包/类
private void linkNoteRemoteObjectId(Note note, GloballyUnique noteTarget) {
    String objectId = noteTarget.getObjectId();
    if (StringUtils.isBlank(objectId)) {
        throw new IllegalStateException(
                "Attempted to link a Note with a PersistableBusinessObject with no object id");
    }
    note.setRemoteObjectIdentifier(noteTarget.getObjectId());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:9,代码来源:DocumentServiceImpl.java

示例6: addRejectReasonsToNote

import org.kuali.rice.krad.bo.Note; //导入方法依赖的package包/类
protected void addRejectReasonsToNote(String rejectReasons, ElectronicInvoiceRejectDocument eInvoiceRejectDocument){

        try {
            Note note = SpringContext.getBean(DocumentService.class).createNoteFromDocument(eInvoiceRejectDocument, rejectReasons);
            // KFSCNTRB-1369: Can't add note without remoteObjectIdentifier
            note.setRemoteObjectIdentifier(eInvoiceRejectDocument.getDocumentHeader().getObjectId());
            PersistableBusinessObject noteParent = eInvoiceRejectDocument.getNoteTarget();
            SpringContext.getBean(NoteService.class).save(note);
        }catch (Exception e) {
            LOG.error("Error creating reject reason note - " + e.getMessage());
        }
    }
 
开发者ID:kuali,项目名称:kfs,代码行数:13,代码来源:ElectronicInvoiceHelperServiceImpl.java

示例7: migrateNotes

import org.kuali.rice.krad.bo.Note; //导入方法依赖的package包/类
/**
 * Migrates any notes associated with the given document header to the given business object
 * @param documentHeader the document header to migrate notes for
 * @param businessObject the business object to migrate notes to
 */
protected void migrateNotes(DocumentHeader documentHeader, PersistableBusinessObject businessObject) {
    final List<Note> notes = getNoteService().getByRemoteObjectId(documentHeader.getObjectId());
    if (!CollectionUtils.isEmpty(notes)) {
        for (Note note: notes) {
            note.setRemoteObjectIdentifier(businessObject.getObjectId());
            getNoteService().save(note);
        }
    }
}
 
开发者ID:kuali,项目名称:kfs,代码行数:15,代码来源:MaintenanceDocumentNotesMigrationServiceImpl.java

示例8: createNote

import org.kuali.rice.krad.bo.Note; //导入方法依赖的package包/类
private Note createNote(String noteText, String noteTarget, String principalId) {
    Note note = new Note();
    note.setRemoteObjectIdentifier(noteTarget);
    note.setNoteText(StringUtils.abbreviate(noteText,800));
    note.setAuthorUniversalIdentifier(principalId);
    note.setNotePostedTimestampToCurrent();
    return note;
}
 
开发者ID:kuali-mirror,项目名称:kpme,代码行数:9,代码来源:PositionMaintainableServiceImpl.java


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