本文整理汇总了Java中org.kuali.rice.krad.util.NoteType类的典型用法代码示例。如果您正苦于以下问题:Java NoteType类的具体用法?Java NoteType怎么用?Java NoteType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NoteType类属于org.kuali.rice.krad.util包,在下文中一共展示了NoteType类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: disapproveDocument
import org.kuali.rice.krad.util.NoteType; //导入依赖的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
示例2: loadNotes
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* Loads the Notes for the note target on this Document.
*
* @param document the document for which to load the notes
*/
protected void loadNotes(final Document document) {
if (isNoteTargetReady(document)) {
Object legacyObjectClass;
if (document instanceof MaintenanceDocument) {
MaintenanceDocument mdoc = (MaintenanceDocument) document;
legacyObjectClass = ((Maintainable) org.apache.commons.lang.ObjectUtils.defaultIfNull(mdoc.getOldMaintainableObject(), mdoc.getNewMaintainableObject())).getDataObjectClass();
} else {
legacyObjectClass = document.getClass();
}
List<Note> notes = new ArrayList<Note>();
if (StringUtils.isNotBlank(document.getNoteTarget().getObjectId())) {
notes.addAll(getNoteService().getByRemoteObjectId(document.getNoteTarget().getObjectId()));
}
//notes created on 'disapprove' are linked to Doc Header, so this checks that even if notetype = BO
if (document.getNoteType().equals(NoteType.BUSINESS_OBJECT) && document.getDocumentHeader()
.getWorkflowDocument().isDisapproved()) {
notes.addAll(getNoteService().getByRemoteObjectId(document.getDocumentHeader().getObjectId()));
}
document.setNotes(notes);
}
}
开发者ID:kuali,项目名称:kc-rice,代码行数:29,代码来源:DocumentServiceImpl.java
示例3: getLicenseRequestDocNum
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* This method gets the licenseRequest document number for the corresponding requisition document
*
* @return licenseRequestDocNum
* @see org.kuali.ole.module.purap.document.PurchasingAccountsPayableDocument#getLicenseRequestDocnum()
*/
/* @Override
public String getLicenseRequestDocNum(){
String licenseRequestDocNum = "";
*//*OleWebServiceProvider oleWebServiceProvider = (OleWebServiceProvider) GlobalResourceLoader.getService(OLEConstants.OLE_WEB_SERVICE_PROVIDER);
OleLicenseRequestWebService oleLicenseRequestWebService =
(OleLicenseRequestWebService) oleWebServiceProvider.
getService("org.kuali.ole.select.document.service.OleLicenseRequestWebService", "oleLicenseRequestWebService", getOleUrlResolver().getLicenseURL());
String reqDocNum = "";
if(this instanceof LineItemReceivingDocument) {
reqDocNum = this.getDocumentNumber();
}
else if (this instanceof CorrectionReceivingDocument) {
}
licenseRequestDocNum = oleLicenseRequestWebService.getLicenseRequestDocNumber(reqDocNum); *//*
return licenseRequestDocNum;
}*/
@Override
public NoteType getNoteType() {
return NoteType.BUSINESS_OBJECT;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:28,代码来源:ReceivingDocumentBase.java
示例4: getRelatedDocumentNotes
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* Gets the relatedDocumentNotes attribute.
*
* @return Returns the relatedDocumentNotes.
*/
@Override
public Map<String, List<Note>> getRelatedDocumentNotes() {
if (relatedDocumentNotes == null) {
relatedDocumentNotes = new HashMap<String, List<Note>>();
for (List<Document> documents : relatedDocuments.values()) {
for (Document document : documents) {
//retrieve by object Id base on document's usage with BoNotesSupport
List<Note> remoteNotes = SpringContext.getBean(NoteService.class).getByRemoteObjectId(
document.getNoteType() == NoteType.BUSINESS_OBJECT? document.getObjectId() : document.getDocumentHeader().getObjectId());
Collections.reverse(remoteNotes);
relatedDocumentNotes.put(document.getDocumentNumber(), remoteNotes);
}
}
}
return relatedDocumentNotes;
}
开发者ID:kuali,项目名称:kfs,代码行数:23,代码来源:TravelFormBase.java
示例5: loadNotes
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* Loads the Notes for the note target on this Document.
*
* @param document the document for which to load the notes
*/
protected void loadNotes(Document document) {
if (isNoteTargetReady(document)) {
List<Note> notes = new ArrayList<Note>();
if (StringUtils.isNotBlank(document.getNoteTarget().getObjectId())) {
notes.addAll(getNoteService().getByRemoteObjectId(document.getNoteTarget().getObjectId()));
}
//notes created on 'disapprove' are linked to Doc Header, so this checks that even if notetype = BO
if (document.getNoteType().equals(NoteType.BUSINESS_OBJECT)
&& document.getDocumentHeader().getWorkflowDocument().isDisapproved()) {
notes.addAll(getNoteService().getByRemoteObjectId(document.getDocumentHeader().getObjectId()));
}
// KULRNE-5692 - force a refresh of the attachments
// they are not (non-updateable) references and don't seem to update properly upon load
for (Note note : notes) {
note.refreshReferenceObject("attachment");
}
document.setNotes(notes);
}
}
开发者ID:aapotts,项目名称:kuali_rice,代码行数:26,代码来源:DocumentServiceImpl.java
示例6: testNoteSave_LargePersonId
import org.kuali.rice.krad.util.NoteType; //导入依赖的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
示例7: saveNewNote
import org.kuali.rice.krad.util.NoteType; //导入依赖的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
示例8: getNotes
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.document.Document#getNotes()
*/
@Override
public List<Note> getNotes() {
if (CollectionUtils.isEmpty(notes) && getNoteType().equals(NoteType.BUSINESS_OBJECT) && StringUtils.isNotBlank(
getNoteTarget().getObjectId())) {
notes = getNoteService().getByRemoteObjectId(getNoteTarget().getObjectId());
}
return notes;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:DocumentBase.java
示例9: getNotes
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.document.Document#getNotes()
*/
@Override
public List<Note> getNotes() {
if (CollectionUtils.isEmpty(notes) && getNoteType().equals(NoteType.BUSINESS_OBJECT) && StringUtils.isNotBlank(
getNoteTarget().getObjectId())) {
notes = Lists.newArrayList(getNoteService().getByRemoteObjectId(getNoteTarget().getObjectId()));
}
return notes;
}
开发者ID:kuali,项目名称:rice,代码行数:13,代码来源:DocumentBase.java
示例10: deleteBONote
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* delete a note from the document
*
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
* @throws Exception
*/
public ActionForward deleteBONote(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
KualiDocumentFormBase kualiDocumentFormBase = (KualiDocumentFormBase) form;
Document document = kualiDocumentFormBase.getDocument();
// DataDictionary dataDictionary = getDataDictionaryService().getDataDictionary();
// DocumentEntry entry = dataDictionary.getDocumentEntry(document.getClass().getName());
// check authorization for adding notes
//DocumentActionFlags flags = getDocumentActionFlags(document);
//if (!kualiDocumentFormBase.getDocumentActions().containsKey(KRADConstants.KUALI_ACTION_CAN_ANNOTATE)) {
// buildAuthorizationException("annotate", document);
// return mapping.findForward(RiceConstants.MAPPING_BASIC);
//}
// ok to delete the note/attachment
// derive the note property from the newNote on the form
Note newNote = kualiDocumentFormBase.getNewNote();
Note note = document.getNote(getLineToDelete(request));
Attachment attachment = note.getAttachment();
String attachmentTypeCode = null;
if (attachment != null) {
attachmentTypeCode = attachment.getAttachmentTypeCode();
}
String authorUniversalIdentifier = note.getAuthorUniversalIdentifier();
if (!WebUtils.canDeleteNoteAttachment(document, attachmentTypeCode, authorUniversalIdentifier)) {
throw buildAuthorizationException("annotate", document);
}
if (attachment != null) { // only do this if the note has been persisted
//KFSMI-798 - refresh() changed to refreshNonUpdateableReferences()
//All references for the business object Attachment are auto-update="none",
//so refreshNonUpdateableReferences() should work the same as refresh()
if (note.getNoteIdentifier() != null) { // KULRICE-2343 don't blow away note reference if the note wasn't persisted
attachment.refreshNonUpdateableReferences();
}
getAttachmentService().deleteAttachmentContents(attachment);
}
// Removed the if check so it no longer checks if the document is initiated before deleting the BO's note per KULRICE- 12327
getNoteService().deleteNote(note);
document.removeNote(note);
if(!document.getDocumentHeader().getWorkflowDocument().isInitiated() && document instanceof MaintenanceDocument && NoteType.BUSINESS_OBJECT.getCode().equals(note.getNoteTypeCode())) {
// If this is a maintenance document and we're deleting a BO note then try to save the document so the note is removed from the content
getDocumentService().saveDocument(document);
}
return mapping.findForward(RiceConstants.MAPPING_BASIC);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:59,代码来源:KualiDocumentActionBase.java
示例11: getNoteType
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
public NoteType getNoteType() {
return null;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:AgendaEditorMaintenanceDocumentDummy.java
示例12: getNoteType
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
@Override
public NoteType getNoteType() {
return NoteType.BUSINESS_OBJECT;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:5,代码来源:PurchasingAccountsPayableDocumentBase.java
示例13: getNoteType
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
public NoteType getNoteType() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
开发者ID:aapotts,项目名称:kuali_rice,代码行数:4,代码来源:AgendaEditorMaintenanceDocumentDummy.java
示例14: getNoteType
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* The {@link NoteType} for maintenance documents is determined by whether or not the underlying {@link
* Maintainable} supports business object notes or not. This is determined via a call to {@link
* Maintainable#isNotesEnabled()}. The {@link NoteType} is then derived as follows: <p/> <ul> <li>If the
* {@link
* Maintainable} supports business object notes, return {@link NoteType#BUSINESS_OBJECT}. <li>Otherwise, delegate
* to
* {@link DocumentBase#getNoteType()} </ul>
*
* @see org.kuali.rice.krad.document.Document#getNoteType()
* @see org.kuali.rice.krad.document.Document#getNoteTarget()
*/
@Override
public NoteType getNoteType() {
if (getNewMaintainableObject().isNotesEnabled()) {
return NoteType.BUSINESS_OBJECT;
}
return super.getNoteType();
}
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:MaintenanceDocumentBase.java
示例15: getNoteType
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* The {@link org.kuali.rice.krad.util.NoteType} for maintenance documents is determined by whether or not the underlying {@link
* Maintainable} supports business object notes or not. This is determined via a call to {@link
* Maintainable# isBoNotesEnabled()}. The {@link org.kuali.rice.krad.util.NoteType} is then derived as follows: <p/> <ul> <li>If the
* {@link
* Maintainable} supports business object notes, return {@link org.kuali.rice.krad.util.NoteType#BUSINESS_OBJECT}. <li>Otherwise, delegate
* to
* {@link org.kuali.rice.krad.document.DocumentBase#getNoteType()} </ul>
*
* @see org.kuali.rice.krad.document.Document#getNoteType()
* @see org.kuali.rice.krad.document.Document#getNoteTarget()
*/
@Override
public NoteType getNoteType() {
if (getNewMaintainableObject().isNotesEnabled()) {
return NoteType.BUSINESS_OBJECT;
}
return super.getNoteType();
}
开发者ID:ewestfal,项目名称:rice-xml-converter,代码行数:20,代码来源:MaintenanceDocumentBase.java
示例16: getNoteType
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* The {@link NoteType} for maintenance documents is determined by whether or not the underlying {@link
* Maintainable} supports business object notes or not. This is determined via a call to {@link
* Maintainable# isBoNotesEnabled()}. The {@link NoteType} is then derived as follows: <p/> <ul> <li>If the
* {@link
* Maintainable} supports business object notes, return {@link NoteType#BUSINESS_OBJECT}. <li>Otherwise, delegate
* to
* {@link DocumentBase#getNoteType()} </ul>
*
* @see org.kuali.rice.krad.document.Document#getNoteType()
* @see org.kuali.rice.krad.document.Document#getNoteTarget()
*/
@Override
public NoteType getNoteType() {
if (getNewMaintainableObject().isNotesEnabled()) {
return NoteType.BUSINESS_OBJECT;
}
return super.getNoteType();
}
开发者ID:aapotts,项目名称:kuali_rice,代码行数:20,代码来源:MaintenanceDocumentBase.java
示例17: getNoteType
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* Returns the note type which should be used for notes associated with this document.
* This method should never return null.
*
* @return the note type supported by this document, this value should never be null
*/
NoteType getNoteType();
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:Document.java
示例18: getNoteType
import org.kuali.rice.krad.util.NoteType; //导入依赖的package包/类
/**
* Returns the {@link NoteType} to use for notes associated with this document.
* By default this returns {@link NoteType#DOCUMENT_HEADER} since notes are
* associated with the {@link DocumentHeader} record by default.
*
* <p>The case in which this should be overridden is if {@link #getNoteTarget()} is
* overridden to return an object other than the DocumentHeader.
*
* @return the note type to use for notes associated with this document
* @see org.kuali.rice.krad.document.Document#getNoteType()
*/
@Override
public NoteType getNoteType() {
return NoteType.DOCUMENT_HEADER;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:DocumentBase.java
注:本文中的org.kuali.rice.krad.util.NoteType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论