Integrate Software AG Products Using Digital Event Services 10.4 | Integrate Software AG Products Using Digital Event Services | MashZone NextGen Help | Appendix | Legacy Presto components | Mashables and Mashups | Views for Mashups and Mashables | Creating Pluggable Views or Libraries | Managing Updates and Library Versions | Handle Minor Library Updates
 
Handle Minor Library Updates
Increment an Existing Library Version
With minor updates to an existing pluggable library or pluggable view that are backwards-compatible, the best practice is to import updates to the existing pluggable library or view with a new version number. Changing the version number for a pluggable library ensures browsers will retrieve the updated resources rather than using cached versions (the version number is part of the URL for each resource).
Note: If updates to a pluggable library or view are not backwards compatible, library updates should be handled as a new library with a new ID. See Handle New Library Releases or Major Updates for more information.
* To handle updates as a new version of an existing pluggable library or view
1. Export Resources for an Existing Pluggable View or Library for Updates. This downloads all the resources for that library or view completely expanded in a directory of your choice.
2. Update the resource code as needed.
3. Increment the version number in the properties file for the library or in the <target> for the library in the Ant build.xml file. For example in a properties file:
#properties for mysample pluggable view library
id=mysample
name=My Sample View
description=A sample view with help
type=view
helpUrl=html/mysample.html
version=2
loadConfirmation=Sample.SampleView
4. Import the update using the importLib command or your Ant build.
For importLib:
a. Open a command or terminal window and move to the MashZoneNG-install/prestocli/bin folder for the MashZone NextGen Server
b. Enter this command:
padmin importLib -d path-to-library-root-folder -u username -w password
If the MashZone NextGen Server is remote or is not running in Tomcat using the default port, you must also include -l url-to-mashup-server in the command.
The updated resources are imported with a new path for that version. Resources for the existing version remain untouched. With these library resources, for example:
c:\libraries\mysample\1
- mysample.properties
- /js
- lib.js
- /css
- lib.css
- /html
-mysample.html
- /thumbnail
- mysample.png
MashZone NextGen would add the following resources for version 2:
/mashzone/files/system/lib/mysample/2/mysample.properties
/mashzone/files/system/lib/mysample/2/js/lib.js
/mashzone/files/system/lib/mysample/2/css/lib.css
/mashzone/files/system/lib/mysample/2/html/mysample.html
This new version becomes the default version for the pluggable library or view, so you see immediate changes in views or apps that are dependent on this library. You should also see this version as the default version in the Admin Console.
Overwrite an Existing Library
With minor updates that are backwards-compatible with an existing pluggable library or pluggable view, you can simply overwrite the existing version.
Note: With no change in the library version, the updated resources may not be immediately visible in dependent views or apps because browsers are using cached versions of these resources.
* To overwrite an existing library version with updates
1. Export Resources for an Existing Pluggable View or Library for Updates. This downloads all the resources for that pluggable library or view completely expanded in a directory of your choice.
2. Update the resources as needed.
3. Make sure that the version number for this library in its properties file or in the <target> in build.xml matches the version number from the download.
4. If you use an Ant build to import this library, make sure the overwirte property is set in the <presto.lib.import> task for this library’s <target>. For example:
<target name="view-import-mysample">
<presto.lib.import
dir="${libs.dir}/mysample"
id="mysample"
name="My Sample View"
description="A sample view with help"
type="view"
helpUrl="html/mysample.html"
version="1"
overwrite="true"
loadConfirmation="Sample.SampleView" />
</target>
Then run the Ant build for this target:
a. Open a command or terminal window and move to the project folder with build.xml for your pluggable libraries and views.
b. Enter the Ant command with the target name for this library. For example:
c:\projects\libraries> ant view-import-mysample
5. If you use the importLib command, include the -o option in the command to overwrite the existing version. For example:
padmin importLib -d c:\libraries\mysample\1 -o -u Administrator -w manage
As with the exportLib command, you may need to specify the URL to the MashZone NextGen Server or provide other options.
Your updates automatically affect all views in mashables or mashups that use this library, any basic or workspace apps in MashZone NextGen Hub that include those views and any custom apps in MashZone NextGen Hub that use this library, but the updates may not be immediately visible because of browser caching.
Export Resources for an Existing Pluggable View or Library for Updates
Download the existing resources for the pluggable library or view that you want to update to a folder using the exportLib command:
1. Open a command window and move to the MashZoneNG-install/prestocli/bin folder.
2. Enter this command:
padmin exportLib -q "ids=library-id" -d path-to-output-directory -u username -w password
Supplying the ID for the library you need to update and the full path to a folder where the resources for this library should be placed.
Note: If the MashZone NextGen Server is remote or is not running in Tomcat using the default port, you must also include -l url-to-mashup-server in the command.
This downloads all resources for the current default version of the library you requested, starting from the root library folder, to the directory you specified. For example:
Export a Library for Update
With this command in a Windows environment:
c:\Presto3.5\prestocli\bin>padmin exportLib -q "ids=mysample" -d c:\libraries -u Administrator -w manage
If the mysample library is a pluggable view and the default current version is 1, the folders and resources that are exported would look something like this:
c:\libraries\mysample\1
- mysample.properties
- /js
- lib.js
- /css
- lib.css
- /html
- mysample.html
- /thumbnail
- mysample.png
Notice that the version number becomes a folder in the path for the library’s resources.

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release