Package com.logicaldoc.stamp.automation
Class StampTool
java.lang.Object
com.logicaldoc.stamp.automation.StampTool
Class to apply stamps into documents from inside the Automation
- Since:
- 7.5.1
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetSignature(String username) Retrieves the Base64-encoded image representing the signature of the gien uservoidstamp(com.logicaldoc.core.document.Document doc, Stamp stamp, com.logicaldoc.core.security.user.User user) Applies a stamp in the given document in the name of the given uservoidstamp(com.logicaldoc.core.document.Document doc, String stampName, com.logicaldoc.core.security.user.User user) Applies a stamp in the given document in the name of the given uservoidApplies a stamp in the given document in the name of the given uservoidstamp(com.logicaldoc.core.document.Document doc, String stampName, Map<String, Object> parameters, com.logicaldoc.core.security.user.User user) Applies a stamp in the given document in the name of the given uservoidstamp(com.logicaldoc.core.document.Document doc, String stampName, Map<String, Object> parameters, String username) Applies a stamp in the given document in the name of the given user
- 
Constructor Details- 
StampToolpublic StampTool()
 
- 
- 
Method Details- 
stamppublic void stamp(com.logicaldoc.core.document.Document doc, Stamp stamp, com.logicaldoc.core.security.user.User user) throws com.logicaldoc.core.PersistenceException, FeatureNotEnabledException, IOException, com.logicaldoc.util.crypt.CryptUtil.EncryptionException, com.logicaldoc.core.automation.AutomationException Applies a stamp in the given document in the name of the given user- Parameters:
- doc- the document to stamp
- stamp- the stamp to apply (use stamp.parameters to pass your dynamic parameters to the stamp automation)
- user- the current user
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.util.crypt.CryptUtil.EncryptionException- Cannot decrypt the stamp image
- IOException- I/O error
- FeatureNotEnabledException- The feature is not enabled in the license
- com.logicaldoc.core.automation.AutomationException- the script has been evaluated but produced an error
 
- 
stamppublic void stamp(com.logicaldoc.core.document.Document doc, String stampName, Map<String, Object> parameters, com.logicaldoc.core.security.user.User user) throws com.logicaldoc.core.PersistenceException, FeatureNotEnabledException, IOException, com.logicaldoc.util.crypt.CryptUtil.EncryptionException, com.logicaldoc.core.automation.AutomationExceptionApplies a stamp in the given document in the name of the given user- Parameters:
- doc- the document to stamp
- stampName- name of the stamp to apply
- parameters- optional map of parameters to pass to the Stamp automation
- user- the current user
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.util.crypt.CryptUtil.EncryptionException- Cannot decrypt the stamp image
- IOException- I/O error
- FeatureNotEnabledException- The feature is not enabled in the license
- com.logicaldoc.core.automation.AutomationException- the script has been evaluated but produced an error
 
- 
stamppublic void stamp(com.logicaldoc.core.document.Document doc, String stampName, com.logicaldoc.core.security.user.User user) throws com.logicaldoc.core.PersistenceException, FeatureNotEnabledException, IOException, com.logicaldoc.util.crypt.CryptUtil.EncryptionException, com.logicaldoc.core.automation.AutomationException Applies a stamp in the given document in the name of the given user- Parameters:
- doc- the document to stamp
- stampName- name of the stamp to apply
- user- the current user
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.util.crypt.CryptUtil.EncryptionException- Cannot decrypt the stamp image
- IOException- I/O error
- FeatureNotEnabledException- The feature is not enabled in the license
- com.logicaldoc.core.automation.AutomationException- the script has been evaluated but produced an error
 
- 
stamppublic void stamp(com.logicaldoc.core.document.Document doc, String stampName, Map<String, Object> parameters, String username) throws com.logicaldoc.core.PersistenceException, FeatureNotEnabledException, IOException, com.logicaldoc.util.crypt.CryptUtil.EncryptionException, com.logicaldoc.core.automation.AutomationExceptionApplies a stamp in the given document in the name of the given user- Parameters:
- doc- the document to stamp
- stampName- name of the stamp to apply
- parameters- optional map of parameters to pass to the Stamp automation
- username- the username of the current user
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.util.crypt.CryptUtil.EncryptionException- Cannot decrypt the stamp image
- IOException- I/O error
- FeatureNotEnabledException- The feature is not enabled in the license
- com.logicaldoc.core.automation.AutomationException- the script has been evaluated but produced an error
 
- 
stamppublic void stamp(com.logicaldoc.core.document.Document doc, String stampName, String username) throws com.logicaldoc.core.PersistenceException, FeatureNotEnabledException, IOException, com.logicaldoc.util.crypt.CryptUtil.EncryptionException, com.logicaldoc.core.automation.AutomationException Applies a stamp in the given document in the name of the given user- Parameters:
- doc- the document to stamp
- stampName- name of the stamp to apply
- username- the username of the current user
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the data layer
- com.logicaldoc.util.crypt.CryptUtil.EncryptionException- Cannot decrypt the stamp image
- IOException- I/O error
- FeatureNotEnabledException- The feature is not enabled in the license
- com.logicaldoc.core.automation.AutomationException- the script has been evaluated but produced an error
 
- 
getSignatureRetrieves the Base64-encoded image representing the signature of the gien user- Parameters:
- username- The username of the user
- Returns:
- Base64-encoded image
- Throws:
- com.logicaldoc.core.PersistenceException- Error in the data layer
 
 
-