To edit properties for existing documents in the portal Directory from a remote application, use the IDocumentManager interface in the Oracle WebCenter Interaction Development Kit (IDK).
Java
public static void editWebLinkDocument(IDocumentManager documentManager, int documentID) throws PortalException, RemoteException { IDocumentProperties documentProperties = documentManager.queryDocumentProperties(documentID); documentProperties.setStringValue(1, "IDK Document EDITED"); // 1 = name documentProperties.setStringValue(105, "IDK Document Title EDITED"); // 105 = title documentProperties.setStringValue(2, "Edited in IDK example "); // 2 = description documentProperties.setDateValue(112, newDate()); // 112 = last modified date documentManager.updateDocumentProperties(documentID, documentProperties); }
.NET (C#)
public static void EditWebLinkDocument(IDocumentManager documentManager, int documentID) { IDocumentProperties documentProperties = documentManager.QueryDocumentProperties(documentID); documentProperties.SetStringValue(1, "IDK Document EDITED"); // 1 = name documentProperties.SetStringValue(105, "IDK Document Title EDITED"); // 105 = title documentProperties.SetStringValue(2, "Edited in IDK example "); // 2 = description documentProperties.SetDateValue(112, newDateTime()); // 112 = last modified date documentManager.UpdateDocumentProperties(documentID, documentProperties); }
.NET (VB)
Public Shared Sub EditWebLinkDocument(ByVal documentManager As IDocumentManager, ByVal folderID As Integer) Dim documentProperties As IDocumentProperties = documentManager.QueryDocumentProperties(documentID) documentProperties.SetStringValue(1, "IDK Document EDITED")' 1 = name documentProperties.SetStringValue(105, "IDK Document Title EDITED") ' 105 = title documentProperties.SetStringValue(2, "Edited in IDK example ") ' 2 = description documentProperties.SetDateValue(112, NewDateTime()) ' 112 = last modified date documentManager.UpdateDocumentProperties(documentID, documentProperties) EndSub