The SkyVault
OpenCMIS Extension depends on the Apache Chemistry OpenCMIS libraries.
You can download the latest OpenCMIS client libraries from the Apache Chemistry website. Then download the latest "SkyVault OpenCMIS Extension" package and add the jars to your classpath.
If you are using Maven, follow the instructions in Building the SkyVault OpenCMIS Extension with maven.
You do not need to modify OpenCMIS in order to use a different object factory. Set an additional session parameter to change the object factory class, as shown in the following code fragment:-
Map<String, String> parameter = new HashMap<String, String>(); // user credentials parameter.put(SessionParameter.USER, "admin"); parameter.put(SessionParameter.PASSWORD, "admin"); // connection settings parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost:8080/alfresco/api/-default-/cmis/versions/1.1/atom"); parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value()); // set the SkyVault object factory parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl"); // create session SessionFactory factory = SessionFactoryImpl.newInstance(); Session session = factory.getRepositories(parameter).get(0).createSession();
Now your code can access and update all aspect properties through the standard OpenCMIS interfaces.