Installing and using Mobile Suite : webMethods Mobile Administrator API Reference : Using the Mobile Administrator API : Resource Bundles
Resource Bundles
A Mobile Administrator resource bundle contains a number of files (resources) that are provided to an application dynamically. A resource may be "bundled", that means shipped as part of the application. Non-bundled resources or newer versions of bundled resources can be downloaded by the application at any time.
Shipping a Resource Bundle
After creating and finalizing a manifest, download the bundle ZIP and extract its contents to get the file tree that should be included with the application.
Updating Manifests
To make a new version of a manifest available, duplicate the old manifest and remove or add files as required. By finalizing the manifest, it becomes available to the application either immediately or after the Valid from date.
Resource Manifests
The most current version of each resource is referenced by its SHA1 checksum in a resource manifest. A resource manifest describing the shipped version of the resource bundle is also shipped with the application, and updated versions of that manifest are downloaded by an application as they become available to identify updated resources.
An example manifest may look like this:
<?xml version="1.0" encoding="UTF-8"?>
<manifest timestamp="2012-09-26T16:03:03+0200" namespace="com.example">
<resource filesize="28" path="bundled1.txt" bundled="true"
mimeType="application/octet-stream"
sha1="4707cb8c4e78321df4caec3bbfdc2416e88e235d"/>
<resource filesize="56" path="bundled2.txt" bundled="true"
mimeType="application/octet-stream"
sha1="62d91b2d24cc06517795531f4bab6b6364aefb0c"/>
<resource filesize="56" path="other.png" bundled="false"
mimeType="application/octet-stream"
sha1="62d91b2d24cc06517795531f4bab6b6364aefb0c"/>
</manifest>
Manifests have a SHA1 checksum themselves and are located like other resources. To get the SHA1 checksum of a manifest, a manifest reference is used.
Manifest References
Manifest references contain the SHA1 checksum of the manifest file and a timestamp that can be used to sort manifests by creation time.
<?xml version="1.0" encoding="UTF-8"?>
<manifestReference timestamp="2012-09-26T16:15:52+0200"
namespace="com.example"
sha1="6845b71d66c916c8cb55cc867449a11f9d08d2b3"/>
File System Layout
The path to a manifest reference as identified by its namespace is constructed like this:
refs/{namespace}.ref
The path to a resource as identified by its SHA1 checksum is constructed like this:
objects/{SHA1 part 1}/{SHA1 part 2}.blob
The first part of the SHA1 are the first two lowercase characters of the hex representation of the SHA1 checksum, and the second part is the remainder of the checksum. The path for the above-mentioned bundled1.txt resource would look like this:
objects/47/07cb8c4e78321df4caec3bbfdc2416e88e235d.blob
API
The file system paths described above map to the API which may be used to retrieve the most recent manifest reference or resources for an application.
Copyright © 2007-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback