Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doerj-caderno-dxp-7.2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diogo.souza
doerj-caderno-dxp-7.2
Commits
fe42501f
Commit
fe42501f
authored
Oct 07, 2020
by
Diogo Fellipe De Melo Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Versão para ajustar docx4J
parent
24327d7e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
9 deletions
+39
-9
MprjDoerjCadernoPortlet.class
.../mprj/doerj/caderno/portlet/MprjDoerjCadernoPortlet.class
+0
-0
GeraCaderno.class
bin/main/mprj/doerj/caderno/util/GeraCaderno.class
+0
-0
bnd.bnd
bnd.bnd
+20
-2
build.gradle
build.gradle
+10
-0
MprjDoerjCadernoPortlet.java
...a/mprj/doerj/caderno/portlet/MprjDoerjCadernoPortlet.java
+3
-5
RestServices.java
src/main/java/mprj/doerj/caderno/rest/RestServices.java
+1
-1
GeraCaderno.java
src/main/java/mprj/doerj/caderno/util/GeraCaderno.java
+5
-1
No files found.
bin/main/mprj/doerj/caderno/portlet/MprjDoerjCadernoPortlet.class
View file @
fe42501f
No preview for this file type
bin/main/mprj/doerj/caderno/util/GeraCaderno.class
View file @
fe42501f
No preview for this file type
bnd.bnd
View file @
fe42501f
...
...
@@ -14,6 +14,7 @@ Export-Package: mprj.doerj.caderno.constants
@commons-lang3-3.11.jar,\
@json-20200518.jar,\
@docx4j-core-8.0.0.jar,\
@docx4j-6.1.2.jar,\
@docx4j-ImportXHTML-8.0.0.jar,\
@failureaccess-1.0.1.jar,\
@error_prone_annotations-2.4.0.jar,\
...
...
@@ -46,7 +47,18 @@ Export-Package: mprj.doerj.caderno.constants
@curator-framework-4.0.0.jar,\
@curator-client-4.0.0.jar,\
@curator-x-discovery-4.0.0.jar,\
@log4j-1.2.17.jar
@log4j-1.2.17.jar,\
@spring-web-4.0.0.RELEASE.jar,\
@spring-core-4.0.0.RELEASE.jar,\
@commons-logging-1.2.jar,\
@com.springsource.javax.xml.stream-1.0.1.jar,\
@sax-2.0.1.jar,\
@dom-2.3.0-jaxb-1.0.6.jar,\
@slf4j-log4j12-1.7.25.jar,\
@slf4j-api-1.7.26.jar,\
@docx4j-MOXy-JAXBContext-6.0.0.jar
Import-Package: \
!com.google.*,\
...
...
@@ -55,7 +67,13 @@ com.liferay.portal.kernel.*,\
com.liferay.portal.configuration.*,\
javax.portlet.*,\
javax.servlet.http.*,\
!org.apache.*
javax.servlet.*,\
javax.xml.*,\
!org.apache.curator.*,\
org.xml.sax.*,\
org.w3c.dom.*,\
org.slf4j.*
...
...
build.gradle
View file @
fe42501f
...
...
@@ -31,7 +31,9 @@ dependencies {
compileOnly
group:
"org.osgi"
,
name:
"org.osgi.service.component.annotations"
,
version:
"1.3.0"
compileOnly
group:
'org.springframework'
,
name:
'spring-web'
,
version:
'4.0.0.RELEASE'
compileOnly
group:
'org.springframework'
,
name:
'spring-core'
,
version:
'4.0.0.RELEASE'
compileOnly
group:
'org.apache.commons'
,
name:
'commons-lang3'
,
version:
'3.11'
compileOnly
group:
'commons-logging'
,
name:
'commons-logging'
,
version:
'1.2'
compileOnly
group:
'log4j'
,
name:
'log4j'
,
version:
'1.2.14'
compileOnly
group:
'org.json'
,
name:
'json'
,
version:
'20200518'
compileOnly
group:
'biz.aQute.bnd'
,
name:
'bndlib'
,
version:
'2.4.0'
...
...
@@ -39,11 +41,15 @@ dependencies {
compileOnly
group:
'org.docx4j'
,
name:
'docx4j-ImportXHTML'
,
version:
'8.0.0'
compileOnly
group:
'org.docx4j'
,
name:
'docx4j'
,
version:
'6.1.2'
compileOnly
group:
'org.docx4j'
,
name:
'docx4j-MOXy-JAXBContext'
,
version:
'6.0.0'
compileOnly
group:
'com.google.guava'
,
name:
'failureaccess'
,
version:
'1.0.1'
compileOnly
group:
'com.google.errorprone'
,
name:
'error_prone_annotations'
,
version:
'2.4.0'
compileOnly
group:
'com.google.guava'
,
name:
'guava-concurrent'
,
version:
'r03'
compileOnly
group:
'com.thedeanda'
,
name:
'lorem'
,
version:
'2.1'
compileOnly
group:
'javax.annotation'
,
name:
'javax.annotation-api'
,
version:
'1.3.2'
compileOnly
group:
'org.apache.servicemix.specs'
,
name:
'org.apache.servicemix.specs.jaxp-api-1.4'
,
version:
'1.4_1'
compileOnly
group:
'de.julielab'
,
name:
'xercesImpl'
,
version:
'2.11.0.1'
compileOnly
group:
'net.arnx'
,
name:
'wmf2svg'
,
version:
'0.9.5'
compileOnly
group:
'com.google.appengine'
,
name:
'appengine-api-1.0-sdk'
,
version:
'1.9.82'
compileOnly
group:
'com.google.api'
,
name:
'api-common'
,
version:
'1.9.3'
...
...
@@ -69,6 +75,10 @@ dependencies {
compileOnly
group:
'org.apache.curator'
,
name:
'curator-recipes'
,
version:
'4.0.0'
compileOnly
group:
'org.apache.curator'
,
name:
'apache-curator'
,
version:
'4.0.0'
compileOnly
group:
'org.apache.curator'
,
name:
'curator-x-discovery'
,
version:
'4.0.0'
compileOnly
group:
'javax.xml.stream'
,
name:
'com.springsource.javax.xml.stream'
,
version:
'1.0.1'
compileOnly
group:
'sax'
,
name:
'sax'
,
version:
'2.0.1'
compileOnly
group:
'org.w3c'
,
name:
'dom'
,
version:
'2.3.0-jaxb-1.0.6'
compileOnly
group:
'org.slf4j'
,
name:
'slf4j-api'
,
version:
'1.7.0'
...
...
src/main/java/mprj/doerj/caderno/portlet/MprjDoerjCadernoPortlet.java
View file @
fe42501f
package
mprj
.
doerj
.
caderno
.
portlet
;
import
com.liferay.portal.kernel.exception.SystemException
;
import
com.liferay.portal.kernel.json.JSONFactoryUtil
;
import
com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet
;
import
com.liferay.portal.kernel.search.ParseException
;
...
...
@@ -23,7 +22,6 @@ import javax.portlet.PortletException;
import
javax.portlet.PortletURL
;
import
javax.portlet.RenderRequest
;
import
javax.portlet.RenderResponse
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.log4j.Logger
;
import
org.json.JSONArray
;
...
...
@@ -32,7 +30,7 @@ import org.osgi.service.component.annotations.Component;
import
mprj.doerj.caderno.constants.MprjDoerjCadernoPortletKeys
;
import
mprj.doerj.caderno.rest.RestServices
;
import
mprj.doerj.caderno.util.CadernoUtil
;
import
javax.portlet.ActionRequest
;
import
mprj.doerj.caderno.util.GeraCaderno
;
/**
* @author diogo.souza
...
...
@@ -145,9 +143,9 @@ public class MprjDoerjCadernoPortlet extends MVCPortlet {
if
(!
mensagensDeErro
(
listaConteudos
,
dataDivulgacao
,
actionRequest
)){
//
GeraCaderno caderno = new GeraCaderno();
GeraCaderno
caderno
=
new
GeraCaderno
();
//
caderno.processaCaderno(actionRequest, actionResponse,listaConteudos,dataDivulgacao);
caderno
.
processaCaderno
(
actionRequest
,
actionResponse
,
listaConteudos
,
dataDivulgacao
);
}
else
{
String
portletName
=
(
String
)
actionRequest
.
getAttribute
(
WebKeys
.
PORTLET_ID
);
...
...
src/main/java/mprj/doerj/caderno/rest/RestServices.java
View file @
fe42501f
package
mprj
.
doerj
.
caderno
.
rest
;
import
com.liferay.portal.kernel.util.ParamUtil
;
import
com.liferay.portal.kernel.util.StringPool
;
import
java.net.URI
;
...
...
@@ -15,6 +14,7 @@ import org.json.JSONObject;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.client.RestTemplate
;
public
class
RestServices
{
public
JSONArray
getRest
(
String
dataDivulgacao
,
String
idStatus
,
ActionRequest
actionRequest
)
throws
Exception
{
...
...
src/main/java/mprj/doerj/caderno/util/GeraCaderno.java
View file @
fe42501f
...
...
@@ -50,8 +50,12 @@ public class GeraCaderno {
public
static
void
processaCaderno
(
ActionRequest
actionRequest
,
ActionResponse
actionResponse
,
JSONArray
listaConteudos
,
String
dataDivulgacao
)
throws
Docx4JException
,
JAXBException
,
IOException
,
ParseException
{
PortletContext
context
=
actionRequest
.
getPortletSession
().
getPortletContext
();
String
pathTemplate
=
context
.
getRealPath
(
"/template"
);
//String pathTemplate = context.getRealPath("");
String
pathTemplate
=
"F:/LiferayWorkspacewithDevStudioDXP/workspace/mprj-doerj-caderno/src/main/resources/META-INF/resources/template"
;
String
conteudo
=
""
;
String
orgao
=
""
;
String
titulo
=
""
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment