public abstract class NotesAttachmentsHelperBase extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
NotesAttachmentsHelperBase(ProtocolFormBase form,
ProtocolAttachmentService notesService,
TaskAuthorizationService authService,
KraAuthorizationService kraAuthorizationService,
org.kuali.rice.core.api.datetime.DateTimeService dateTimeService,
ProtocolNotepadService protocolNotepadService,
org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService,
ProtocolAttachmentVersioningUtilityBase versioningUtil)
Constructs a helper.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNewNote()
adds a new note to the protocol.
|
void |
addNewProtocolAttachmentFilter() |
void |
addNewProtocolAttachmentProtocol()
Adds the "new" ProtocolAttachmentProtocolBase to the ProtocolBase Document.
|
abstract boolean |
canAddProtocolNotepads()
Checks if ProtocolBase Notepads can be modified.
|
abstract boolean |
canEditProtocolAttachments()
Checks if ProtocolBase Attachments can be modified.
|
abstract boolean |
canViewRestrictedProtocolNotepads()
Checks if restricted ProtocolBase Notepads can be viewed.
|
protected abstract ProtocolAttachmentFilterBase |
createNewProtocolAttachmentFilterInstanceHook() |
protected abstract ProtocolAttachmentPersonnelBase |
createNewProtocolAttachmentPersonnelInstanceHook(ProtocolBase protocol) |
protected abstract ProtocolAttachmentProtocolBase |
createNewProtocolAttachmentProtocolInstanceHook(ProtocolBase protocol) |
protected abstract ProtocolNotepadBase |
createNewProtocolNotepadInstanceHook(ProtocolBase protocol) |
<T extends ProtocolAttachmentBase> |
deleteExistingAttachmentByType(int attachmentNumber,
Class<T> type)
Deletes an attachment from a protocol based on a type.
|
boolean |
deleteNote(int noteToDelete)
deletes a note from the protocol.
|
void |
fixReloadedAttachments(Map parameterMap)
This method...
|
abstract AddProtocolAttachmentProtocolRule |
getAddProtocolAttachmentProtocolRuleInstanceHook() |
protected abstract String |
getAttachmentDefaultSortKeyHook() |
List<AttachmentFile> |
getFilesToDelete() |
ProtocolAttachmentFilterBase |
getNewAttachmentFilter() |
ProtocolAttachmentPersonnelBase |
getNewAttachmentPersonnel()
Gets the new attachment personnel.
|
ProtocolAttachmentProtocolBase |
getNewAttachmentProtocol()
Gets the new attachment protocol.
|
ProtocolNotepadBase |
getNewProtocolNotepad()
Gets the new protocol notepad.
|
ProtocolBase |
getProtocol()
Get the ProtocolBase.
|
abstract Class<? extends ProtocolAttachmentPersonnelBase> |
getProtocolAttachmentPersonnelClassHook() |
abstract Class<? extends ProtocolAttachmentProtocolBase> |
getProtocolAttachmentProtocolClassHook() |
abstract Class<? extends ProtocolDocumentBase> |
getProtocolDocumentClassHook() |
abstract Class<? extends ProtocolNotepadBase> |
getProtocolNotepadClassHook() |
protected String |
getUserIdentifier()
Get the userName of the user for the current session.
|
boolean |
isManageNotesOpen() |
boolean |
isModifyAttachments()
returns whether a protocol can be modified.
|
boolean |
isModifyNotepads()
returns whether a protocol can be modified.
|
abstract boolean |
isProtocolAdmin() |
boolean |
isViewRestricted()
returns whether a restricted note can be viewed.
|
void |
modifyNote(int noteToModify)
modifies an existing note in the protocol.
|
void |
prepareView()
Prepare the tab for viewing.
|
void |
processSave()
this method handles logic related to saving attachments.
|
<T extends ProtocolAttachmentBase> |
retrieveConfirmMethodByType(Class<T> type)
Retrieves the confirmation method based on a type.
|
<T extends ProtocolAttachmentBase> |
retrieveExistingAttachmentByType(int attachmentNumber,
Class<T> type)
retrieves an attachment from a protocol based on a type.
|
void |
setFilesToDelete(List<AttachmentFile> filesToDelete) |
void |
setManageNotesOpen(boolean manageNotesOpen) |
void |
setModifyAttachments(boolean modifyAttachments)
sets whether a protocol can be modified.
|
void |
setModifyNotepads(boolean modifyNotepads)
sets whether a protocol can be modified.
|
void |
setNewAttachmentFilter(ProtocolAttachmentFilterBase newAttachmentFilter) |
void |
setNewAttachmentPersonnel(ProtocolAttachmentPersonnelBase newAttachmentPersonnel)
Sets the new attachment personnel.
|
void |
setNewAttachmentProtocol(ProtocolAttachmentProtocolBase newAttachmentProtocol)
Sets the new attachment protocol.
|
void |
setNewProtocolNotepad(ProtocolNotepadBase protocolNotepad)
Sets the new protocol notepad.
|
void |
setViewRestricted(boolean viewRestricted)
sets whether a restricted note can be viewed.
|
protected static final String NAMESPACE
protected static final String UNSUPPORTED_ATTACHMENT_TYPE
protected static final String CONFIRM_YES_DELETE_ATTACHMENT_PERSONNEL
protected static final String CONFIRM_YES_DELETE_ATTACHMENT_PROTOCOL
protected static final String CONFIRM_YES_DELETE_NOTE
protected final ProtocolAttachmentService notesService
protected final TaskAuthorizationService authService
protected final KraAuthorizationService kraAuthorizationService
protected final org.kuali.rice.core.api.datetime.DateTimeService dateTimeService
protected final ProtocolNotepadService protocolNotepadService
protected final org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService
protected final ProtocolAttachmentVersioningUtilityBase versioningUtil
protected final ProtocolFormBase form
protected ProtocolAttachmentProtocolBase newAttachmentProtocol
protected ProtocolAttachmentPersonnelBase newAttachmentPersonnel
protected ProtocolAttachmentFilterBase newAttachmentFilter
protected List<AttachmentFile> FilesToDelete
protected ProtocolNotepadBase protocolNotepad
protected boolean modifyAttachments
protected boolean modifyNotepads
protected boolean viewRestricted
protected boolean manageNotesOpen
protected NotesAttachmentsHelperBase(ProtocolFormBase form, ProtocolAttachmentService notesService, TaskAuthorizationService authService, KraAuthorizationService kraAuthorizationService, org.kuali.rice.core.api.datetime.DateTimeService dateTimeService, ProtocolNotepadService protocolNotepadService, org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService, ProtocolAttachmentVersioningUtilityBase versioningUtil)
form - the formnotesService - the notesServiceauthService - the authServiceversioningUtil - the versioning utilIllegalArgumentException - if the form, notesService, authService, or versioningUtil is nullpublic void prepareView()
public abstract boolean canEditProtocolAttachments()
protected String getUserIdentifier()
public ProtocolBase getProtocol()
IllegalArgumentException - if the ProtocolDocumentBase
or ProtocolBase is null.public ProtocolAttachmentProtocolBase getNewAttachmentProtocol()
public void setNewAttachmentProtocol(ProtocolAttachmentProtocolBase newAttachmentProtocol)
newAttachmentProtocol - the new attachment protocolpublic ProtocolAttachmentPersonnelBase getNewAttachmentPersonnel()
public void setNewAttachmentPersonnel(ProtocolAttachmentPersonnelBase newAttachmentPersonnel)
newAttachmentPersonnel - the new attachment personnelpublic boolean isModifyAttachments()
public void setModifyAttachments(boolean modifyAttachments)
modifyAttachments - true if modification is allowed false if not.public void processSave()
public void fixReloadedAttachments(Map parameterMap)
parameterMap - public void addNewProtocolAttachmentProtocol()
public abstract AddProtocolAttachmentProtocolRule getAddProtocolAttachmentProtocolRuleInstanceHook()
public <T extends ProtocolAttachmentBase> boolean deleteExistingAttachmentByType(int attachmentNumber, Class<T> type)
T - the type parameterattachmentNumber - the attachment numbertype - the type tokenIllegalArgumentException - if the type is null or not recognizedpublic <T extends ProtocolAttachmentBase> T retrieveExistingAttachmentByType(int attachmentNumber, Class<T> type)
T - the type parameterattachmentNumber - the attachment numbertype - the type tokenIllegalArgumentException - if the type is null or not recognizedpublic <T extends ProtocolAttachmentBase> String retrieveConfirmMethodByType(Class<T> type)
T - the type parametertype - the type tokenIllegalArgumentException - if the type is null or not recognizedprotected abstract ProtocolAttachmentProtocolBase createNewProtocolAttachmentProtocolInstanceHook(ProtocolBase protocol)
protected abstract ProtocolAttachmentPersonnelBase createNewProtocolAttachmentPersonnelInstanceHook(ProtocolBase protocol)
protected abstract ProtocolAttachmentFilterBase createNewProtocolAttachmentFilterInstanceHook()
protected abstract String getAttachmentDefaultSortKeyHook()
public List<AttachmentFile> getFilesToDelete()
public void setFilesToDelete(List<AttachmentFile> filesToDelete)
public abstract boolean canAddProtocolNotepads()
public abstract boolean canViewRestrictedProtocolNotepads()
public ProtocolNotepadBase getNewProtocolNotepad()
public void setNewProtocolNotepad(ProtocolNotepadBase protocolNotepad)
protocolNotepad - the new protocol notepadpublic boolean isModifyNotepads()
public void setModifyNotepads(boolean modifyNotepads)
modifyNotepads - true if modification is allowed false if not.public boolean isViewRestricted()
public void setViewRestricted(boolean viewRestricted)
viewRestricted - true if viewing is allowed false if not.public abstract boolean isProtocolAdmin()
public void addNewNote()
public void modifyNote(int noteToModify)
public boolean deleteNote(int noteToDelete)
public void setManageNotesOpen(boolean manageNotesOpen)
public boolean isManageNotesOpen()
public ProtocolAttachmentFilterBase getNewAttachmentFilter()
public void setNewAttachmentFilter(ProtocolAttachmentFilterBase newAttachmentFilter)
public void addNewProtocolAttachmentFilter()
public abstract Class<? extends ProtocolAttachmentProtocolBase> getProtocolAttachmentProtocolClassHook()
public abstract Class<? extends ProtocolAttachmentPersonnelBase> getProtocolAttachmentPersonnelClassHook()
public abstract Class<? extends ProtocolNotepadBase> getProtocolNotepadClassHook()
public abstract Class<? extends ProtocolDocumentBase> getProtocolDocumentClassHook()
protected abstract ProtocolNotepadBase createNewProtocolNotepadInstanceHook(ProtocolBase protocol)
Copyright © 2013 The Kuali Foundation. All Rights Reserved.