com.filenet.api.meta
Interface MetadataCache


public interface MetadataCache

Represents a client cache of the immutable metadata (class descriptions and their associated property descriptions) for all metadata objects accessed during the life of a given server connection. Using a local metadata cache decreases the time needed to access an object's immutable metadata, therefore improving the performance of client applications. Note that any independent objects that are referenced by a class description, such as choice lists, are not cached.

Only a single, default metadata cache is available for a given server connection, which you can access by calling getDefaultInstance() on the Factory.MetadataCache class. This cache is also used internally. Metadata caching is enabled by default; to disable it, set the ConfigurationParameter.CLIENT_METADATA_CACHE instance to Boolean.FALSE.

See Also:
ConfigurationParameter

Method Summary
 boolean describedIsOfClass(ClassDescription cd, java.lang.String classIdent)
          Returns whether a class description describes the class or subclass identified by a given class name or GUID string (true) or not (false).
 ClassDescription getClassDescription(EngineObject eo)
          Returns the class description for a given object.
 ClassDescription getClassDescription(InstantiatingScope scope, java.lang.String classIdent)
          Returns the class description for a given class and scope.
 ClassDescription[] getClassDescriptions(InstantiatingScope scope, java.lang.String[] classIdents)
          Returns zero or more class descriptions for a given scope and the classes specified by a class identities array, which can contain both class names and GUID strings.
 boolean objectIsOfClass(EngineObject eo, java.lang.String classIdent)
          Returns whether an object is instantiated from a class or subclass identified by a given class name or GUID string (true) or not (false).
 

Method Detail

getClassDescription

ClassDescription getClassDescription(InstantiatingScope scope,
                                     java.lang.String classIdent)
Returns the class description for a given class and scope. If the class description is not already resident, this method fetches it from the server and adds it to the metadata cache.

Parameters:
scope - An InstantiatingScope object specifying the scope of the class description.
classIdent - A String specifying the name or GUID string of the class.
Returns:
A ClassDescription object.

getClassDescriptions

ClassDescription[] getClassDescriptions(InstantiatingScope scope,
                                        java.lang.String[] classIdents)
Returns zero or more class descriptions for a given scope and the classes specified by a class identities array, which can contain both class names and GUID strings. Class descriptions not already resident are fetched from the server and added to the metadata cache. If a failure occurs while fetching a class description, the entire operation will fail. The returned array is the same size and in the same order as the class identities array; it is never null and its members are always valid class descriptions. Potentially, this operation is much more efficient than retrieving individual class descriptions because any non-resident class descriptions are fetched from the server in a single batch operation.

Parameters:
scope - An InstantiatingScope object specifying the scope of the class descriptions.
classIdents - A String array specifying the class names or GUID strings of the class descriptions.
Returns:
An array of ClassDescription objects.

getClassDescription

ClassDescription getClassDescription(EngineObject eo)
Returns the class description for a given object. If the class description is not already resident, this method fetches it from the server and adds it to the metadata cache.

Parameters:
eo - An EngineObject object.
Returns:
A ClassDescription object.

objectIsOfClass

boolean objectIsOfClass(EngineObject eo,
                        java.lang.String classIdent)
Returns whether an object is instantiated from a class or subclass identified by a given class name or GUID string (true) or not (false). Class descriptions are fetched from the server and added to the metadata cache as needed.

Parameters:
eo - An EngineObject object.
classIdent - A String specifying the name or GUID string of the class.
Returns:
true if the object specified by eo is instantiated from the class specified by classIdent; otherwise, returns false.

describedIsOfClass

boolean describedIsOfClass(ClassDescription cd,
                           java.lang.String classIdent)
Returns whether a class description describes the class or subclass identified by a given class name or GUID string (true) or not (false). Class descriptions are fetched from the server and added to the metadata cache as needed.

Parameters:
cd - A ClassDescription object.
classIdent - A String specifying the name or GUID string of the class.
Returns:
true if the class description specified by cd describes the class or subclass identified by classIdent; otherwise, returns false.


© Copyright IBM Corporation 2006, 2009. All rights reserved.