|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ow2.bonita.connector.core.Connector
org.ow2.bonita.connector.core.ProcessConnector
net.nicoulaj.bonita.connectors.EncodeQRCode
public class EncodeQRCode
A Connector that encodes a text to a QR code.
| Field Summary |
|---|
| Fields inherited from class org.ow2.bonita.connector.core.Connector |
|---|
validation |
| Constructor Summary | |
|---|---|
EncodeQRCode()
|
|
| Method Summary | |
|---|---|
protected void |
executeConnector()
Encode the value of text as a QR code. |
com.google.zxing.common.BitMatrix |
getMatrix()
Get the resulting QR code encoded BitMatrix. |
String |
getText()
The value of the text to be encoded as a QR code. |
void |
setText(String text)
Set the text to be encoded as a QR code. |
protected List<org.ow2.bonita.connector.core.ConnectorError> |
validateValues()
Validate the input values. |
| Methods inherited from class org.ow2.bonita.connector.core.ProcessConnector |
|---|
getActivitytInstanceUUID, getProcessDefinitionUUID, getProcessInstanceUUID, setActivityInstanceUUID, setProcessDefinitionUUID, setProcessInstanceUUID |
| Methods inherited from class org.ow2.bonita.connector.core.Connector |
|---|
bonitaListToArrayMap, bonitaListToMap, checkGraphicalAnnotations, checkRuntimeAnnotations, containsErrors, execute, execute, fieldExists, getField, getFieldName, getGetterName, getGetterReturnType, getGetters, getMethod, getSetters, isFieldExist, validate, validateConnector |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EncodeQRCode()
| Method Detail |
|---|
protected List<org.ow2.bonita.connector.core.ConnectorError> validateValues()
text is not blank.
validateValues in class org.ow2.bonita.connector.core.Connector
protected void executeConnector()
throws Exception
text as a QR code.
executeConnector in class org.ow2.bonita.connector.core.ConnectorException - if the QR code could not be encoded for some reason.public String getText()
text.public void setText(String text)
text - the value to use.public com.google.zxing.common.BitMatrix getMatrix()
BitMatrix.
The matrix can then be used this way:
MatrixToImageWriter.writeToFile(matrix,"PNG",new File("some/path.png")); // Write to a file
MatrixToImageWriter.writeToStream(matrix, "PNG", outputStream); // Write to a stream
BufferedImage image = MatrixToImageWriter.toBufferedImage(matrix); // Get a BufferedImage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||