com.filenet.wcm.toolkit.server.util

Class DisplayNameUtil

  1. java.lang.Object
  2. extended bycom.filenet.wcm.toolkit.server.util.DisplayNameUtil

  1. public class DisplayNameUtil
  2. extends java.lang.Object

Constructor Summary

Constructor and Description
DisplayNameUtil(WcmDataStore ds)

Method Summary

Modifier and Type Method and Description
  1. static
  2. void
addDisplayName(java.lang.String id,java.lang.String displayName)
Adds a new id -> displayName pair to the cache
  1. static
  2. void
addShortName(java.lang.String fullName,java.lang.String shortName)
  1. static
  2. void
clearCache()
Clears the display name cache.
  1. static
  2. void
clearShortNameCache()
  1. static
  2. java.util.Set
extractUserNames(org.w3c.dom.Document xml)
Parses the XML and returns a Set of values of user name properties.
  1. static
  2. int
getCacheSize()
Returns the size of the cache.
  1. static
  2. java.lang.String
getShortName(java.lang.String fullName)
  1. static
  2. int
getShortNameCacheSize()
  1. static
  2. java.lang.String
lookupDisplayName(java.lang.String id)
Called from XSL where session is not available.
  1. static
  2. java.lang.String
lookupDisplayName(java.lang.String id,com.filenet.wcm.api.Realm realm)
Looks up a singe display name value.
  1. static
  2. java.lang.String
lookupDisplayName(java.lang.String id,WcmDataStore ds)
Lookup the display name value.
  1. static
  2. void
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.
  1. static
  2. void
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.
  1. static
  2. void
lookupDisplayNames(java.util.Set ids,WcmDataStore ds)
Looks up the display names for values in the ids Set.
  1. void
lookupDisplayNamesFromXSL(org.w3c.dom.NodeList nl)
  1. static
  2. java.lang.String
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

  1. public DisplayNameUtil(WcmDataStore ds)

Method Detail

lookupDisplayNamesFromXSL

  1. public void lookupDisplayNamesFromXSL( org.w3c.dom.NodeList nl)

addShortName

  1. public static void addShortName( java.lang.String fullName,
  2. java.lang.String shortName)

getShortName

  1. public static java.lang.String getShortName( java.lang.String fullName)

clearShortNameCache

  1. public static void clearShortNameCache( )

getShortNameCacheSize

  1. public static int getShortNameCacheSize( )

clearCache

  1. public static void clearCache()
Clears the display name cache.

getCacheSize

  1. public static int getCacheSize( )
Returns the size of the cache.
Returns:
cache size

lookupDisplayName

  1. 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

  1. 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

  1. public static void addDisplayName( java.lang.String id,
  2. java.lang.String displayName)
Adds a new id -> displayName pair to the cache
Parameters:
id -
displayName -

lookupDisplayName

  1. public static java.lang.String lookupDisplayName( java.lang.String id,
  2. com.filenet.wcm.api.Realm realm)
  3. 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.Exception

lookupDisplayNames

  1. public static void lookupDisplayNames( org.w3c.dom.Document xml,
  2. WcmDataStore ds)
  3. 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.Exception

lookupDisplayNames

  1. public static void lookupDisplayNames( java.util.Set ids,
  2. WcmDataStore ds)
  3. 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.Exception

lookupDisplayName

  1. public static java.lang.String lookupDisplayName( java.lang.String id,
  2. WcmDataStore ds)
  3. 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.Exception

lookupDisplayNames

  1. public static void lookupDisplayNames( java.util.Set ids,
  2. com.filenet.wcm.api.Session s,
  3. com.filenet.wcm.api.Realm realm)
  4. 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.Exception

extractUserNames

  1. 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