c# - Alfresco programmatically navigate to correct folder -
I have a question about Alfresco and dot CMIS library. In fact, I would like to go to a particular folder and make a document there.
At the moment I have the following code (I know it is dirty, but it was for testing):
dictionary & lt; String, string & gt; Parameter = New Dictionary & lt; String, string & gt; (); Parameters [Session Parameter.BindingType] = Binding Type. Atpub; Parameters [session Parameter.AtomPubUrl] = "http: // webadress: 2005 / alfresco / service / cmis"; Parameter [session pamator User] = "amin"; Parameter [session Parameter.Password] = "admsw"; Session Factory Factory = SessionFind. NewInstance (); IList & LT; DotCMIS.Client.IRepository & gt; Repositories = Factory. Gateway (parameter); DotCMIS.Client.isession session = repository [0]. Crack Season (); Forchcha (ICMISOb SeamisObject in Rootfolder.GetChildon ()) {console.lightline (cm object number); If (cmisObject.Name.Equals ("AlfresCO")) {var type = cmisObject.GetType (); IFolder circabcfolder = cmisObject as a semifold; Foreign currency (Circumboxfolder.grit (ICmisObject obj)) {Console.WriteLine (obj.Name); If (obj.Name.Equals ("SubFolder1")) {IFolder circabcfolder2 = obj as IFolder; Foreach (ICMISObject OGJ2 in CircuitFolter 2. Greet) ()) {console.lightline (obj2.Name); Forrest (IMolder) as obj3 (ICmisObject obj3) .GetChildren ()) {Console.WriteLine (obj3.Name); If (obj3.Name.Equals ("Library")) {foreach (IFolder as obj3 (in obm3) in ICmisObject .getChildren ()) {Console.WriteLine (obj4.Name); If (obj4.Name.Equals ("MyFolder")) {IDictionary & lt; String, Object & gt; Property 2 = New Dictionary & lt; String, Object & gt; (); Properties 2 [PropertyEx.ObjectTipID] = "CMS: Folder"; Property 2 [Comm. Name] = "Test folder"; IFolder newFolder = (IFolder as obj4) .CreateFolder (Properties 2); }}}}}}}}} It just opens a root folder, that means I am in Alfresco for example, then navigate to another sub folder One more, and then finally I can open "My Folder" in the Library / Groups / Groups / Newsgroups etc and in the Library, but instead of simply Open / Library / MyFolder is another easy way to actually Is getting all the layers in the correct folder ...?
Can I do something like this .. session. I can not rely on ID, for example, in other portals, randomly generated ID for a folder may be different, so I can not say GetFolderById (..) So any thoughts? I am not really familiar with DotCimIS client, but if you see the total services (which should be available) through the customer, then you will see 2 services which will do the trick
-
-
The query is quite easy, where type is the limit: The folder and name are "MyFloulder".
Comments
Post a Comment