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 theFactory.MetadataCache
class. This cache is also used internally. Metadata caching is enabled by default; to disable it, set theConfigurationParameter.CLIENT_METADATA_CACHE
instance toBoolean.FALSE
.- See Also:
ConfigurationParameter
-
-
Method Summary
Methods Modifier and Type Method and Description void
clear()
Removes all entries currently resident in the metadata cache.void
clear(Connection conn)
Removes all entries currently resident in the metadata cache.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
isEnabled()
TheMetadataCache
is enabled by default for Content Engine clients and disabled by default for the Content Engine server.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
- AnInstantiatingScope
object specifying the scope of the class description.classIdent
- AString
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 nevernull
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
- AnInstantiatingScope
object specifying the scope of the class descriptions.classIdents
- AString
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
- AnEngineObject
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
- AnEngineObject
object.classIdent
- AString
specifying the name or GUID string of the class.- Returns:
true
if the object specified byeo
is 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
- AClassDescription
object.classIdent
- AString
specifying the name or GUID string of the class.- Returns:
true
if the class description specified bycd
describes 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
- AConnection> object.
-
isEnabled
boolean isEnabled()
TheMetadataCache
is enabled by default for Content Engine clients and disabled by default for the Content Engine server. This method provides a simple way for applications to detect whether theMetadataCache
is enabled at any point in time.- Returns:
true
if theMetadataCache
is enabled; otherwise, returnsfalse
.
-
-