Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rest-api-model
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
authzforce
rest-api-model
Commits
2d15b067
Commit
2d15b067
authored
Aug 01, 2017
by
cdanger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added new representation type "application/xacml+json" for JSON
profile of XACML on pdp resource (Request and Response)
parent
8bdc65fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
7 deletions
+41
-7
add-json-to-wadl.xsl
add-json-to-wadl.xsl
+6
-2
pom.xml
pom.xml
+35
-5
No files found.
add-json-to-wadl.xsl
View file @
2d15b067
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version=
"2.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:wadl=
"http://wadl.dev.java.net/2009/02"
>
<xsl:stylesheet
version=
"2.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:wadl=
"http://wadl.dev.java.net/2009/02"
xmlns:xacml=
"urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"
>
<!-- <xsl:output method="xml" encoding="UTF-8" indent="yes" saxon:indent-spaces="4" /> xmlns:saxon="http://saxon.sf.net/" -->
<xsl:output
method=
"xml"
encoding=
"UTF-8"
indent=
"yes"
/>
<xsl:param
name=
"enable_xacml_json_profile"
select=
"false"
/>
<xsl:template
match=
"wadl:representation[@mediaType='application/xml']"
>
<
xsl:variable
name=
"xmlElement"
select=
"@element"
/
>
<
!-- <xsl:variable name="xmlElement" select="@element" /> --
>
<xsl:copy>
<xsl:apply-templates
select=
"@*|node()"
/>
</xsl:copy>
...
...
@@ -11,6 +12,9 @@
<!-- If we specify an element again for 'application/json', CXF wadl2java plugin ignores the fact that it is the same and maps to generic java type 'javax.xml.transform.Source' -->
<!-- <xsl:attribute name="element"><xsl:value-of select="$xmlElement" /></xsl:attribute> -->
</wadl:representation>
<xsl:if
test=
"$enable_xacml_json_profile = 'true' and (@element = 'xacml:Request' or @element = 'xacml:Response')"
>
<wadl:representation
mediaType=
"application/xacml+json"
/>
</xsl:if>
</xsl:template>
<!-- standard copy template -->
<xsl:template
match=
"@*|node()"
>
...
...
pom.xml
View file @
2d15b067
...
...
@@ -142,7 +142,7 @@
</configuration>
</execution>
<execution>
<id>
generate-wadl-with-json
</id>
<id>
generate-wadl-with-
mapped-
json
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
transform
</goal>
...
...
@@ -166,7 +166,7 @@
</configuration>
</execution>
<execution>
<id>
generate-wadl-with-
fastinfoset-and-json
</id>
<id>
generate-wadl-with-
mapped-json-and-json-profile-of-xacml
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
transform
</goal>
...
...
@@ -176,12 +176,42 @@
<transformationSet>
<dir>
${project.build.outputDirectory}
</dir>
<includes>
<include>
authz-api+json.wadl
</include>
<include>
authz-api.wadl
</include>
</includes>
<outputDir>
${project.build.outputDirectory}
</outputDir>
<fileMappers>
<fileMapper
implementation=
"org.codehaus.plexus.components.io.filemappers.MergeFileMapper"
>
<targetName>
authz-api+xacml+json.wadl
</targetName>
</fileMapper>
</fileMappers>
<stylesheet>
add-json-to-wadl.xsl
</stylesheet>
<parameters>
<parameter>
<name>
enable_xacml_json_profile
</name>
<value>
true
</value>
</parameter>
</parameters>
</transformationSet>
</transformationSets>
</configuration>
</execution>
<execution>
<id>
generate-wadl-with-all
</id>
<phase>
generate-sources
</phase>
<goals>
<goal>
transform
</goal>
</goals>
<configuration>
<transformationSets>
<transformationSet>
<dir>
${project.build.outputDirectory}
</dir>
<includes>
<include>
authz-api+xacml+json.wadl
</include>
</includes>
<outputDir>
${project.build.outputDirectory}
</outputDir>
<fileMappers>
<fileMapper
implementation=
"org.codehaus.plexus.components.io.filemappers.MergeFileMapper"
>
<targetName>
authz-api+
fi+json
.wadl
</targetName>
<targetName>
authz-api+
all
.wadl
</targetName>
</fileMapper>
</fileMappers>
<stylesheet>
add-fastinfoset-to-wadl.xsl
</stylesheet>
...
...
@@ -253,7 +283,7 @@
<configuration>
<wadlOptions>
<wadlOption>
<wadl>
${project.build.outputDirectory}/authz-api+
fi+json
.wadl
</wadl>
<wadl>
${project.build.outputDirectory}/authz-api+
all
.wadl
</wadl>
<packagename>
org.ow2.authzforce.rest.api.jaxrs
</packagename>
<extraargs>
<extraarg>
-catalog
</extraarg>
...
...
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