Index
Purpose:
The DKMimeTypeMgmtICM class is used 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: DKMimeTypeDefICM
Since: Version 8
Class summary:
class DKEXPORT DKMimeTypeMgmtICM
{
public :
DKMimeTypeMgmtICM(dkDatastore* ds);
DKMimeTypeMgmtICM(dkDatastore* ds, int accessLevel);
virtual ~DKMimeTypeMgmtICM();
void add(DKMimeTypeDefICM* mimeType);
void clearCache();
void del(DKMimeTypeDefICM* mimeType);
dkDatastore* getDatastore();
DKString* listMimeTypeNames(long &arrsize);
dkCollection* listMimeTypes();
DKMimeTypeDefICM* retrieveMimeType(const char* mimeType);
DKMimeTypeDefICM* retrieveMimeType(long mimeTypeId, const char* languageCode);
DKMimeTypeDefICM* retrieveMimeType(long mimeTypeId);
DKMimeTypeDefICM* retrieveMimeType(const char* mimeType, const char* languageCode);
void setDatastore(dkDatastore* ds);
void update(DKMimeTypeDefICM* mimeType, const char* languageCode);
void update(DKMimeTypeDefICM* mimeType);
};
Members:
-
-
- Constructors and destructor
-
DKMimeTypeMgmtICM();
Constructs a new DKMimeTypeMgmtICM class.
Parameters: ds - datastore object whose MIME types have to be
managed as an instance of DKDatastoreICM.
DKMimeTypeMgmtICM(dkDatastore* ds, int accessLevel);
Constructs a new MIME type management object to manage the MIME types in
the specified datastore. The created object is initilized with the
specified datastore. Parameters:
- ds - valid instance of a datastore object. Should be an instance of
DKDatastoreICM.
- accessLevel - access level.
virtual ~DKMimeTypeMgmtICM();
Destructor for this object.
- Member functions
-
- add
- Adds the specified MIME type object to the persistent store.
Parameters: mimeType - MIME type definition to be
added. Throws: DKException if error occurs on the
server.
void add(KMimeTypeDefICM* mimeType);
- clearCache
- Clears all the MIME types that are cached locally in this object.
void clearCache()
- del
- Deletes the specified MIME type object from the persistent
datastore. Parameters: mimeType - MIME type object to
be deleted. Throws: DKException if error occurs on the
server.
void del()
- getDatastore
- Retrieves a pointer to the datastore object associated with this
object. Returns: datastore object pointer. The
object pointed to be the returned pointer is an instance of
DKDatastoreICM.
dkDatastore* getDatastore()
- listMimeTypeNames
- Retrieves an arry of names for MIME types from the persistent
store. The returned array includes the names of both the system defined
and user-defined MIME types. Parameters: arrSize -
size of returned array. Returns: array of MIME type
names as instances of DKString.
DKString* listMimeTypeNames(long& arrSize)
- listMimeTypes
- Retrieves a list of MIME types from the persistent store. This list
includes both system defined and user-defined MIME types.
Returns: collection of MIME type definitions as instances of
DKMimeTypeDefICM.
dkCollection* listMimeTypes()
- retrieveMimeType
- Retrieves the MIME type object with the specified name from the persistent
store. Parameters: mimeType - name of MIME type to be
retrieved. The name can be up to 32 characters long.
Returns: MIME type definition object corresponding to the
specified name.
DKMimeTypeDefICM* retrieveMimeType(const char* mimeType)
- retrieveMimeType
- Retrieves the MIME type object corresponding to the specified type and for
the specified language. Parameters:
- mimeType - name of MIME type to be retrieved. The name can be up to
32 characters long.
- languageCode - language code (e.g. "ENU" for US
English).
Returns: MIME type definition object corresponding to
the specified parameters.
DKMimeTypeDefICM* retrieveMimeType(long mimeTypeId,const char* languageCode)
- retrieveMimeType
- Retrieves the MIME type object with the specified identifiers from the
persistent store. Parameters:mimeTypeId - identifier
of the MIME type object to be retrieved. Returns: MIME
type definition object corresponding to the specified MIME type
identifier.
DKMimeTypeDefICM* retrieveMimeType(long mimeTypeId)
- retrieveMimeType
- Retrieves the MIME type object with the specified identifier from the
persistent store for the specified language.
Parameters:
- mimeTypeId - identifier of MIME type object to be retrieved.
- languageCode - language code (e.g. "ENU" for US
English).
Returns: MIME type definition object corresponding to
the specified parameters.
DKMimeTypeDefICM* retrieveMimeType(const char* mimeType,const char* languageCode)
- setDatastore
- sets the datastore object associated with this object.
Parameters: ds - pointer to an instance of
DKDatastoreICM.
void setDatastore(dkDatastore* ds)
- update
- Updates the specified MIME type object definition in the persistent store
for specified language. Parameters:
- mimeType - MIME type object to update.
- languageCode - language code (e.g. "ENU" for US
English).
void update(DKMimeTypeDefICM* mimeType,const char* languageCode)
- update
- Updates the specified MIME type object definition in the persistent
store. Parameters: mimeType - MIME type object to
update.
void update(DKMimeTypeDefICM* mimeType);
(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.