Enterprise Information Portal APIs

com.ibm.mm.sdk.server
Class dkAbstractDatastoreExt

java.lang.Object
  |
  +--com.ibm.mm.sdk.server.dkAbstractDatastoreExt
All Implemented Interfaces:
DKConstant, dkDatastoreExt, dkExtension, DKMessageId
Direct Known Subclasses:
DKDatastoreExtDB2, DKDatastoreExtDD, DKDatastoreExtDES, DKDatastoreExtDJ, DKDatastoreExtDL, DKDatastoreExtFed, DKDatastoreExtICM, DKDatastoreExtIP, DKDatastoreExtJDBC, DKDatastoreExtOD, DKDatastoreExtV4

public class dkAbstractDatastoreExt
extends java.lang.Object
implements dkDatastoreExt, DKConstant, DKMessageId

dkAbstractDatastoreExt is the common client implementation for dkDatastoreExt.


Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
dkAbstractDatastoreExt()
          Default constructor for dkAbstractDatastoreExt.
 
Method Summary
 void addChild(dkDataObject parent, dkDataObject child)
          Add a new child member to the parent in the datastore
 void addLink(DKLink link)
          Add a new link between a source and target item to the datastore.
 void addPart(dkDataObject parent, dkXDO part)
          Add a new part member to the parent in the datastore
 void addToFolder(dkDataObject folder, dkDataObject element)
          Add a new element item to this folder in memory.
 void changePassword(java.lang.String userId, java.lang.String oldPwd, java.lang.String newPwd)
          Changing password on the the server for the given userid
 java.lang.String checkedOutUserid(dkDataObject item)
          Gets the userId that checkout the item from the datastore.
 void checkIn(dkDataObject item)
          Checks-in a document or folder item previously checked out from the datastore.
 void checkOut(dkDataObject item)
          Checks-out a document or folder item from the datastore.
 DKCommonPrivilege getCommonItemPrivilege(dkDataObject item)
          Gets the commmon privilege for an item.
 DKCommonPrivilege getCommonPrivilege()
          Gets the commmon privilege of a specific datastore.
 DKCommonPrivilege getCommonPrivilege(dkDataObject item)
          Deprecated. Replace by getCommonItemPrivilege
 dkDatastore getDatastore()
          Gets the reference to the owner datastore object.
 DKSequentialCollection getFoldersContainingDDO(dkDataObject ddo)
          Get a list of the folders that contain this ddo.
 java.lang.String getName()
          Gets the name of this extension object.
 boolean isCheckedOut(dkDataObject item)
          Checks if a document or folder item was checked out from the datastore.
 boolean isSupported(java.lang.String functionName)
          Query if the given function name is supported by this extension.
 java.lang.String[] listFunctions()
          Lists all supported function-names from this extension.
 void moveObject(dkDataObject srcDataObj, dkDataObject destDataObj, int options)
          Moves current dataobject from one entity to another.
 void moveObject(dkDataObject dataObj, java.lang.String entityName)
          Deprecated. Replace by moveObject
 void removeChild(dkDataObject parent, dkDataObject child)
          Removes a child member from the parent in the datastore
 void removeFromFolder(dkDataObject folder, dkDataObject element)
          Removes an element from this folder in memory.
 void removeLink(DKLink link)
          Removes a link between a source and target item from the datastore.
 void removeLinks(dkCollection linkCollection)
          Removes a collection of links from the datastore.
 void removePart(dkDataObject parent, dkXDO part)
          Removes a part member from the parent in the datastore
 dkXDO retrieveFormOverlay(java.lang.String id)
          Retrieves the form overlay object
 void setDatastore(dkDatastore ds)
          Sets the reference to the owner datastore object.
 void setName(java.lang.String extName)
          Sets the name of this extension object.
 void unlockCheckedOut(dkDataObject item)
          Unlocks the item from the datastore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

dkAbstractDatastoreExt

public dkAbstractDatastoreExt()
                       throws DKException,
                              java.lang.Exception
Default constructor for dkAbstractDatastoreExt.
Method Detail

getName

public java.lang.String getName()
                         throws java.lang.Exception
Gets the name of this extension object.
Specified by:
getName in interface dkExtension
Returns:
name of this object.

setName

public void setName(java.lang.String extName)
             throws java.lang.Exception
Sets the name of this extension object. This operation is not supported, since you can not change the datastore standard extension name.
Specified by:
setName in interface dkExtension
Parameters:
extName - name of this extension object.

getDatastore

public dkDatastore getDatastore()
                         throws java.lang.Exception
Gets the reference to the owner datastore object.
Specified by:
getDatastore in interface dkDatastoreExt
Returns:
the dkDatastore object.

setDatastore

public void setDatastore(dkDatastore ds)
                  throws DKUsageError,
                         java.lang.Exception
Sets the reference to the owner datastore object.
Specified by:
setDatastore in interface dkDatastoreExt
Parameters:
ds - datastore.

isSupported

public boolean isSupported(java.lang.String functionName)
                    throws java.lang.Exception
Query if the given function name is supported by this extension.
Specified by:
isSupported in interface dkDatastoreExt
Parameters:
functionName - the name of the function providing this features
Returns:
true if this function is supported

listFunctions

public java.lang.String[] listFunctions()
                                 throws java.lang.Exception
Lists all supported function-names from this extension.
Specified by:
listFunctions in interface dkDatastoreExt
Returns:
an array of supported function names, or null if there is no function supported

addToFolder

public void addToFolder(dkDataObject folder,
                        dkDataObject element)
                 throws DKException,
                        java.lang.Exception
Add a new element item to this folder in memory. Changes will not take affect until dkDataObject.add() or dkDataObject.update() is performed. In Digital Library, the member must exists (has been created) in the datastore before it can be added to a folder.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
addToFolder in interface dkDatastoreExt
Parameters:
folder - a folder object.
member - the member to be added to the folder.

removeFromFolder

public void removeFromFolder(dkDataObject folder,
                             dkDataObject element)
                      throws DKException,
                             java.lang.Exception
Removes an element from this folder in memory. Changes will not take affect until dkDataObject.update() is performed. At the end of the operation, the member object will not be in this DKFolder collection in-memory, but will be in the persistent folder representation in the datastore until dkDataObject.update() is performced.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
removeFromFolder in interface dkDatastoreExt
Parameters:
folder - a folder object
element - the member to be removed from the folder

getFoldersContainingDDO

public DKSequentialCollection getFoldersContainingDDO(dkDataObject ddo)
                                               throws DKException,
                                                      java.lang.Exception
Get a list of the folders that contain this ddo. List returned as collection of skeleton DDOs with completed Pid information.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
getFoldersContainingDDO in interface dkDatastoreExt
Parameters:
ddo - DDO to check which folders contain it.
Returns:
List of Folders that contain this ddo (Skeleton DDOs with Pid information completed.)

checkOut

public void checkOut(dkDataObject item)
              throws DKException,
                     java.lang.Exception
Checks-out a document or folder item from the datastore. You will have exclusive updating privileges to the item, while other users are allowed read access only, until you check it back in.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
checkOut in interface dkDatastoreExt
Parameters:
item - the item to checked-out.

checkIn

public void checkIn(dkDataObject item)
             throws DKException,
                    java.lang.Exception
Checks-in a document or folder item previously checked out from the datastore. You release all write privileges to this item with this method.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
checkIn in interface dkDatastoreExt
Parameters:
item - the item to checked-in

getCommonPrivilege

public DKCommonPrivilege getCommonPrivilege()
                                     throws java.lang.Exception,
                                            DKException,
                                            DKUsageError,
                                            DKDatastoreAccessError
Gets the commmon privilege of a specific datastore.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
getCommonPrivilege in interface dkDatastoreExt
Returns:
a DKCommonPrivilege object

getCommonPrivilege

public DKCommonPrivilege getCommonPrivilege(dkDataObject item)
                                     throws DKException,
                                            java.lang.Exception
Deprecated. Replace by getCommonItemPrivilege

Gets the commmon privilege for an item.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
getCommonPrivilege in interface dkDatastoreExt
Parameters:
item - an item
Returns:
a DKCommonPrivilege object
See Also:
getCommonItemPrivilege(com.ibm.mm.sdk.common.dkDataObject)

getCommonItemPrivilege

public DKCommonPrivilege getCommonItemPrivilege(dkDataObject item)
                                         throws DKException,
                                                java.lang.Exception
Gets the commmon privilege for an item.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
getCommonItemPrivilege in interface dkDatastoreExt
Parameters:
item - an item
Returns:
a DKCommonPrivilege object

isCheckedOut

public boolean isCheckedOut(dkDataObject item)
                     throws DKException,
                            java.lang.Exception
Checks if a document or folder item was checked out from the datastore.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
isCheckedOut in interface dkDatastoreExt
Parameters:
item - a document or folder item
Returns:
true if item was checked-out, otherwise return false

checkedOutUserid

public java.lang.String checkedOutUserid(dkDataObject item)
                                  throws DKException,
                                         java.lang.Exception
Gets the userId that checkout the item from the datastore.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
checkedOutUserid in interface dkDatastoreExt
Parameters:
item - a document or folder item
Returns:
the userid that checked out the item

unlockCheckedOut

public void unlockCheckedOut(dkDataObject item)
                      throws DKException,
                             java.lang.Exception
Unlocks the item from the datastore

Note:DKUsageError exception thrown if method is not implemented

Specified by:
unlockCheckedOut in interface dkDatastoreExt
Parameters:
item - a document or folder item

changePassword

public void changePassword(java.lang.String userId,
                           java.lang.String oldPwd,
                           java.lang.String newPwd)
                    throws DKException,
                           java.lang.Exception
Changing password on the the server for the given userid

Note:DKUsageError exception thrown if method is not implemented

Specified by:
changePassword in interface dkDatastoreExt
Parameters:
userId - userid to change password for
oldPwd - current password
newPwd - new password

moveObject

public void moveObject(dkDataObject dataObj,
                       java.lang.String entityName)
                throws DKException,
                       java.lang.Exception
Deprecated. Replace by moveObject

Moves the current data object from current entity to another.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
moveObject in interface dkDatastoreExt
Parameters:
dataObj - data object to be moved
entityName - new entity name to move to
See Also:
moveObject(com.ibm.mm.sdk.common.dkDataObject,com.ibm.mm.sdk.common.dkDataObject,int)

moveObject

public void moveObject(dkDataObject srcDataObj,
                       dkDataObject destDataObj,
                       int options)
                throws DKException,
                       java.lang.Exception
Moves current dataobject from one entity to another.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
moveObject in interface dkDatastoreExt
Parameters:
item - source item to be moved to another entity
item - destination item to be moved into
options - move options.

retrieveFormOverlay

public dkXDO retrieveFormOverlay(java.lang.String id)
                          throws DKException,
                                 java.lang.Exception
Retrieves the form overlay object

Note:DKUsageError exception thrown if method is not implemented

Specified by:
retrieveFormOverlay in interface dkDatastoreExt
Parameters:
id - the id string to retrieve the object
Returns:
the form overlay xdo object

addChild

public void addChild(dkDataObject parent,
                     dkDataObject child)
              throws DKException,
                     java.lang.Exception
Add a new child member to the parent in the datastore

Note:DKUsageError exception thrown if method is not implemented

Specified by:
addChild in interface dkDatastoreExt
Parameters:
parent - a parent object.
child - the child to be added to the parent.

removeChild

public void removeChild(dkDataObject parent,
                        dkDataObject child)
                 throws DKException,
                        java.lang.Exception
Removes a child member from the parent in the datastore

Note:DKUsageError exception thrown if method is not implemented

Specified by:
removeChild in interface dkDatastoreExt
Parameters:
parent - a parent object.
child - the child to be added to the parent.

addLink

public void addLink(DKLink link)
             throws DKException,
                    java.lang.Exception
Add a new link between a source and target item to the datastore. Additional link item is optional in DKLink object.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
addLink in interface dkDatastoreExt
Parameters:
link - link object

removeLink

public void removeLink(DKLink link)
                throws DKException,
                       java.lang.Exception
Removes a link between a source and target item from the datastore. Additional link item is optional in DKLink object

Note:DKUsageError exception thrown if method is not implemented

Specified by:
removeLink in interface dkDatastoreExt
Parameters:
link - link object

removeLinks

public void removeLinks(dkCollection linkCollection)
                 throws DKException,
                        java.lang.Exception
Removes a collection of links from the datastore.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
removeLinks in interface dkDatastoreExt
Parameters:
linkCollection - link collection that contain links

addPart

public void addPart(dkDataObject parent,
                    dkXDO part)
             throws DKException,
                    java.lang.Exception
Add a new part member to the parent in the datastore

Note:DKUsageError exception thrown if method is not implemented

Specified by:
addPart in interface dkDatastoreExt
Parameters:
parent - a parent object.
part - the part to be added to the parent.

removePart

public void removePart(dkDataObject parent,
                       dkXDO part)
                throws DKException,
                       java.lang.Exception
Removes a part member from the parent in the datastore

Note:DKUsageError exception thrown if method is not implemented

Specified by:
removePart in interface dkDatastoreExt
Parameters:
parent - a parent object.
part - the part to be removed from the parent.

EIP Java APIs

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