Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKMimeTypeMgmtICM

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.DKMimeTypeMgmtICM
All Implemented Interfaces:
DKConstant, DKConstantICM, DKMessageId, DKMessageIdICM, java.io.Serializable

public class DKMimeTypeMgmtICM
extends java.lang.Object
implements java.io.Serializable, DKMessageIdICM, DKConstantICM

Use this class to manage the MIME types available in the datastore.This class provides the functions to retrieve, add and update the system defined and user defined MIME types.

See Also:
Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdICM
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstantICM
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Constructor Summary
DKMimeTypeMgmtICM(dkDatastore ds)
          Constructs a new MIME type management object to manage the MIME types in the specified datastore.
 
Method Summary
 void add(DKMimeTypeDefICM mimeTypeObject)
          Adds the specified MIME type object to persistent store.
 void clearCache()
          Clears all cache data will be cleared.
 dkDatastore getDatastore()
          Gets the datastore object whose MIME types are managed.
 java.lang.String[] listMimeTypeNames()
          Gets a list of MIME type names from persistent store.
 dkCollection listMimeTypes()
          Gets a list of MIME types from persistent store.
 DKMimeTypeDefICM retrieveMimeType(int mimeTypeId)
          Retrieves the specified MIME type object from persistent store for the specified Id.
 DKMimeTypeDefICM retrieveMimeType(int mimeTypeId, java.lang.String languageCode)
          Retrieves the specified MIME type object from persistent store for the specified language code.
 DKMimeTypeDefICM retrieveMimeType(java.lang.String mimeType)
          Retrieves the specified MIME type object from persistent store for the specified name.
 DKMimeTypeDefICM retrieveMimeType(java.lang.String mimeType, java.lang.String languageCode)
          Retrieves the specified MIME type object from persistent store for the specified language code.
 void setDatastore(dkDatastore ds)
          Sets the datastore object whose MIME types are to be managed.
 void update(DKMimeTypeDefICM mimeTypeObject)
          Updates the specified MIME type object from persistent store.
 void update(DKMimeTypeDefICM mimeTypeObject, java.lang.String languageCode)
          Updates the specified MIME type object from persistent store for the specified language code.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKMimeTypeMgmtICM

public DKMimeTypeMgmtICM(dkDatastore ds)
                  throws DKException,
                         java.lang.Exception
Constructs a new MIME type management object to manage the MIME types in the specified datastore. The object is initilized with the specified datastore.
Parameters:
ds - a reference to a datastore whose MIME types are to be managed
Throws:
DKException - if a problem is encountered
Method Detail

setDatastore

public void setDatastore(dkDatastore ds)
                  throws DKException,
                         java.lang.Exception
Sets the datastore object whose MIME types are to be managed.
Parameters:
ds - a reference to a datastore whose MIME types are to be managed.
Throws:
DKException - if a problem is encountered

getDatastore

public dkDatastore getDatastore()
Gets the datastore object whose MIME types are managed.
Returns:
dkDatastore object
Throws:
DKException - if a problem is encountered

listMimeTypes

public dkCollection listMimeTypes()
                           throws DKException,
                                  java.lang.Exception
Gets a list of MIME types from persistent store. The list includes both the system defined and user defined MIME Types. If the cache is enabled and if the list is available in the memory then the list is returned from the memory. When cache is enabled the collection returned refers to the copy maintained internally. If cache is disenabled then no collection of MIME types will be maintained internally. Note: If all that is needed are the MIME type names, listMimeTypeNames method can be used.
Returns:
a collection of DKMimeTypeDefICM objects
Throws:
DKException - if error occurs See Also: listMimeTypeNames

listMimeTypeNames

public java.lang.String[] listMimeTypeNames()
                                     throws DKException,
                                            java.lang.Exception
Gets a list of MIME type names from persistent store. The list includes both the system defined and user defined MIME Types.
Returns:
an array of MIME type names
Throws:
DKException - if error occurs

add

public void add(DKMimeTypeDefICM mimeTypeObject)
         throws DKException,
                java.lang.Exception
Adds the specified MIME type object to persistent store.
Parameters:
mimeType - MIME type object to be added.
Throws:
DKException - if error

update

public void update(DKMimeTypeDefICM mimeTypeObject)
            throws DKException,
                   java.lang.Exception
Updates the specified MIME type object from persistent store.
Parameters:
mimeType - MIME type object to be updated.
Throws:
DKException - if error

retrieveMimeType

public DKMimeTypeDefICM retrieveMimeType(int mimeTypeId)
                                  throws DKException,
                                         java.lang.Exception
Retrieves the specified MIME type object from persistent store for the specified Id.
Parameters:
mimeTypeId - Id of MIME type object to be retrieved.
Throws:
DKException - if error

retrieveMimeType

public DKMimeTypeDefICM retrieveMimeType(java.lang.String mimeType)
                                  throws DKException,
                                         java.lang.Exception
Retrieves the specified MIME type object from persistent store for the specified name.
Parameters:
mimeType - type name of MIME type object to be retrieved. The name can be up to 32 characters.
Throws:
DKException - if error

update

public void update(DKMimeTypeDefICM mimeTypeObject,
                   java.lang.String languageCode)
            throws DKException,
                   java.lang.Exception
Updates the specified MIME type object from persistent store for the specified language code.
Parameters:
mimeType - MIME type object to be updated.
languageCode - language code.
Throws:
DKException - if error

retrieveMimeType

public DKMimeTypeDefICM retrieveMimeType(int mimeTypeId,
                                         java.lang.String languageCode)
                                  throws DKException,
                                         java.lang.Exception
Retrieves the specified MIME type object from persistent store for the specified language code.
Parameters:
mimeTypeId - id of MIME type object to be retrieved.
languageCode - language code.
Throws:
DKException - if error

retrieveMimeType

public DKMimeTypeDefICM retrieveMimeType(java.lang.String mimeType,
                                         java.lang.String languageCode)
                                  throws DKException,
                                         java.lang.Exception
Retrieves the specified MIME type object from persistent store for the specified language code.
Parameters:
mimeType - name of MIME type object to be retrieved.
languageCode - language code.
Throws:
DKException - if error

clearCache

public void clearCache()
Clears all cache data will be cleared.

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.