To create new remote documents in the portal Directory from a remote application, use the IRemoteDocument and IWebLinkDocument interfaces in the Oracle WebCenter Interaction Development Kit (IDK).
Java
public static void createWebLinkDocument(IDocumentManager documentManager, int folderID, String URL) throws PortalException, MalformedURLException, RemoteException { IWebLinkDocument webLinkDocument = documentManager.createWebLinkDocument(folderID,104, URL);// 104 is WWW Content Source webLinkDocument.setOverrideName("EDK Test Document"); // overrride intrinsic name int documentID = webLinkDocument.save(); return documentID; }
.NET (C#)
public static void CreateWebLinkDocument(IDocumentManager documentManager, int folderID, string URL) throws PortalException, MalformedURLException, RemoteException { IWebLinkDocument webLinkDocument = documentManager.CreateWebLinkDocument(folderID,104, URL);// 104 is WWW Content Source webLinkDocument.SetOverrideName("EDK Test Document"); // overrride intrinsic name int documentID = webLinkDocument.Save(); return documentID; }
.NET (VB)
Public Shared Function CreateWebLinkDocument( _ ByVal documentManager As IDocumentManager, ByVal folderID As Integer, ByVal URL As String)As Integer Dim webLinkDocument As IWebLinkDocument = documentManager.CreateWebLinkDocument(folderID,104, URL)' 104 is WWW ContentSource webLinkDocument.SetOverrideName("EDK Test Document")' overrride intrinsic name Dim documentID As Integer = webLinkDocument.Save() Return documentID EndFunction