Class StampTool


  • public class StampTool
    extends Object
    Class to apply stamps into documents from inside the Automation
    Since:
    7.5.1
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Summary

      Constructors 
      Constructor Description
      StampTool()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getSignature​(String username)
      Retrieves the Base64-encoded image representing the signature of the gien user
      void stamp​(com.logicaldoc.core.document.Document doc, Stamp stamp, com.logicaldoc.core.security.User user)
      Applies a stamp in the given document in the name of the given user
      void stamp​(com.logicaldoc.core.document.Document doc, String stampName, com.logicaldoc.core.security.User user)
      Applies a stamp in the given document in the name of the given user
      void stamp​(com.logicaldoc.core.document.Document doc, String stampName, String username)
      Applies a stamp in the given document in the name of the given user
      void stamp​(com.logicaldoc.core.document.Document doc, String stampName, Map<String,​Object> parameters, com.logicaldoc.core.security.User user)
      Applies a stamp in the given document in the name of the given user
      void stamp​(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 Detail

      • StampTool

        public StampTool()
    • Method Detail

      • stamp

        public void stamp​(com.logicaldoc.core.document.Document doc,
                          Stamp stamp,
                          com.logicaldoc.core.security.User user)
                   throws Exception
        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:
        Exception - a generic error
      • stamp

        public void stamp​(com.logicaldoc.core.document.Document doc,
                          String stampName,
                          Map<String,​Object> parameters,
                          com.logicaldoc.core.security.User user)
                   throws Exception
        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
        parameters - optional map of parameters to pass to the Stamp automation
        Throws:
        Exception - a generic error
      • stamp

        public void stamp​(com.logicaldoc.core.document.Document doc,
                          String stampName,
                          com.logicaldoc.core.security.User user)
                   throws Exception
        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:
        Exception - a generic error
      • stamp

        public void stamp​(com.logicaldoc.core.document.Document doc,
                          String stampName,
                          Map<String,​Object> parameters,
                          String username)
                   throws Exception
        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
        parameters - optional map of parameters to pass to the Stamp automation
        username - the username of the current user
        Throws:
        Exception - a generic error
      • stamp

        public void stamp​(com.logicaldoc.core.document.Document doc,
                          String stampName,
                          String username)
                   throws Exception
        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:
        Exception - a generic error
      • getSignature

        public String getSignature​(String username)
                            throws Exception
        Retrieves the Base64-encoded image representing the signature of the gien user
        Parameters:
        username - The username of the user
        Returns:
        Base64-encoded image
        Throws:
        Exception - a generic error