com.ibm.tivoli.maximo.oslc

Class FileExtensionCacheImpl

  • java.lang.Object
    • com.ibm.tivoli.maximo.oslc.FileExtensionCacheImpl
  • All Implemented Interfaces:
    MaximoCache


    public class FileExtensionCacheImpl
    extends java.lang.Object
    implements MaximoCache
    This class performs the lookup on OSLCEXTMEDIATYPE MBO data, through a cache, for file name and extension names.
    Since:
    MIF 7.5.1.2
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String forFileExtension(java.lang.String extension)
      Returns the Content type found on synonym domain MIMETYPE, for the given file extension (including '.' in front of it).
      java.lang.String forFileName(java.lang.String docFileName)
      Returns the Content type found on synonym domain MIMETYPE, for the given file name.
      java.lang.String getDefaultContentType() 
      java.lang.String getName()
      Returns the name of the cache object.
      void init()
      Initialize the cache object.
      void reload()
      Reloads the cache object.
      void reload(java.lang.String key)
      Initialize a specific component of the cache identified by the key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileExtensionCacheImpl

        public FileExtensionCacheImpl()
    • Method Detail

      • forFileName

        public java.lang.String forFileName(java.lang.String docFileName)
        Returns the Content type found on synonym domain MIMETYPE, for the given file name.
        It returns default value if file name provided is empty or null, also if there was no extension or if a lookup failed.
        Parameters:
        docFileName - the file name, may include path or not
        Returns:
        the Content Type found on Maximo domain, it defaults to defaultContentType
      • forFileExtension

        public java.lang.String forFileExtension(java.lang.String extension)
        Returns the Content type found on synonym domain MIMETYPE, for the given file extension (including '.' in front of it).
        It returns default value if extension provided is empty or null or if a lookup failed.
        Parameters:
        extension - the file extension including preceding '.'
        Returns:
        the Content Type found on Maximo domain, it defaults to defaultContentType
      • getDefaultContentType

        public java.lang.String getDefaultContentType()
      • reload

        public void reload()
                    throws MXException
        Description copied from interface: MaximoCache
        Reloads the cache object. This will be called by the app server whenever the cache needs to be refreshed. Don't call this method directly. Instead call MXServer.reloadCache(String, boolean).
        Specified by:
        reload in interface MaximoCache
        Throws:
        MXException
      • reload

        public void reload(java.lang.String key)
                    throws MXException
        Description copied from interface: MaximoCache
        Initialize a specific component of the cache identified by the key. E.g. In Maxvars, a specific maxvar can be reinitiliazed from the database. Don't call this method directly. Instead call MXServer.reloadCache(String, String, boolean).
        Specified by:
        reload in interface MaximoCache
        Throws:
        MXException
      • getName

        public java.lang.String getName()
        Description copied from interface: MaximoCache
        Returns the name of the cache object. Should be unique within the app server. This name is used to uniquely identify the cache object among all cached object for both accessing the cache object as well as refreshing the cache object. Ex. MaximoDD returns "MAXIMODD"
        Specified by:
        getName in interface MaximoCache
        Returns: