com.filenet.api.meta
Interface MetadataCache
-
public interface MetadataCacheRepresents 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 theFactory.MetadataCacheclass. This cache is also used internally. Metadata caching is enabled by default; to disable it, set theConfigurationParameter.CLIENT_METADATA_CACHEinstance toBoolean.FALSE.- See Also:
ConfigurationParameter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidclear()Removes all entries currently resident in the metadata cache.voidclear(Connection conn)Removes all entries currently resident in the metadata cache.booleandescribedIsOfClass(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).ClassDescriptiongetClassDescription(EngineObject eo)Returns the class description for a given object.ClassDescriptiongetClassDescription(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.booleanisEnabled()Indicates whether theMetadataCacheis enabled at any point in time.booleanobjectIsOfClass(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- AnInstantiatingScopeobject specifying the scope of the class description.classIdent- AStringspecifying the name or GUID string of the class.- Returns:
- A
ClassDescriptionobject.
-
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 nevernulland 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- AnInstantiatingScopeobject specifying the scope of the class descriptions.classIdents- AStringarray specifying the class names or GUID strings of the class descriptions.- Returns:
- An array of
ClassDescriptionobjects.
-
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- AnEngineObjectobject.- Returns:
- A
ClassDescriptionobject.
-
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- AnEngineObjectobject.classIdent- AStringspecifying the name or GUID string of the class.- Returns:
trueif the object specified byeois instantiated from the class specified byclassIdent; otherwise, returnsfalse.
-
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- AClassDescriptionobject.classIdent- AStringspecifying the name or GUID string of the class.- Returns:
trueif the class description specified bycddescribes the class or subclass identified byclassIdent; otherwise, returnsfalse.
-
clear
void clear()
Removes all entries currently resident in the metadata cache.
-
clear
void clear(Connection conn)
Removes all entries currently resident in the metadata cache. If you are using the API cross-release classloading feature, your should use this signature.- Parameters:
conn- AConnectionobject.
-
isEnabled
boolean isEnabled()
Indicates whether theMetadataCacheis enabled at any point in time. TheMetadataCacheis enabled by default for Content Engine clients and disabled by default for the Content Engine server.- Returns:
trueif theMetadataCacheis enabled; otherwise, returnsfalse.
-
-