This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = "/var/tsa/intake_counter.json"; | |
var jcrsession = graniteWorkflowSession.adaptTo(Packages.javax.jcr.Session); | |
var node = jcrsession.getNode(path); | |
var is = node.getNode("jcr:content").getProperty("jcr:data").getStream(); | |
var jsonInputString = org.apache.commons.io.IOUtils.toString(is, "UTF-8"); | |
is.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This Java Quick Start uses the SOAP mode and contains the following JAR files | |
* in the class path: | |
* 1. adobe-distiller-client.jar | |
* 2. adobe-livecycle-client.jar | |
* 3. adobe-usermanager-client.jar | |
* 4. adobe-utilities.jar | |
* 5. jboss-client.jar (use a different JAR file if the forms server is not deployed | |
* on JBoss) | |
* 6. activation.jar (required for SOAP mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Assumes a date string yyyy-mm-dd or mm/dd/yyyy | |
function isGreaterThanToday(inpDateField) { | |
var inpDate = inpDateField.rawValue; | |
var todaysDate = new Date(); | |
todaysDate.setHours(0,0,0,0); | |
var splitDate = inpDate.split('-'); | |
var nYear = splitDate[0]; | |
var nMonth = splitDate[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sling.bootdelegation.class.com.rsa.jsafe.provider.JsafeJCE=com.rsa.* | |
sling.bootdelegation.class.org.bouncycastle.jce.provider.BouncyCastleProvider=org.bouncycastle.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = org.apache.http.impl.client.HttpClients.createDefault(); | |
var file = new java.io.File("/home/aem/Downloads/pdf-test.pdf"); | |
var post = new org.apache.http.client.methods.HttpPost("http://localhost:4502/api/assets/testFolder/pdf-test.pdf"); | |
var fileBody = new org.apache.http.entity.mime.content.FileBody(file, org.apache.http.entity.ContentType.DEFAULT_BINARY); | |
var nameBody = new org.apache.http.entity.mime.content.StringBody("pdf-test.pdf", org.apache.http.entity.ContentType.MULTIPART_FORM_DATA); | |
builder = org.apache.http.entity.mime.MultipartEntityBuilder.create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = "/var/app_folder/my_file.txt"; | |
var jcrsession = graniteWorkflowSession.adaptTo(Packages.javax.jcr.Session); | |
var node = jcrsession.getNode(path); | |
var stream = new java.io.ByteArrayInputStream(new java.lang.String(updateCountInfoStr).getBytes("UTF-8") ); | |
node.getNode("jcr:content").setProperty("jcr:data", stream); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = "/var/my_app_folder/my_file.txt"; | |
var jcrsession = graniteWorkflowSession.adaptTo(Packages.javax.jcr.Session); | |
var node = jcrsession.getNode(path); | |
var is = node.getNode("jcr:content").getProperty("jcr:data").getStream(); | |
var stringInputStream = org.apache.commons.io.IOUtils.toString(is, "UTF-8"); | |
is.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum -y install glibc.i686 | |
yum -y install libcurl.i686 | |
yum -y install libICE.i686 | |
yum -y install libicu.i686 | |
yum -y install libicu | |
yum -y install libSM.i686 | |
yum -y install libuuid.i686 | |
yum -y install libX11.i686 | |
yum -y install libXau.i686 | |
yum -y install libxcb.i686 |