Restoring Documents From Deleted Folders

A user has accidently deleted a folder containing 17 sub folders and over 1800 documents.

They are using frame work folders.So not able to restore the folder structure and documents from the Trash

Solution:

1)How To Recreate A Lost Folder Structure 

There is no tool or facility in the product for restoring deleted folders when using Framework Folders, but see Bug 15867108 https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=15867108 for an Enhancement Request.

Your best option would be to restore the tables used by Framework Folders from a database backup:

a). First backup your current database, in case the restoration goes awry.
b). Then export these folders:

FolderFolders
FolderMetaDefaults
FolderFiles

from your most recent database backup.
c). Restore those tables to your current server.

NB: the backup would have to be quite recent, since folders or sub-folders created since the backup would get wiped out. This could lead to further issues.

2)How to list all the Content items deleted from Webcenter Content Framework Folder using RIDC

When a content item is deleted from Framework Folder then it is marked as Expired . Unlike with Folders_g , there is no Trash functionality hence this change in behavior with Framework Folders . This change is effected in 2 status details which is associated with the content .

These 2 are :

a). dProcessingState

b). dStatus

For the above scenario , dProcessingState is set to 'E' and dStatus is set to 'Expired' .

In the case when a content item is expired (with Expiration Metadata) then dProcessingState is set to 'Y' and dStatus is set to 'Expired' .

Hence to list all the content items which are deleted from Folders , users will have to use combination of the above 2 parameters .

Code snippet which achieves this is as follows :

// Databinder for Search request
DataBinder dataBinder = idcClient.createBinder();
dataBinder.putLocal("IdcService", "GET_DATARESULTSET");
dataBinder.putLocal("dataSource","Documents"); // Datasource to list the contents
dataBinder.putLocal("resultName","DocList"); //Result set defined . This is user defined and can be set to anything as required .
dataBinder.putLocal("whereClause","(dProcessingState LIKE 'E' )"); //Key part here . dProcessingState=E corresponds to Framework Folder deleted item.
dataBinder.putLocal("dStatus","Expired");
// Write the data binder for the request to stdout
serializer.serializeBinder (System.out, dataBinder);
// Send the request to Content Server
ServiceResponse response = idcClient.sendRequest(userContext,dataBinder);
// Get the data binder for the response from Content Server
DataBinder responseData = response.getResponseAsBinder();
// Write the response data binder to stdout
serializer.serializeBinder (System.out, responseData);

3)After that we can write a RIDC code to move these content to specific folders by providing the GUID for the folder.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed