com.filenet.wcm.toolkit.server.util
Class DisplayNameUtil
- java.lang.Object
com.filenet.wcm.toolkit.server.util.DisplayNameUtil
- public class DisplayNameUtil
- extends java.lang.Object
Constructor Summary
| Constructor and Description |
|---|
DisplayNameUtil(WcmDataStore ds)
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
addDisplayName(java.lang.String id,java.lang.String displayName)
Adds a new id -> displayName pair to the cache
|
|
addShortName(java.lang.String fullName,java.lang.String shortName)
|
|
clearCache()
Clears the display name cache.
|
|
clearShortNameCache()
|
|
extractUserNames(org.w3c.dom.Document xml)
Parses the XML and returns a Set of values of user name properties.
|
|
getCacheSize()
Returns the size of the cache.
|
|
getShortName(java.lang.String fullName)
|
|
getShortNameCacheSize()
|
|
lookupDisplayName(java.lang.String id)
Called from XSL where session is not available.
|
|
lookupDisplayName(java.lang.String id,com.filenet.wcm.api.Realm realm)
Looks up a singe display name value.
|
|
lookupDisplayName(java.lang.String id,WcmDataStore ds)
Lookup the display name value.
|
|
lookupDisplayNames(org.w3c.dom.Document xml,WcmDataStore ds)
Deprecated. this is a very CPU intensive operation for large documents. If you are using this method, consider
using something else.
Looks up all display names contained in the XML document. The display name values are added to the cache.
|
|
lookupDisplayNames(java.util.Set ids,com.filenet.wcm.api.Session s,com.filenet.wcm.api.Realm realm)
Looks ups a display names for Set ids.
|
|
lookupDisplayNames(java.util.Set ids,WcmDataStore ds)
Looks up the display names for values in the ids Set.
|
|
lookupDisplayNamesFromXSL(org.w3c.dom.NodeList nl)
|
|
lookupDisplayNameSimple(java.lang.String id)
Called from code where session is not available.
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
DisplayNameUtil
- public DisplayNameUtil(WcmDataStore ds)
Method Detail
lookupDisplayNamesFromXSL
- public void lookupDisplayNamesFromXSL( org.w3c.dom.NodeList nl)
addShortName
- public static void addShortName( java.lang.String fullName,
- java.lang.String shortName)
getShortName
- public static java.lang.String getShortName( java.lang.String fullName)
clearShortNameCache
- public static void clearShortNameCache( )
getShortNameCacheSize
- public static int getShortNameCacheSize( )
clearCache
- public static void clearCache()
Clears the display name cache.
getCacheSize
- public static int getCacheSize( )
Returns the size of the cache.
Returns:
cache size
lookupDisplayName
- public static java.lang.String lookupDisplayName( java.lang.String id)
Called from XSL where session is not available. If the display name is not found, id is returned.
Parameters:
id - Returns:
display name if found, id if not found
lookupDisplayNameSimple
- public static java.lang.String lookupDisplayNameSimple( java.lang.String id)
Called from code where session is not available. If the display name is not found, null is returned.
Parameters:
id - Returns:
display name if found, null if not found
addDisplayName
- public static void addDisplayName( java.lang.String id,
- java.lang.String displayName)
Adds a new id -> displayName pair to the cache
Parameters:
id - displayName - lookupDisplayName
- public static java.lang.String lookupDisplayName( java.lang.String id,
- com.filenet.wcm.api.Realm realm)
- throws java.lang.Exception
Looks up a singe display name value. If the value is not in the cache, the method looks up the value
Parameters:
id - realm - Returns:
display name
Throws:
java.lang.ExceptionlookupDisplayNames
- public static void lookupDisplayNames( org.w3c.dom.Document xml,
- WcmDataStore ds)
- throws java.lang.Exception
Deprecated. this is a very CPU intensive operation for large documents. If you are using this method, consider
using something else.
Looks up all display names contained in the XML document. The display name values are added to the cache.
Parameters:
xml - ds - Throws:
java.lang.ExceptionlookupDisplayNames
- public static void lookupDisplayNames( java.util.Set ids,
- WcmDataStore ds)
- throws java.lang.Exception
Looks up the display names for values in the ids Set. The display name values are added to the cache.
Parameters:
ids - ds - DataStore object Throws:
java.lang.ExceptionlookupDisplayName
- public static java.lang.String lookupDisplayName( java.lang.String id,
- WcmDataStore ds)
- throws java.lang.Exception
Lookup the display name value. The value is added to the cache and returned by the method.
Parameters:
id - ds - Returns:
Throws:
java.lang.ExceptionlookupDisplayNames
- public static void lookupDisplayNames( java.util.Set ids,
- com.filenet.wcm.api.Session s,
- com.filenet.wcm.api.Realm realm)
- throws java.lang.Exception
Looks ups a display names for Set ids. The display name values are added to the cache.
Parameters:
ids - Set of ids s - Session object realm - Real object Throws:
java.lang.ExceptionextractUserNames
- public static java.util.Set extractUserNames( org.w3c.dom.Document xml)
Parses the XML and returns a Set of values of user name properties.
Parameters:
xml - Returns:
Set of user names