public class PersonSignatureServiceImpl extends Object implements PersonSignatureService
| Modifier and Type | Class and Description |
|---|---|
static class |
PersonSignatureServiceImpl.SignatureTypes
Configure signature type required
D - Always use Default signature
S - Always use signed in user signature, if not found use the default signature
N - No signature is required
|
| Constructor and Description |
|---|
PersonSignatureServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected ByteArrayOutputStream |
applyAutographInDocument(PersonSignature personSignature,
ByteArrayOutputStream originalByteArrayOutputStream)
This method is to apply signature in the document.
|
byte[] |
applySignature(String leadUnitNumber,
String administratorType,
String moduleNameSpace,
byte[] pdfBytes)
This method is to apply signature to the pdf document.
|
protected List<org.kuali.rice.kim.api.role.RoleMembership> |
getAdministrators() |
protected String |
getAdministratorType() |
protected PersonSignature |
getAdminSignature()
This method is to get the default administrator signature
|
protected BufferedImage |
getBufferedImage(byte[] imageData)
This method is to get buffered image from image data
|
protected BufferedImage |
getBufferedImage(org.apache.pdfbox.util.ImageParameters params,
byte[] imageData)
This method is to get buffered image based on predefined parameters
|
org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService() |
protected ByteArrayOutputStream |
getFlattenedPdfForm(byte[] pdfBytes)
This method is to remove interactive fields from the form.
|
protected String |
getLeadUnitNumber() |
protected PersonSignature |
getLoggedinPersonSignature(String personId)
This method is to get logged in person signature
|
String |
getModuleNameSpace() |
org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService() |
PersonSignatureDao |
getPersonSignatureDao() |
org.kuali.rice.kim.api.role.RoleService |
getRoleService() |
protected Collection<String> |
getSignatureTagParameter() |
protected String |
getSignatureTypeParameter() |
protected ByteArrayOutputStream |
identifyModeAndApplySignature(ByteArrayOutputStream originalByteArrayOutputStream)
This method is to identify signature mode and invoke appropriate method
If signature is not available, return the original.
|
protected ByteArrayOutputStream |
printDefaultSignature(ByteArrayOutputStream originalByteArrayOutputStream)
This method is to print default module administrator signature.
|
protected ByteArrayOutputStream |
printLoggedInUserSignature(String personId,
ByteArrayOutputStream originalByteArrayOutputStream)
This method is to print logged in user signature.
|
protected ByteArrayOutputStream |
scanAndApplyAutographInEachPage(byte[] imageData,
ByteArrayOutputStream originalByteArrayOutputStream)
This method is to scan for signature tag in each page and apply the signature
at desired location.
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
void |
setPersonSignatureDao(PersonSignatureDao personSignatureDao) |
void |
setRoleService(org.kuali.rice.kim.api.role.RoleService roleService) |
public byte[] applySignature(String leadUnitNumber, String administratorType, String moduleNameSpace, byte[] pdfBytes) throws Exception
PersonSignatureServiceapplySignature in interface PersonSignatureServiceExceptionorg.kuali.kra.printing.service.PersonSignatureService#applySignature(java.lang.String, java.lang.String, byte[])protected ByteArrayOutputStream getFlattenedPdfForm(byte[] pdfBytes) throws Exception
pdfBytes - Exceptionprotected ByteArrayOutputStream identifyModeAndApplySignature(ByteArrayOutputStream originalByteArrayOutputStream) throws Exception
originalByteArrayOutputStream - Exceptionprotected ByteArrayOutputStream printDefaultSignature(ByteArrayOutputStream originalByteArrayOutputStream) throws Exception
originalByteArrayOutputStream - Exceptionprotected ByteArrayOutputStream printLoggedInUserSignature(String personId, ByteArrayOutputStream originalByteArrayOutputStream) throws Exception
personId - originalByteArrayOutputStream - Exceptionprotected ByteArrayOutputStream applyAutographInDocument(PersonSignature personSignature, ByteArrayOutputStream originalByteArrayOutputStream)
personSignature - originalByteArrayOutputStream - protected ByteArrayOutputStream scanAndApplyAutographInEachPage(byte[] imageData, ByteArrayOutputStream originalByteArrayOutputStream) throws Exception
imageData - originalByteArrayOutputStream - Exceptionprotected BufferedImage getBufferedImage(org.apache.pdfbox.util.ImageParameters params, byte[] imageData)
params - imageData - protected BufferedImage getBufferedImage(byte[] imageData) throws Exception
imageData - Exceptionprotected PersonSignature getAdminSignature()
protected PersonSignature getLoggedinPersonSignature(String personId)
personId - protected List<org.kuali.rice.kim.api.role.RoleMembership> getAdministrators()
protected String getSignatureTypeParameter()
protected Collection<String> getSignatureTagParameter()
public org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
public org.kuali.rice.kim.api.role.RoleService getRoleService()
public void setRoleService(org.kuali.rice.kim.api.role.RoleService roleService)
public PersonSignatureDao getPersonSignatureDao()
public void setPersonSignatureDao(PersonSignatureDao personSignatureDao)
public org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
protected String getLeadUnitNumber()
protected String getAdministratorType()
public String getModuleNameSpace()
Copyright © 2013 The Kuali Foundation. All Rights Reserved.