Broadcast on Broadcast off
The Documentation for Project Zero has moved. Please update your bookmarks to: http://www.projectzero.org/documentation/
Table of
Contents...
Hide

Project Zero Developer’s Guide

Concepts and components
Basic concepts overview
Event processing
Writing Java handlers
Writing Groovy handlers
Firing events
Global Context
Global Context reference
Application directory layout
Virtualized directories
Assemble
PHP
Features and configuration
Configuration
Debugging
Dependencies
Packaging
Application classpath
Logging and tracing
RESTful resources
RESTful documentation
File serving
Response rendering
Validators and validation
HTTP error handling
Calling a remote resource
Using the Connection API
Sending an email using EmailConnection
Configuring destinations
Configuring protocols
Configuring connection handlers
Creating a connection handler
Creating a custom protocol transport
Simple logging connection handlers
Protocol reference
Client programming with Dojo
Runtime options
Deployment modifications
HTTP configuration
SSL configuration
Proxy configuration
Extending the CLI
Security considerations
Authentication
OpenID authentication
Extending security
Security tokens
CSRF prevention support
Extending token support
Leveraging TAI
User service
File based user service
LDAP user service
Extending user service
Security Utilities
Leveraging XOREncoder
Extensions
Atom support
RSS support
JSON support
XMLEncoder
REST to SOAP extension
URIUtils
Developer Web tools
Database setup tools
Configuring data access
Common query patterns
Advanced query patterns
Update patterns
Local database transactions
Extending data access
Configuration vendor differences
PHP data access
Resource model
Configuring ZRM
Resource model declaration
Programmatic model API
HTTP REST API
A ZRM mini tutorial
Active content filtering support
Default filters
Custom filters
Runtime management
Management commands
Zero socket opener
Other extension modules
Amazon E-commerce service
Flickr service
WeatherZero forecast service
Wikipedia service
Reference
Zero command line interface
JavaDoc - Public API
JavaDoc - Public SPI
JavaDoc - All Classes

 

Catalog Zero overview

Catalog Zero is a Project Zero application that allows users to share packaged Project Zero applications and services. A live beta of Catalog Zero is running here. Anyone using the Catalog Zero Web interface can browse, download, rate, and comment on packages. Authorized users can upload and manage packages. Catalog Zero provides an easy-to-use interface tailored to the Project Zero experience. It provides support for uploading Project Zero packages as well as an Ivy repository interface. The following sections of this article provide information about Catalog Zero.

Prerequisites

The following software is required to run Catalog Zero on your local workstation:

  • Project Zero Eclipse Plug In or Command Line Interface
  • MySQL 5.0.3 or later
  • Firefox 2 or Internet Explorer 7

Catalog Zero uses the following packages (in addition to zero.core):

zero.catalogApp
A Project Zero application that enables sharing packaged Project Zero applications and services.
zero.service.catalog
The REST-based back end for Catalog Zero.
zero.data
Provides persistent for Catalog Zero metadata.
zero.services.comment
Works with the comment widget to enable users to post a comment on an item.
zero.services.rating
Works with the rating widget to enable users to rate an item with a 1 to 5 rating.
zero.widgets.comment
Works with the comment service to provide the ability to display and create comments about an item.
zero.widgets.rating
Works with the rating service to enable users to apply a rating to an object.

Installing Catalog Zero

You can either download Catalog Zero from the command line interface or from SVN into Eclipse.

Downloading from the Command Line Interface

From your Zero home directory, run the following:
zero install zero.catalogApp

The new zero.catalogApp application directory is created.

Downloading from Subversion (SVN) into Eclipse

To download the Project Zero source code from Subversion into Eclipse, check out the the zero.catalogApp project as a new Eclipse project from the SAMPLES tree in SVN.

Setting up the database

You can use either Eclipse (MySQL) or the command line interface to set up your database.

Setting up the database in Eclipse (MySQL)

To set up a database with Eclipse, use the following steps:

  1. Copy the MySQL connector jar file (<MySQL-Tools>/java/lib/mysql-connector-java-x.y.z.jar) into the zero.catalogApp/lib directory.
  2. Open the zero.catalogApp project and right click build.xml.
  3. Select Run As -> Ant Build_..._. (There are two Ant Build options, so make sure you select the one with the ellipsis.)
  4. Uncheck any existing options and check create-mysql.
  5. Open the Properties tab of the Ant Build dialog and uncheck Use global properties.
  6. Add a property named user with the value root.
  7. If you have set a MySQL root password, add a property named password with the value being the MySQL root password.
  8. Click OK. The script will attempt to connect to the database using the credentials provided and set up the database with all the required tables.
warningIf there are any errors, drop the database before attempting to try again. This can be done using the delete-mysql Ant target.

Setting up the database using the command line interface

To set up the database with the command line interface, use the following steps:

  1. Copy the MySQL connector jar file (<MySQL-Tools>/java/lib/mysql-connector-java-x.y.z.jar) into the zero.catalogApp/lib directory (if it is not already there).
  2. From the zero.catalogApp directory, run the following:
zero create-mysql -user root -password rootpassword -debug

warningIf there are any errors, drop the database before attempting to try again. This can be done using the delete-mysql command.

Using the Catalog Zero Ivy repository

To configure Project Zero to use the Catalog Zero Ivy repository, use the following steps:

  1. See the Dependencies article on remote repositories to configure a new remote Ivy repository.
  2. Add the new Zero repository http://localhost:8084/repository/ to your remote repository chain.

This sets Ivy to search the catalog repository when it resolves dependencies.

Running Catalog Zero

You can run Catalog Zero in either Eclipse or using the command line interface.

Running Catalog Zero in Eclipse

To run Catalog Zero in Eclipse, use the following steps:

  1. To run zero.catalogApp, right click on the project and select Run As->Project Zero Application.
  2. The catalog runs on port 8084, so go to one of the following locations to use the Web interface:
  • http://localhost:8084/index.html
  • http://localhost:8084/indexDebug.html

Running Catalog Zero using the command line interface

To run Catalog Zero using the command line interface, use the following steps:

  1. Change into the zero.catalogApp directory.
  2. Type
    zero run
    .
  3. The catalog runs on port 8084, so go to the following location to use the Web interface:
  • http://localhost:8084/index.html

Using Catalog Zero

The Catalog Zero Web interface is designed to be intuitive as the following graphic shows.

CatalogHome.JPG

If you don't find it to be intuitive, please let us know in the Development forum! However, the following sections of this article provide instructions to get started.

Browsing packages

Anyone can browse the contents of the catalog. By default, the latest versions of all available packages are listed on the catalog home page. If the list is too long, it can be searched or filtered. Searching searches the package names and descriptions for the values entered in the Search field. The list can also be filtered by clicking on one or more of the choices in the Filter List. Filters are also accessible from the little icon to the right of the list headings. Filters or search results can be removed by clicking *Show All" in the right side menu.

Click Show Description, to see more details on the package. You can also see download instructions for a package by clicking the Get it Now button.

Clicking a package name opens a new page with more detail about the package.

Downloading packages

To download a package, click the Get it Now button, either in the package details on the catalog home page or on the package's Details page. Instructions to download the file and its dependencies using Ivy dependency resolution are provided.

Rating and commenting

To rate or comment on a package, you must sign in as a registered user. Catalog Zero uses the Project Zero file-based user security service. Users are configured in the /CatalogApp/config/zero.users file. See the File-based user service article for information on adding additional users. For test purposes, you can sign in using the ID test and password password.

To rate a service, click on the number of reviews beside the stars. The number of stars can then be selected by clicking and dragging the mouse.

Comments can be added from the Details page of a package. Click on the Comments tab beside the package description.

Uploading packages

To upload packages, you must sign in as an authorized user. Catalog Zero uses the Project Zero file-based user security service. Users are configured in the /CatalogApp/config/zero.users file. See the File-based user service article for information on adding additional users. To have upload authority, a user must be in the IBM group. For test purposes, you can sign in using the ID brett and password password.

To upload a package, you first have to create one. See the Packaging to publish section of the Dependencies article in the Core Developer's Guide for information on creating packages.

info Note: Currently, the catalog only supports uploading .zip files.

Once you have created a package, you can upload it by signing in to the catalog and clicking Upload Package in the upper right of the catalog home page. Find your package file (probably in the export directory of your application) and click Upload. The file is uploaded, and information is extracted from the ivy.xml file of the package to prepopulate the catalog entry. You can change the package summary and description. When ready, click OK. Your package is now available for others to browse and download.

Uploading new releases

When you have a new release, change the revision in your ivy.xml file and create a new package. Upload this new package, and Catalog Zero automatically detects that you are adding a new release to an existing package. Enter some release notes and click OK to share the new release. The new release is automatically listed on the home page.

r17 - 08 Feb 2008 - 02:01:46 - steveims
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site