Package com.logicaldoc.sign
Class Sign
- java.lang.Object
-
- com.logicaldoc.sign.Sign
-
public class Sign extends Object
A front-end to OpenSSL and Java cryptography to handle certificates.- Since:
- 7.1.2
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description Sign()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generateNewCertificate(String sid)
static Sign
get()
static int
processExpression(String expression, long tenantId, int pageWidth, int pageHeight, int imageWidth, int imageHeight)
Processes the expression for X or Y positioning.Long[]
sign(String sid, com.logicaldoc.core.security.User user, long[] docIds, String reason, int page, String signX, String signY, String signWidth)
Signs a set of documents
-
-
-
Method Detail
-
get
public static Sign get()
-
generateNewCertificate
public void generateNewCertificate(String sid) throws com.logicaldoc.gui.common.client.ServerException
- Throws:
com.logicaldoc.gui.common.client.ServerException
-
processExpression
public static int processExpression(String expression, long tenantId, int pageWidth, int pageHeight, int imageWidth, int imageHeight)
Processes the expression for X or Y positioning. Available variables are:- PAGE_WIDTH
- PAGE_HEIGHT
- PAGE_CENTER
- PAGE_MIDDLE
- IMAGE_WIDTH
- IMAGE_HEIGHT
- Parameters:
expression
- The expression to process(you can use the macros)tenantId
- identifier of the tenantpageWidth
- width of the pagepageHeight
- height of the pageimageWidth
- width of the imageimageHeight
- height of the image- Returns:
- The coordinate
-
sign
public Long[] sign(String sid, com.logicaldoc.core.security.User user, long[] docIds, String reason, int page, String signX, String signY, String signWidth) throws com.logicaldoc.gui.common.client.ServerException
Signs a set of documents- Parameters:
sid
- The current sessionuser
- The userdocIds
- Array of IDs to signreason
- Reason for the signaturesignX
- X position to override the default one defined in the KeystoresignY
- Y position to override the default one defined in the KeystoresignWidth
- Width to override the default one defined in the Keystorepage
- index of the page to use- Returns:
- The list of signed documents
- Throws:
com.logicaldoc.gui.common.client.ServerException
- error in the server
-
-