03-04-2013 08:07 AM
import java.util.HashMap;
import java.util.Map;
import javax.xml.ws.BindingType;
import org.apache.chemistry.opencmis.client.api.Session;
import org.apache.chemistry.opencmis.client.api.SessionFactory;
import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl;
import org.apache.chemistry.opencmis.commons.SessionParameter;
public class Third {
public static void main(String arg[]) throws Exception{
Map<String, String> parameter = new HashMap<String, String>();
// Set the user credentials
parameter.put(SessionParameter.USER, "admin");
parameter.put(SessionParameter.PASSWORD, "admin");
// Specify the connection settings
parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost:8070/alfresco/service/cmis");
parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
// Set the alfresco object factory
parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");
// Create a session
SessionFactory factory = SessionFactoryImpl.newInstance();
Session session = factory.getRepositories(parameter).get(0).createSession();
System.out.println("Connected to repository:");
}
}
03-06-2013 09:15 AM
Folder newFolder = root.createFolder(newFolderProps);
line.03-06-2013 11:36 AM
03-06-2013 11:44 PM
Folder newFolder = root.createFolder(newFolderProps);
Folder newFolder = session.getRootFolder().createFolder(newFolderProps);
03-14-2013 01:57 AM
03-14-2013 09:30 AM
03-20-2013 06:53 AM
03-20-2013 07:46 AM
04-22-2013 11:53 AM
07-24-2013 01:37 AM
07-22-2015 08:34 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.