Skip Headers

Oracle Internet File System Developer Reference
Release 9.0.1.1.0

Part Number A90093-02
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

1
Getting Started with the Oracle Internet File System SDK

This chapter provides an overview of the requirements for writing an application based on the Oracle Internet File System (Oracle 9iFS) software development kit. You should read this chapter first, then branch out to learn the specifics of different application components and tasks. In addition, Chapter 2, "The Anatomy of Oracle 9iFS", is critical for its detailed overview of the Oracle 9iFS architecture from a developer's perspective. Equally important is Chapter 3, "Java API Overview", which provides an overview of the Java API that is central to Oracle 9iFS applications.

Topics include:

Development Skills

Writing an Oracle 9iFS application requires some combination of the following skills:

Required Skills

  1. Installing, configuring, and administering the Oracle9i database. You need to be able to install and manage the Oracle9i database, the repository for the file system. Only basic database administration skills are required, however.

  2. Installing, configuring, and administering Oracle 9iFS. Whether you install Oracle 9iFS as part of the Oracle9i database or the Oracle9i Application Server, you also need to be able to install and manage the Oracle 9iFS components. Wherever you install Oracle 9iFS --on the same machine as the database or on a middle-tier machine--is where you will also be hosting many of your application components. Intermediate Oracle 9iFS administration skills are required, particularly when troubleshooting issues during the development process.

  3. Programming in Java. Most application components require some Java skill.

Optional Skills

  1. Writing XML configuration files. For many application development tasks, such as creating application users or registering parsers, you can write XML configuration files. Editing these configuration files requires knowledge of the XML syntax for 9iFS system configuration.

  2. Developing servlets or Java Server Pages. To write a custom web user interface, you need a combination of Java and HTML skills--Java to call the Oracle 9iFS API, and HTML to design the pages that form your web user interface.

  3. Querying database contents through SQL. If you want to create a custom view to query the contents of the Oracle 9iFS schema, you need both Java and SQL skills.

  4. Performing DDL and DML operations through SQL. If you are embedding your own data definition (DDL), data manipulation (DML), or transaction processing (TPL) operations in your Java code, you need both Java and SQL skills. For more information on this feature, see Chapter 16, "Managing Sessions and Transactions".

Development Roles

Not everyone on your development team needs to master all of these skills, however. As the size of your development team grows, so, too, does the ability for different team members to specialize in different development roles. Some common specializations include:

This division of labor is important for determining which components of the Oracle 9iFS SDK a developer needs to learn. While the architect needs a broad understanding of the SDK and its capabilities, a web user interface designer need only know how the HTTP protocol server works, where to deploy the servlet and JSP code, and how to call the Java API in whatever beans the developer writes.

Tools for Oracle 9iFS Development

To write applications for Oracle 9iFS, we recommend you have the following tools available to you:

Documentation

Several important documentation resources are installed with Oracle 9iFS.

Core Documentation

The jumping-off point for the Oracle 9iFS documentation is in the following directory (as measured from Root):

\ifs\doc\9iFS\index.htm 
Table 1-1 Oracle 9iFS Core Documentation

Documentation  Description 

Oracle 9iFS Developer Reference 

The manual you are currently reading. 

Oracle 9iFS Javadoc 

The Java API reference. 

Oracle 9iFS Setup and Administration Guide 

Instructions on running and managing Oracle 9iFS instances. Critical information for a developer, especially during testing and deployment. 

Oracle 9iFS XML Reference 

The reference to XML configuration files. 

Oracle 9iFS Releas 

Last-minute notes on the current product release, possibly including developer issues. 

The Oracle Technology Network

In addition, the Oracle Technology Network (OTN) is a central publishing site for additional technical collateral about Oracle 9iFS and other Oracle products. The Oracle 9iFS section of OTN includes the following:

Related Documents

This guide refers to the following user guides and reference manuals:

Table 1-2 List of Related Documents

Documentation  Description 

Oracle Oracle9i interMedia Text Reference 

Provides information on configuring and using Oracle interMedia Text, a text search fully integrated in the database. 

Oracle9i Distributed Database Systems 

Provides information on configuring a remote database. 

Oracle9i Installation Guide 

Provides instructions on installing and upgrading to the Oracle9i Database Server. 

Oracle9i Administrator's Guide 

Provides information on managing and tuning the database and information on tablespace sizing. 

Why Choose the Oracle 9iFS SDK?

Broadly speaking, there are several reasons why you might base your applications on this development platform:

  1. Pre-built content management components. Many of the content management features--versioning, content-based searching, extensible metadata, check-in/check-out, locking--used in a wide array of applications are pre-built, re-usable components in Oracle 9iFS, saving you the time needed to write and test these pieces.

  2. Database storage. Since Oracle 9iFS uses the Oracle9i database as its repository for the file system, the features and capabilities that the database provides--for example, scalability to terabytes of content and thousands of users--are also available to anyone using Oracle 9iFS. Storing content in the database also lets Oracle 9iFS and your applications use database features like Oracle Text, the text indexing and retrieval engine in the Oracle9i database.

  3. Server-side logic. To enforce business rules or application logic, you need to create server-side intelligence that is currently not built into other file systems. While such server-side logic is difficult (if not impossible) to implement on other file servers, it is relatively easy to implement on Oracle 9iFS.

  4. Built-in protocol access to the same content and server-side application components. Oracle 9iFS comes with several protocol servers--SMB, HTTP, WebDAV, FTP, NFS, and IMAP4--that all provide access to the same files and folders. The same application logic will apply to file system operations (insert, delete, update, and so forth), regardless of the protocol used to access the server.

  5. Parsing and rendering of content. Oracle 9iFS includes in its SDK a generic parsing and rendering framework.

  6. XML capabilities. Because of the popularity of XML as a structured data format, Oracle 9iFS also includes a default XML parser and renderer, plus XML features like DTD validation.

  7. Heterogeneous file data. Oracle 9iFS was designed to store any type of file, including content normally stored in separate kinds of repositories (for example, XML and e-mail).

  8. Files and relational data. Since the database is the repository for the file system, Oracle 9iFS makes it possible to write applications that easily bridge these two worlds, while at the same time simplifying both development and administration by storing both types of content on the same server.

  9. A standards-based SDK. Since the Oracle 9iFS SDK requires only Java and, perhaps, XML, HTML, or SQL to use, you can use the skills you have already acquired in programming in these languages.

  10. Complete transparency to end users. Last of all, the file system looks and acts like any file server that your users already know. Therefore, all their applications work automatically with Oracle 9iFS, and they do not need to learn any special skills to connect to the server via any of the network protocols.

Customizations or Applications?

Development with the Oracle 9iFS SDK can run the gamut from customizing how the file system behaves or presents data in particular instances to complete applications with their own set of custom user interfaces, application logic, and other components. In other words, a single development project can range from the very small to the very large, depending on your objectives.

A customization builds on Oracle 9iFS as a file server. It may change file system behavior in some circumstances (for example, changing the way the delete operation works (see Chapter 17, "Customizing Content Type Behavior"), or it may change how the system presents data to the user (for example, by implementing a custom renderer for some types of XML content). However, the point of this kind of development project is to modify the file server, not to replace it.

In contrast, many large-scale applications do away with the "file server application" altogether. These applications may only run one or two protocol servers (generally HTTP for web application access and, perhaps, FTP for mass upload and download of content). The authors of these applications want the Oracle 9iFS SDK more than they want the file server, since they can then easily work beyond the assumptions that the protocol servers need to follow.

This manual is written for both types of developers: those interested in customizations, as well as those who want to build applications that may or may not use the Oracle 9iFS protocol server and the out-of-the-box web interface.

How Many Applications?

One of the chief advantages of the Oracle 9iFS SDK is the ease with which you can develop and host multiple applications on the same server. The same content, consolidated on a single Oracle 9iFS server from multiple legacy file servers, can be the target of multiple applications and customizations. For example, files that were managed by a digital asset management system written for Oracle 9iFS can then be staged for your web site through a web content management system deployed on the same file server.

The Java API

The single most important aspect of the Oracle 9iFS SDK you can learn is the Java API. Since Oracle 9iFS is written in Java, the object hierarchy behind this file system is exposed to you, the developer. All the objects that form the file system -- documents, folders, users, groups, attributes, and so forth -- exist as Java objects. These standard classes include methods that you can call in your Java code.

Before writing any Java code, you should review the API overview chapter in this manual. Successful development with the Oracle 9iFS SDK depends on understanding not only individual Java objects, but also how these objects relate to one another. For example, a user in Oracle 9iFS terms actually consists of a DirectoryUser object as well as other Java objects. To learn about the Java API, see Chapter 3, "Java API Overview".

Basic and Advanced Development Tasks

This manual classifies development tasks into basic and advanced. Basic tasks are those that you are most likely to perform when writing Oracle 9iFS applications, such as subclassing. Basic tasks often require less technical expertise to perform. Advanced tasks, in contrast, are both less common and more demanding.

Table 1-3 summarizes basic and advanced Oracle 9iFS development tasks:

Table 1-3 Basic vs. Advanced Development Tasks for Oracle 9iFS

Basic  Advanced 

Subclassing

Writing a servlet-based web user interface

Writing a JSP-based web user interface

Using the API to perform searches

Applying and populating custom attributes

Developing an agent

Working with XML

Writing a custom parser 

Writing a custom renderer

Developing an override

Executing SQL or PL/SQL within the Oracle 9iFS transaction context

Creating a custom view on Oracle 9iFS tables 

Maintaining Oracle 9iFS Applications

A single Oracle 9iFS system may be home to several customizations and applications. You therefore need to back up both the file system contents and your application components.

Because you may need to re-create the application components on an Oracle 9iFS instance, or you may need to install the same application on multiple middle-tier machines. We strongly recommend that you script the installation of your application components. Scripts can deploy components on the file system where Oracle 9iFS is running. They can also insert components into Oracle 9iFS, both through standard protocols, like FTP, as well as the special protocol, CUP.

The Oracle 9iFS Development Environment

Chapter 2, "The Anatomy of Oracle 9iFS" provides a complete overview of the Oracle 9iFS architecture. However, this section quickly summarizes the components of an Oracle 9iFS application, as well as provides advice on when to use each type of component.

Oracle 9iFS Application Components

An Oracle 9iFS application can consist of some or all of the following components. The skills needed to write and deploy each component are noted for each application component.

Which Component to Use?

Just looking at the previous list, however, may not make it immediately obvious which components you need to use when performing a particular task. Table 1-4 summarizes the components needed to achieve common development goals:

Table 1-4 Components Needed to Achieve Development Goals

Task  Components 

Applying arbitrary metadata to any file or folder 

Categories 

Applying the same metadata to a particular file format 

Subclasses, value defaults 

Responding to an event 

Agents, overrides 

Extracting metadata encoded into a file 

Subclasses, parsers 

Associating a parser with a particular file format 

Subclasses, parsers 

Changing the way Oracle 9iFS displays a document 

Subclasses, renderers 

Building a custom web user interface 

Servlets, JSPs 

Associating a custom web user interface with a particular type of content 

Subclasses, JSPs 

Altering the behavior of a file system operation 

Overrides 

Performing asynchronous tasks 

Agents 

Executing SQL commands within an Oracle 9iFS operation 

Overrides 

Your development project may include only some of these components.

System Configuration Files

Oracle 9iFS uses two types of system configuration files:

  1. Files stored in the external file system. These plain text files use a proprietary format (.ADM and .DEF) for storing configuration settings. Generally, these files determine how the protocol servers and other Oracle 9iFS application components run; they do not customize the object hierarchy in Oracle 9iFS. These files are stored in the /settings subdirectory of the directory in which Oracle 9iFS is installed.

  2. XML files inserted into Oracle 9iFS. These files must follow a specific syntax that the Oracle 9iFS XML parser understands. These files often create or modify objects in the Oracle 9iFS SDK, such as setting the attributes on a folder or creating a new user.

Note that Oracle 9iFS now stores less configuration information in the file system where the Oracle 9iFS application components are installed than in previous versions of the Oracle Internet File System. For more information on configuring Oracle 9iFS, see the Oracle Internet File System Setup and Administration Guide.

Which Tool for which Component?

As you can see, whenever you perform a development task, you frequently can choose among writing Java code, creating an XML configuration file, or using the Oracle 9iFS Manager to perform the customization. However, you cannot use all three of these tools for all development tasks. In many cases, your choices may be limited to one or two of these tools.

Table 1-5 summarizes the tools available for developing each of these application components.

Table 1-5 Tools for Developing Application Components

Task  Java  XML  9iFS Manager 
Subclasses 

 

 

 

Creating subclasses 

Adding custom attributes to subclasses 

Adding custom methods to subclasses 

 

 

General custom attributes 

 

 

 

Creating a category 

 

Applying a category to an object 

 

 

Setting attribute values in an object 

 

Class-specific custom attributes 

 

 

 

Adding an attribute to a subclass 

Adding an attribute to all instances of a standard class 

 

Parsers 

 

 

 

Creating parsers 

 

 

Registering parsers 

Associating a parser with a subclass 

Renderers 

 

 

 

Creating renderers 

 

 

Registering renderers 

Associating renderers with a subclass 

Servlets 

 

 

 

Creating a servlet 

 

 

Java Server Pages 

 

 

 

Creating a Java server page (JSP) 

 

 

Associating a JSP with a subclass 

Agents 

 

 

 

Creating an agent 

 

 

Registering an agent 

 

 

Overrides 

 

 

 

Creating an override 

 

 

Custom views 

 

 

 

Creating a custom view 

 

 

Deploying Your Application

Once you develop your application components, you need to deploy them. Table 1-6 summarizes where you store these components:

Table 1-6 Deployment Locations for Application Components

Component  Where deployed   Required directory  Recommended directory 
Java beans  File system    /custom_classes 
Parsers  File system    /custom_classes 
Renderers  File system    /custom_classes 
JSPs  Oracle 9iFS  /ifs/jsp-bin   
Servlets  File system    /custom_classes 
ADM, DEF files  File system  /settings   
XML configuration files  Oracle 9iFS  none  none 
Agents  File system    /custom_classes 
Overrides  File system    /custom_classes 

In Table 1-6, the entry File system under Where deployed means that you deploy the application component in the same file system where Oracle 9iFS is deployed. The required and recommended directories are subdirectories of the directory where Oracle 9iFS is installed. The entry, Oracle 9iFS, on the other hand, means that you can deploy the application component by inserting it into Oracle 9iFS (for example, by uploading an XML file through FTP).

As you can see, the /custom_classes directory is designed for storing Java application components. You can deploy these components in a different directory; however, you may then need to modify your CLASSPATH settings to include this additional directory. For more information on setting the CLASSPATH, see "CLASSPATH Configuration".

Restarting After Customization

Deploying an application component may require restarting the Oracle 9iFS server processes. Oracle 9iFS maintains several caches which may not be immediately refreshed when you deploy one of these components. Additionally, changes to system settings may not apply until you have restarted the protocol servers. For instructions on starting and stopping the Oracle 9iFS Java processes (the repository, protocol servers, and agents), see Chapter 2, "Administering an Oracle 9iFS Domain, in the Oracle Internet File System Setup and Administration Guide.

Table 1-7 summarizes whether you need to restart any Oracle 9iFS processes after deploying an application component.

Table 1-7 Processes that Must Be Restarted After Component Deployment

Component  Processes to restart 

Extensions to standard classes 

All 

Subclasses 

All 

JSPs 

None 

Servlets 

HTTP 

Parsers 

All 

Renderers 

All 

Agents 

None 

Overrides 

All 

Protocol server settings 

The protocol server affected 

The Command-Line Utilities Protocol Server (CUP)

Oracle 9iFS includes a special protocol server, CUP, designed for both administrators and developers to use. Through CUP, you can invoke many Oracle 9iFS commands, such as viewing extended attributes, that are not part of FTP or other protocol servers. CUP is useful both when you do one-off prototyping tasks as well as executing scripts to deploy or update application components.

For information on running CUP, see Appendix A: "Command Line Utilities Reference," in the Oracle Internet File System Setup and Administration Guide.

Configuring Your Development Environment

General Configuration

When writing any Java code for Oracle 9iFS, you need to edit your JDK and JRE settings to work with the Java class archives (.JAR files) required for Oracle 9iFS development. Table 1-8 summarizes the required settings:

Table 1-8 General Configuration Settings

Parameter   Setting 

CLASSPATH 

Must be able to discover and change CLASSPATH settings.

Using JDK 1.2 or 1.3, find information at the following sites:

java.sun.com/products/jdk/1.2/docs/tooldocs/solaris
java.sun.com/products/jdk/1.3/docs/tooldocs/solaris
java.sun.com/products/jdk/1.2/docs/tooldocs/win32
java.sun.com/products/jdk/1.3/docs/tooldocs/win32

Using JDK 1.2 for both Solaris and NT:

java.sun.com/products/jdk/1.2/docs/tooldocs/tools.html
 

JAVA_HOME 

The directory in which the JDK resides. 

JDK 

JDK installed and configured correctly. Consult:

java.sun.com/j2se
 

Oracle JDBC Driver  

Location: <ORACLE_HOME>/jdbc/lib

JDK 1.1: classes111.zip
JDK 1.2: classes12.zip

JDK 1.3: classes13.zip 

ORACLE_HOME 

The directory in which the Oracle software resides. 

Oracle Libraries 

Location of the Oracle libraries. NT: Set PATH to include <ORACLE_HOME>/bin
Solaris: Set LD_LIBRARY_PATH to <ORACLE_HOME>/lib  

Configuration Files 

Application definition and session properties files.  

Oracle Internet File System JARs 

Libraries required by Oracle 9iFS.  

CLASSPATH Configuration

You also need to set some specific elements of the CLASSPATH used by the JDK and JRE:

Table 1-9 Classpath Configuration Settings

CLASSPATH Element  Setting 

<ORACLE_HOME>/9iFS/settings
<ORACLE_HOME>/9iFS/lib/repos.jar
<ORACLE_HOME>/9iFS /lib/utils.jar
<ORACLE_HOME>/9iFS /lib/adk.jar
<ORACLE_HOME>>9iFS /lib/release.jar
<ORACLE_HOME>>9iFS /lib/email.jar
 

These are required Oracle Internet File System libraries.

 

<ORACLE_HOME>/lib/xmlparserv2.jar

 

In Oracle9i, this library resides in <ORACLE_HOME>/lib 

<ORACLE_HOME>/jdbc/lib/<JDBC_DRIVER> 

The JDBC driver for your environment. 

<ORACLE_HOME>/jsp/lib/ojsp.jar 

.  

JDK/JRE Certification

Note that the Oracle 9iFS SDK is certified for use with only specific versions of the Sun JDK and JRE. For a list of the certified versions, consult Chapter 2, "Preinstallation," of the Oracle Internet File System Installation Guide. You should also consult the release notes for any updates to JDK/JRE certification.

Oracle 9iFS Application Examples

To illustrate the different components of the Oracle 9iFS SDK in action (and to help you scope your own projects), here are four sample applications. Note that we have provided some examples of the sorts of implementation decisions a developer might take with these sorts of applications. By no means are these decisions the only ones possible; in fact, the flexibility the Oracle 9iFS SDK gives you when making these sorts of implementation decisions is one of the great strengths of this platform.

Notifying Users of Changes

Suppose your users want to have a special directory in Oracle 9iFS for shared documents. Whenever the contents of the directory change (in other words, when someone adds, deletes, or updates a file), the users want to receive an e-mail notifying them of the change.

From an Oracle 9iFS perspective, this is a relatively simple application. To create this functionality, you can tap into the agent framework for Oracle 9iFS, adding a new agent that maintained a list of the directory contents, regularly checks to see if the contents had changed, then notifies the members of the e-mail list when it detects a change.

Writing the application would entail the following steps:

  1. Create the Oracle 9iFS users. Assuming these users were not already defined as Oracle 9iFS users, you first need to create them through the Oracle 9iFS Manager (an extension to the Oracle9i Enterprise Manager administrative interface) or through XML configuration files. Actually, the users who receive the e-mail need not be Oracle 9iFS users at all: the agent can use the Oracle 9iFS SMTP server to send an e-mail to any mail server. The users then need to access the directory in Oracle 9iFS through the guest account if they do not have their own 9iFS accounts.

  2. Write the agent. The agent is a Java application that makes calls to the Oracle 9iFS Java API. In this case, the agent calls the API to review the contents of the directory and compare the current contents to a file listing the original contents.

  3. Deploy the agent.

  4. Register the agent.

  5. Make sure the SMTP process is running.

  6. Change the security on the directory to ensure that no one can delete it.

Content Management System

Your company wants to implement an internal web site. However, it does not want the overhead of an expensive, difficult-to-maintain web content management system. Instead, it would rather build a simple application on top of the file server that everyone shares. The company also wants to keep a careful eye on this project, since it has other kinds of content management applications planned for the future.

The point of the content management system is to author and stage content in Oracle 9iFS. The application could publish the web site in place, simply by changing the access control list (ACL) for all the site's content to Published, thereby making it world-readable. Some web site administrators might prefer, on the other hand, to stage the web site in Oracle 9iFS, then copy the staged content to a live web server.

Whichever approach the development team and the web site administrator choose to take, implementing this application looks largely the same:

  1. Define the category needed to track the status of content for the web site.

  2. Create the directories used to stage content.

  3. Create the Review sub-directory under every user's Home directory.

  4. Write the agent that links content for review to a user's Home directory/

  5. Write the beans behind the web user interface.

  6. Design the web user interface.

  7. Convert the HTML pages into either Java Server Pages (JSPs) or servlets.

XML-Based Insurance Claim System

A hypothetical insurance company has made the decision to standardize all insurance claims as XML files. Each claim conforms to an industry-standard DTD (Document Type Definition), so all elements are well understood. What is critical about this switch to XML is the opportunity to mine the XML for business intelligence. However, the analysis tools the company uses are written for relational data, not for XML. Fortunately, through parsing, Oracle 9iFS presents a way to convert file-based XML content into relational data.

Implementing this insurance claim system requires the following steps:

  1. Create a subclass based on the DTD. The subclass includes a document attribute corresponding to each element from the XML file you want to parse.

  2. Decide whether you want to validate XML content based on the DTD. See Chapter 10, "XML and the Oracle Internet File System" for details on how to enable DTD validation.

  3. Associate this subclass with the XML parser.

  4. Design a JSP for viewing the XML on the web.

  5. Write the beans behind that the JSP calls.

  6. Associate the subclass with the main JSP.

  7. Create a custom view based on the parsed XML content. The view joins the content in the base table used to store all documents and their common attributes, ODM_DOCUMENT, as well as the table Oracle 9iFS created to store the parsed attributes.

Additional features for this application are easy to imagine. For example, you might write an agent that looks at the total dollar amount of each claim and alerts investigators about any claims over a specific amount. The XML content might be rendered in a more human-readable form for users accessing it through a web application.

Document Repository

A document repository needs only a few extra features above what Oracle 9iFS provides out of the box. A sample document repository might need categories (for example, BookInformation, JournalInformation, and so forth). Users may be required to enter settings for these categories' attributes before other users can see the files they have uploaded. You may want to design a custom search web page that combines content-based searching with category searches. Other web pages would let you browse categories and see all files that fall under a particular setting (for example, all books that are Westerns).

This project requires following steps:

  1. Define the categories for use in the document repository.

  2. Develop an agent that sets the ACL for a file to Private (in other words, visible only to that user) until the user who uploaded the file enters the required attribute settings. The same agent would then set the ACL to Published, making it world-readable.

  3. Build the custom web user interfaces needed to perform content and category searches.

Changing the Way Delete Works

In many organizations, document retention requirements or other business rules make it necessary to prevent users from ever actually deleting a file. In the most extreme examples, every version of every file needs to be somehow maintained, so that regulatory agencies can completely reconstruct a paper trail if necessary. In others, an administrator or manager needs to review a document first before it is purged from the system, but the document doesn't necessarily need to be stored in perpetuum.

Clearly, this requirement--effectively changing how the delete operation works in a file system--is no small feat in a standard file system. In Oracle 9iFS, however, modifying the delete operation requires a single override to complete.

Sample Code Provided with Oracle 9iFS

For your reference, the Oracle 9iFS product installation includes a directory, /Samples, that includes a large amount of sample code. In addition, throughout this manual, you will see inline examples of Oracle 9iFS Java and XML code.

Table 1-10 summarizes the sample code located in the Samples subdirectory of your Oracle 9iFS installation. Note that the Utilities classes cited are helper classes used in other examples, so you may need to review both the helper class and its associated classes to fully understand how the example works.

Table 1-10 Sample Code Provided with Oracle 9iFS

Name  Description 

Utilities 

 

BaseUtilities.java  

This is the base class from which all utility classes inherit. It has basic methods such as getting a session, getting an object's name, and freeing objects. It also sets administration mode and impersonates a user. Both these tasks can only be performed by an administrative user. 

LoggerConstants.java  

An interface that defines the different logging levels: off, low, medium (default), and high. 

Logger.java  

Does the actual logging. 

AclUtilities.java 

Manages access control lists (ACLs) through manipulating access control entries (ACEs). Revokes and grants access, updates and removes ACEs. 

ClassObjectUtilities.java  

Performs tasks that can only be done by an administrative user. Manages the SchemaObjects, ClassObjects and Attributes to create and delete custom classes. Also creates ValueDefaults. 

DocumentUtilities.java 

Creates documents from a file on the local hard drive, copies documents and updates a document's content. 

FolderUtilities.java 

Creates a folder, finds a folder given a path, shows a sorted list of a folder's items, returns the number of items in a folder. 

GroupUtilities.java 

Create a group, adds and removes members from a group, shows all the members of a group and returns whether a user or group is part of a specified group. 

PropertyBundleUtilities.java 

Create a PropertyBundle, adds and removes properties from a PropertyBundle, shows all the properties of a PropertyBundle 

PublicObjectUtilities.java  

Adds a category to the PublicObject, sets the ACL on the PublicObject and shows the name and description of a PublicObject. 

SearchUtilities.java 

Creates and executes a search. The search can be based on attributes, content or a folder tree. All qualifications are applied (in other words, all criteria are joined by the AND operator). 

SelectorUtilities.java 

Creates and executes a selector, a simple search based on a single class. 

UserUtilities.java  

Performs some tasks that can only be done by an administrative user. Creates and frees DirectoryUsers, shows a user's PrimaryUserProfile and updates a user's password.  

VersioningUtilities.java 

Versions a document. 

Samples 

 

BaseSample.java  

The base class from which all sample classes inherit. Starts a service, establishes and disconnects a session. Also maintains a vector of objects that a sample creates. At the end of each sample, it cleans up the session by freeing all the objects in the vector. The schema returns to its state before the sample was run. 

GlobalSetup.java 

Run this class once before running any other samples. GlobalSetup.java creates the basic Oracle 9iFS objects needed by the other samples. Creates SampleUser1 (admin), SampleUser2 - 5. Creates the folder tree /ifs/examples/api. Creates Report, a subclass of Document. Creates a category, UnderReview. Creates the seed documents needed for the search samples. You must have Oracle Text installed and running to index the documents for searching. 

GlobalCleanup.java 

Run this class after you have finished running the samples. This class frees the Oracle 9iFS objects created in GlobalSetup.java. 

CreateTextFiles.java 

Creates the seed documents needed for the search samples. Run this before you run the search samples. You will also need to have Oracle Text installed and running to index the documents. 

DeleteTextFiles.java 

Frees the documents needed for the search samples. 

AclSample.java 

Creates and modifies ACLs.  

CategorySample.java 

Creates documents with categories, a type of custom attribute that can be applied to all files and folders. 

ContextSearchSample.java 

Creates and executes context searches. 

CreateLargeGroups.java 

Creates a group, demonstrating how to use Oracle 9iFS transactions. 

DocumentSample.java 

Creates documents and Report, a subclass of document. 

FolderSample.java 

Creates a folder tree and populates it. 

GroupSample.java 

Creates a group and adds users and groups to it.  

PropertyBundleSample.java 

Creates a PropertyBundle, then adds, updates, and removes properties from it. 

SearchSample.java 

Creates and executes an attribute search. This example creates a SearchObject, shows the SQL generated from a search. 

SelectorSample.java 

Creates and executes selector searches. 

UserSample.java 

Creates a user and modifies the User Options hashtable defaults. 

VersioningSample.java 

Versions a document. 

ViewsSample.java 

Creates a view from a search. 

Note that these examples are for your edification only. They are not designed to be actual reusable application components.

Running the Examples

If you want to run these samples, execute GlobalSetup.java first. After you have finished, execute GlobalCleanup.java to return Oracle 9iFS to its state before running the examples.


Go to previous page Go to next page
Oracle
Copyright © 2001 Oracle Corporation.

All Rights Reserved.
Go To Table Of Contents
Contents
Go To Index
Index