A resource is a named collection
of properties that exists in a repository. Some resources, such as files,
have content as well as properties. Some resources are located only on a server.
Some are located solely in a client file area. A resource cannot exist in
two different locations, but two resources might be so tightly linked that
they give that impression. For example, a file in a file area and the corresponding
file on the server are two different resources. They are related, but each
has its own location, content, and properties.
A proxy object can be used to create, modify, and ultimately destroy resources.
After a resource is created, and until it is destroyed, it persists in its
repository between invocations of the provider that modifies it.
In the Rational
® CM
API, the Resource interface is the base interface for all Rational CM
API Resource types. These are examples of resources:
- Files in a Rational ClearCase® view
- Versions in a versioned object base (VOB)
- Defects in a Rational ClearQuest® user database
The CM API proxy interfaces form a hierarchy. The root of the hierarchy
is
javax.wvcm.Resource. For example, these are some of
the interfaces that extend the Resource interface:
- StpResource extends Resource.
- CqResource and CcResource extend StpResource.
- The stp package includes StpActivity, StpFolder, and
StpRepository interfaces.
- The cc package includes CcActivity, CcAttributeType,
CcBaseline, CcBranchType, CcComponent, CcControllableFolder, CcControllableResource,
CcElement, CcElementType, CcFolder, CcFolderVersion, CcProject, CcProjectFolder,
CcVersion, CcView, CcVob, and CcVobResource interfaces.
- The cq package includes CqAction, CqAttachment, CqAttachmentFolder,
CqDbSet, CqFieldDefinition, CqForm, CqGroup, CqHook, CqProjectMember, CqQuery,
CqQueryFolder, CqQueryFolderItem, CqRecord, CqRecordType, CqReport, and CqUserDb
interfaces.
A resource has a resource type, a unique
location (in the form of a Location selector string), and a display name.
Each type of resource has a unique interface by which it is accessed.