public abstract class BaseAttachmentHandler extends com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandler implements AttachmentHandler
| Constructor and Description |
|---|
BaseAttachmentHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(java.lang.String filepath,
java.lang.String aliasFileName,
java.lang.String attachmentClass)
Add a file to the return of the attachment handler
The result will be this file will be come an additional attachment on the primary.
|
void |
addFileMetaData(PropertyList propertyList,
Attachment attachment)
Will add one or many attributes to the provided attachment record.
|
void |
addLinkSDI(java.lang.String sdcid,
java.lang.String keyid1,
java.lang.String keyid2,
java.lang.String keyid3)
Add an sdi link which is a link from the primary executing the attachment handler to the sdi provided
(e.g.
|
void |
addMetaData(java.lang.String name,
java.lang.String value)
Will add an attribute to the primary record running the attachment handler (e.g.
|
java.lang.String |
getAtachmentHandlerId()
Returns the attachment handler keyid1
|
PropertyList |
getFileMetaData(Attachment attachment)
Returns the attributes for the provided attachment object
|
java.lang.String |
getHandlerId()
Returns the handler id
|
HandlerType |
getHandlerType()
Returns the HandlerType value of the enumeration
|
java.lang.String |
getHelperURL()
Returns the helper GUI
The helper URL will be opened in a dialog and must return JSON of set up properties.
|
java.lang.String |
getKeyId1()
Returns the keyid1 for the primary that the attachment handler is running on
|
java.lang.String |
getKeyId2()
Returns the keyid2 for the primary that the attachment handler is running on
|
java.lang.String |
getKeyId3()
Returns the keyid3 for the primary that the attachment handler is running on
|
SDILinks |
getLinkSDI()
Returns the collection of sdi links
|
PropertyList |
getMetaData()
Returns all the attributes for the primary (e.g.
|
com.labvantage.sapphire.modules.sdms.util.ResultDataGrid |
getResultGrid()
Will return the result grid from the collection of result grids
|
com.labvantage.sapphire.modules.sdms.util.ResultDataGrid |
getResultGrid(int resultgridindex)
Will return a result grid from the collection of result grids
|
int |
getResultResultGridCount()
Will return the number of result grids added into this attachment handler
|
java.lang.String |
getSDCId()
Returns the sdcid for the primary that the attachment handler is running on (e.g.
|
abstract void |
handleData(java.util.List<Attachment> attachments,
PropertyList properties)
Override this method to provide the entry point for your handler.
|
boolean |
isDatabaseRequired()
Returns true if the database object is required.
|
boolean |
isDebugMode()
Returns true if the handler is run in debug mode from a test button
Debug mode will output higher level of logging
|
void |
logMessage(java.lang.String message)
Will add a message to the log which will end up being stored in the operation execution.
|
void |
setActionBlock(ActionBlock actionBlock)
Set the action block of the attachment handler
|
void |
setResultGrid(com.labvantage.sapphire.modules.sdms.util.ResultDataGrid resultGrid)
Add a result grid object into the result grid collection.
|
addResultGrid, getExecutionId, logDebug, logError, logError, logWarn, setDebugModegetAccessorErrorIds, getAccessorErrorMsgs, getActionProcessor, getConfigurationProcessor, getConnectionid, getConnectionId, getConnectionProcessor, getDAMProcessor, getDepartmentList, getHttpProcessor, getQueryProcessor, getRakFile, getSDCProcessor, getSDIProcessor, getSequenceProcessor, getTranslationProcessor, setConnectionId, setLanguage, setRakFileclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddResultGridpublic boolean isDebugMode()
isDebugMode in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic java.lang.String getHelperURL()
getHelperURL in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic java.lang.String getSDCId()
getSDCId in interface AttachmentHandlergetSDCId in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic java.lang.String getKeyId1()
getKeyId1 in interface AttachmentHandlergetKeyId1 in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic java.lang.String getKeyId2()
getKeyId2 in interface AttachmentHandlergetKeyId2 in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic java.lang.String getKeyId3()
getKeyId3 in interface AttachmentHandlergetKeyId3 in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic java.lang.String getAtachmentHandlerId()
getAtachmentHandlerId in interface AttachmentHandlergetAtachmentHandlerId in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic void logMessage(java.lang.String message)
logMessage in interface AttachmentHandlerlogMessage in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlermessage - public void addFile(java.lang.String filepath,
java.lang.String aliasFileName,
java.lang.String attachmentClass)
addFile in interface AttachmentHandleraddFile in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerfilepath - aliasFileName - attachmentClass - public void setResultGrid(com.labvantage.sapphire.modules.sdms.util.ResultDataGrid resultGrid)
setResultGrid in interface AttachmentHandlersetResultGrid in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerresultGrid - The result grid object you have constructedpublic int getResultResultGridCount()
getResultResultGridCount in interface AttachmentHandlergetResultResultGridCount in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic com.labvantage.sapphire.modules.sdms.util.ResultDataGrid getResultGrid(int resultgridindex)
getResultGrid in interface AttachmentHandlergetResultGrid in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerresultgridindex - The index of the result grid in the collectionpublic com.labvantage.sapphire.modules.sdms.util.ResultDataGrid getResultGrid()
getResultGrid in interface AttachmentHandlergetResultGrid in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic void addMetaData(java.lang.String name,
java.lang.String value)
addMetaData in interface AttachmentHandleraddMetaData in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlername - value - public void addFileMetaData(PropertyList propertyList, Attachment attachment)
addFileMetaData in interface AttachmentHandleraddFileMetaData in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpropertyList - The attributes key value pairattachment - The attachment object to add the attributes to. This could be one of the attachments passed in.public void setActionBlock(ActionBlock actionBlock)
setActionBlock in interface AttachmentHandlersetActionBlock in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandleractionBlock - The action block objectpublic void addLinkSDI(java.lang.String sdcid,
java.lang.String keyid1,
java.lang.String keyid2,
java.lang.String keyid3)
addLinkSDI in interface AttachmentHandleraddLinkSDI in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlersdcid - The sdcid to link tokeyid1 - The keyid1 to link tokeyid2 - The keyid2 to link tokeyid3 - The keyid3 to link topublic boolean isDatabaseRequired()
isDatabaseRequired in interface AttachmentHandlerisDatabaseRequired in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic PropertyList getFileMetaData(Attachment attachment)
getFileMetaData in interface AttachmentHandlergetFileMetaData in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerattachment - The attachment object to return attributes frompublic SDILinks getLinkSDI()
getLinkSDI in interface AttachmentHandlergetLinkSDI in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic java.lang.String getHandlerId()
getHandlerId in interface AttachmentHandlergetHandlerId in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic PropertyList getMetaData()
getMetaData in interface AttachmentHandlergetMetaData in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerpublic abstract void handleData(java.util.List<Attachment> attachments, PropertyList properties) throws SapphireException
handleData in interface AttachmentHandlerhandleData in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandlerattachments - The collection of attachments to be processed that match the operation criteria (e.g. those with the correct class as defined in the operations)properties - The set up properties for the attachment handler as defined in the operationsSapphireExceptionpublic HandlerType getHandlerType()
getHandlerType in interface AttachmentHandlergetHandlerType in class com.labvantage.sapphire.modules.sdms.handlers.BaseAttachmentHandler