blob: fc3124822e5b09800143dd76878fc76ba2657095 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Security Admin Web Application: Files and Libraries</title>
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!--custom css for these pages-->
<link rel="stylesheet" href="css/enunciate.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#apinav">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Security Admin Web Application: Files and Libraries</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="resources.html">Resources</a></li>
<li><a href="data.html">Data Types</a></li>
<li><a href="downloads.html">Files and Libraries</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li><a href="#artifact_gwt_json_overlay"><abbr title="GWT JSON Overlay"><span class="sideoverflow">GWT JSON Overlay</span></abbr></a></li>
<li><a href="#artifact_java_json_client_library"><abbr title="Java JSON Client Library"><span class="sideoverflow">Java JSON Client Library</span></abbr></a></li>
<li><a href="#artifact_java_xml_client_library"><abbr title="Java XML Client Library"><span class="sideoverflow">Java XML Client Library</span></abbr></a></li>
<li><a href="#artifact_js_client_library"><abbr title="JavaScript Client Library"><span class="sideoverflow">JavaScript Client Library</span></abbr></a></li>
<li><a href="#artifact_ns0_xsd"><abbr title="ns0.xsd"><span class="sideoverflow">ns0.xsd</span></abbr></a></li>
<li><a href="#artifact_php_json_client_library"><abbr title="PHP JSON Client Library"><span class="sideoverflow">PHP JSON Client Library</span></abbr></a></li>
<li><a href="#artifact_php_xml_client_library"><abbr title="PHP XML Client Library"><span class="sideoverflow">PHP XML Client Library</span></abbr></a></li>
<li><a href="#artifact_ruby_json_client_library"><abbr title="Ruby JSON Client Library"><span class="sideoverflow">Ruby JSON Client Library</span></abbr></a></li>
<li class="divider"></li>
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<ol class="breadcrumb" id="top">
<li class="active dropdown"><a href="index.html">Home</a></li>
<li class="dropdown"><a href="downloads.html">Files and Libraries</a></li>
</ol>
<h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3>
<p class="lead">Created March 12, 2019</p>
<p> <p>
The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that
can be used to access the Web service API for this application.
</p>
<div class="panel panel-default">
<div class="panel-heading">JSON Overlay Example</div>
<div class="panel-body">
<pre class="prettyprint lang-java">
String url = ...;
RequestBuilder request = new RequestBuilder(RequestBuilder.GET, url);
request.sendRequest(null, new RequestCallback() {
public void onResponseReceived(Request request, Response response) {
if (200 == response.getStatusCode()) {
//handle the successful data...
VXAsset data = VXAsset.fromJson(response.getText());
//handle the VXAsset...
}
else {
//handle the error...
}
}
public void onError(Request request, Throwable throwable) {
//handle the error...
}
});
</pre>
</div>
</div>
</p>
<table class="table table-hover downloadfiles">
<caption>Files</caption>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="security-admin-web-gwt-json-overlay.jar">
<td><span class="downloadfile-name">security-admin-web-gwt-json-overlay.jar</span></td>
<td><span class="downloadfile-size">80.78K</span></td>
<td><span class="downloadfile-description">The sources for the GWT JSON overlay.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created March 12, 2019</p>
<p><p>
The Java client-side library is used to provide the set of Java objects that can be serialized
to/from JSON using <a href="http://jackson.codehaus.org/">Jackson</a>. This is useful for accessing the
JSON REST endpoints that are published by this application.
</p>
<div class="panel panel-default">
<div class="panel-heading">Resources Example (Raw JAXB)</div>
<div class="panel-body">
<pre class="prettyprint lang-java">
java.net.URL url = new java.net.URL(baseURL + "/assets/assets");
ObjectMapper mapper = new ObjectMapper();
java.net.URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.connect();
mapper.writeValue(connection.getOutputStream(), vXAsset);
VXAsset result = (VXAsset) mapper.readValue( connection.getInputStream(), VXAsset.class );
//handle the result as needed...
</pre>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Resources Example (Jersey client)</div>
<div class="panel-body">
<pre class="prettyprint lang-java">
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient();
VXAsset result = client.target(baseUrl + "/assets/assets")
.post(javax.ws.rs.client.Entity.entity(vXAsset, "application/json"), VXAsset.class);
//handle the result as needed...
</pre>
</div>
</div>
</p>
<table class="table table-hover downloadfiles">
<caption>Files</caption>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="security-admin-web-json-client.jar">
<td><span class="downloadfile-name">security-admin-web-json-client.jar</span></td>
<td><span class="downloadfile-size">111.31K</span></td>
<td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</tr>
<tr class="clickable-row" data-href="security-admin-web-json-client-json-sources.jar">
<td><span class="downloadfile-name">security-admin-web-json-client-json-sources.jar</span></td>
<td><span class="downloadfile-size">85.29K</span></td>
<td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created March 12, 2019</p>
<p><p>
The Java client-side library is used to access the Web service API for this application using Java.
</p>
<p>
The Java client-side library is used to provide the set of Java objects that can be serialized
to/from XML using <a href="https://jaxb.dev.java.net/">JAXB</a>. This is useful for accessing the
resources that are published by this application.
</p>
<div class="panel panel-default">
<div class="panel-heading">Resources Example (Raw JAXB)</div>
<div class="panel-body">
<pre class="prettyprint lang-java">
java.net.URL url = new java.net.URL(baseURL + "/assets/assets");
JAXBContext context = JAXBContext.newInstance( byte[].class, byte[].class );
java.net.URLConnection connection = url.openConnection();
connection.setDoOutput(true);
connection.connect();
Unmarshaller unmarshaller = context.createUnmarshaller();
Marshaller marshaller = context.createMarshaller();
marshaller.marshal(vXAsset, connection.getOutputStream());
VXAsset result = (VXAsset) unmarshaller.unmarshal( connection.getInputStream() );
//handle the result as needed...
</pre>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Resources Example (Jersey client)</div>
<div class="panel-body">
<pre class="prettyprint lang-java">
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient();
VXAsset result = client.target(baseUrl + "/assets/assets")
.post(javax.ws.rs.client.Entity.entity(vXAsset, "application/xml"), VXAsset.class);
//handle the result as needed...
</pre>
</div>
</div>
</p>
<table class="table table-hover downloadfiles">
<caption>Files</caption>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="security-admin-web-xml-client.jar">
<td><span class="downloadfile-name">security-admin-web-xml-client.jar</span></td>
<td><span class="downloadfile-size">104.72K</span></td>
<td><span class="downloadfile-description">The binaries for the Java XML client library.</span></td>
</tr>
<tr class="clickable-row" data-href="security-admin-web-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">security-admin-web-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">86.66K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3>
<p class="lead">Created March 12, 2019</p>
<p><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
those that produce a JSON representation of their resources (content type "application/json").
</p>
<p>
The library uses ES6 class syntax which has limited support. See
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Browser_compatibility">MDN</a>
and the <a href="https://kangax.github.io/compat-table/es6/">ES6 Compatibility Table</a>
for more details.
</p>
<p>
The library contains a UMD loader which supports AMD, CommonJS and browser globals.
The browser global variable name for this library is "javascriptClient".
</p>
<div class="panel panel-default">
<div class="panel-heading">JavaScript Example</div>
<div class="panel-body">
<pre class="prettyprint lang-js">
//read the resource in JSON:
var json = JSON.parse(jsonString);
//create an object
var object = new Object(json);
//retreive the json again
var newJson = object.toJSON();
//serialize the json
var newJsonString = JSON.stringify(newJson);
</pre>
</div>
</div>
</p>
<table class="table table-hover downloadfiles">
<caption>Files</caption>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="security-admin-web-js.zip">
<td><span class="downloadfile-name">security-admin-web-js.zip</span></td>
<td><span class="downloadfile-size">72.50K</span></td>
<td><span class="downloadfile-description"><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
those that produce a JSON representation of their resources (content type "application/json").
</p>
<p>
The library uses ES6 class syntax which has limited support. See
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Browser_compatibility">MDN</a>
and the <a href="https://kangax.github.io/compat-table/es6/">ES6 Compatibility Table</a>
for more details.
</p>
<p>
The library contains a UMD loader which supports AMD, CommonJS and browser globals.
The browser global variable name for this library is "javascriptClient".
</p>
<div class="panel panel-default">
<div class="panel-heading">JavaScript Example</div>
<div class="panel-body">
<pre class="prettyprint lang-js">
//read the resource in JSON:
var json = JSON.parse(jsonString);
//create an object
var object = new Object(json);
//retreive the json again
var newJson = object.toJSON();
//serialize the json
var newJsonString = JSON.stringify(newJson);
</pre>
</div>
</div>
</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_ns0_xsd">ns0.xsd</h3>
<p class="lead">Created March 12, 2019</p>
<table class="table table-hover downloadfiles">
<caption>Files</caption>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="ns0.xsd">
<td><span class="downloadfile-name">ns0.xsd</span></td>
<td><span class="downloadfile-size">137.33K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created March 12, 2019</p>
<p><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
those that produce a JSON representation of their resources (content type "application/json").
</p>
<p>
This library requires the <a href="http://php.net/manual/en/function.json-encode.php">json_encode</a> function which was included in PHP versions 5.2.0+.
</p>
<div class="panel panel-default">
<div class="panel-heading">PHP JSON Example</div>
<div class="panel-body">
<pre class="prettyprint lang-php">
//read the resource in JSON:
$json = ...;
//read the json as an array.
$parsed = json_decode($json, true);
//read the json array as the object
$result = new Object($parsed);
//open a writer for the json
$json = $result->toJson();
</pre>
</div>
</div>
</p>
<table class="table table-hover downloadfiles">
<caption>Files</caption>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="security-admin-web-php.zip">
<td><span class="downloadfile-name">security-admin-web-php.zip</span></td>
<td><span class="downloadfile-size">88.11K</span></td>
<td><span class="downloadfile-description"><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
those that produce a JSON representation of their resources (content type "application/json").
</p>
<p>
This library requires the <a href="http://php.net/manual/en/function.json-encode.php">json_encode</a> function which was included in PHP versions 5.2.0+.
</p>
<div class="panel panel-default">
<div class="panel-heading">PHP JSON Example</div>
<div class="panel-body">
<pre class="prettyprint lang-php">
//read the resource in JSON:
$json = ...;
//read the json as an array.
$parsed = json_decode($json, true);
//read the json array as the object
$result = new Object($parsed);
//open a writer for the json
$json = $result->toJson();
</pre>
</div>
</div>
</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created March 12, 2019</p>
<p><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML.
This is useful for accessing the resources that are published by this application, but only
those that produce a XML representation of their resources.
</p>
<p>
This library leverages the <a href="http://php.net/manual/en/book.xmlreader.php">XMLReader</a> and
<a href="http://php.net/manual/en/book.xmlwriter.php">XMLWriter</a> tools that were included in PHP
versions 5.1.0+.
</p>
<div class="panel panel-default">
<div class="panel-heading">PHP XML Example</div>
<div class="panel-body">
<pre class="prettyprint lang-php">
//read the resource in XML form:
$xml = ...;
$reader = new \XMLReader();
if (!$reader->open($xml)) {
throw new \Exception('Unable to open ' . $xml);
}
$result = new Object($reader);
//open a writer for the xml
$out = ...;
$writer = new \XMLWriter();
$writer->openUri($out);
$writer->startDocument();
$writer->setIndent(4);
$result->toXml($writer);
$writer->flush();
</pre>
</div>
</div>
</p>
<table class="table table-hover downloadfiles">
<caption>Files</caption>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="security-admin-web-php.zip">
<td><span class="downloadfile-name">security-admin-web-php.zip</span></td>
<td><span class="downloadfile-size">47.78K</span></td>
<td><span class="downloadfile-description"><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML.
This is useful for accessing the resources that are published by this application, but only
those that produce a XML representation of their resources.
</p>
<p>
This library leverages the <a href="http://php.net/manual/en/book.xmlreader.php">XMLReader</a> and
<a href="http://php.net/manual/en/book.xmlwriter.php">XMLWriter</a> tools that were included in PHP
versions 5.1.0+.
</p>
<div class="panel panel-default">
<div class="panel-heading">PHP XML Example</div>
<div class="panel-body">
<pre class="prettyprint lang-php">
//read the resource in XML form:
$xml = ...;
$reader = new \XMLReader();
if (!$reader->open($xml)) {
throw new \Exception('Unable to open ' . $xml);
}
$result = new Object($reader);
//open a writer for the xml
$out = ...;
$writer = new \XMLWriter();
$writer->openUri($out);
$writer->startDocument();
$writer->setIndent(4);
$result->toXml($writer);
$writer->flush();
</pre>
</div>
</div>
</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created March 12, 2019</p>
<p><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON.
This is useful for accessing the REST endpoints that are published by this application, but only
those that produce a JSON representation of their resources (content type "application/json").
</p>
<p>
This library leverages the <a href="http://json.rubyforge.org/">Ruby JSON Implementation</a>, which is
required in order to use this library.
</p>
<div class="panel panel-default">
<div class="panel-heading">Ruby JSON Example</div>
<div class="panel-body">
<pre class="prettyprint lang-ruby">
require 'net/https'
require 'uri'
//...
//read a resource from a REST url
url = URI.parse("...")
request = Net::HTTP::Post.new(url.request_uri)
input = Object.new
//set up the Object...
request.body = input.to_json
request['Content-Type'] = "application/json"
http = Net::HTTP.new(url.host, url.port)
//set up additional http stuff...
res = http.start do |ht|
ht.request(request)
end
result = Object.from_json(JSON.parse(res.body))
//handle the result as needed...
</pre>
</div>
</div>
</p>
<table class="table table-hover downloadfiles">
<caption>Files</caption>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="security-admin-web.rb">
<td><span class="downloadfile-name">security-admin-web.rb</span></td>
<td><span class="downloadfile-size">1.23M</span></td>
<td><span class="downloadfile-description"><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON.
This is useful for accessing the REST endpoints that are published by this application, but only
those that produce a JSON representation of their resources (content type "application/json").
</p>
<p>
This library leverages the <a href="http://json.rubyforge.org/">Ruby JSON Implementation</a>, which is
required in order to use this library.
</p>
<div class="panel panel-default">
<div class="panel-heading">Ruby JSON Example</div>
<div class="panel-body">
<pre class="prettyprint lang-ruby">
require 'net/https'
require 'uri'
//...
//read a resource from a REST url
url = URI.parse("...")
request = Net::HTTP::Post.new(url.request_uri)
input = Object.new
//set up the Object...
request.body = input.to_json
request['Content-Type'] = "application/json"
http = Net::HTTP.new(url.host, url.port)
//set up additional http stuff...
res = http.start do |ht|
ht.request(request)
end
result = Object.from_json(JSON.parse(res.body))
//handle the result as needed...
</pre>
</div>
</div>
</span></td>
</tr>
</tbody>
</table>
<footer class="footer">
<div class="container">
<p class="text-muted">Generated by <a href="http://enunciate.webcohesion.com">Enunciate</a>.</p>
</div>
</footer>
</div>
</div>
</div>
<!-- JavaScript placed at the end of the document so the pages load faster. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Bootstrap core JavaScript
================================================== -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- prettify code blocks. see http://code.google.com/p/google-code-prettify/ -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js" type="text/javascript"></script>
<script>
$(function() {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
$('[data-toggle="tooltip"]').tooltip()
});
</script>
</body>
</html>