01-10-2015 02:18 PM
Folder folder=(Folder) session.getObjectByPath("/TF/Users");
Map properties=new HashMap();
properties.put("cmis:name",format.format(date) );;
properties.put("cmis:baseTypeId", "cmis:folder");
properties.put(PropertyIds.OBJECT_TYPE_ID, "tf:user");
List l=new ArrayList();
folder.createFolder(properties);
properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder,tf:user");
public static Session openCMISSession(String username, String password) {
loadProperties();
Map<String, String> parameter = new HashMap<>();
parameter.put(SessionParameter.USER, username);
parameter.put(SessionParameter.PASSWORD, password);
parameter.put(SessionParameter.ATOMPUB_URL,"http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom");
parameter.put(SessionParameter.BINDING_TYPE,BindingType.ATOMPUB.value());
parameter.put(SessionParameter.REPOSITORY_ID, repository);
// Set the alfresco object factory
parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");
SessionFactory sf=SessionFactoryImpl.newInstance();
List<Repository> repositories = sf.getRepositories(parameter);
return sf.getRepositories(parameter).get(0).createSession();
}
01-11-2015 01:45 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.