cancel
Showing results for 
Search instead for 
Did you mean: 

Content migration into specialized types

javadevtech
Champ in-the-making
Champ in-the-making
Hello -

I am new to Alfresco and I have the responsibility of migrating content into newly created Alfresco (5.0.1) specialized types within our Alfresco environment. My questions is how can I migrate data to these specialized types via the REST API?
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
The object type ID is a property like any other. So you can use CMIS to update it to set it to your custom type.

Using OpenCMIS, which is a Java CMIS library, it would be something like:

CmisObject obj = …
Map<String, Object> updateProperties = new HashMap<String, Object>();
updateProperties.put(PropertyIds.OBJECT_TYPE_ID, "D:sc:whitepaper");
obj.updateProperties(updateProperties);

If you don't want to use a library like OpenCMIS (or its equivalent in another language) you can use the AtomPub binding directly. You can read the CMIS spec for info on how to update properties via the raw binding.

Jeff

javadevtech
Champ in-the-making
Champ in-the-making
I think CMIS might be a bit too much for what i am trying to do. All I need to do is bulk add some documents and metadata to Alfreso in a one time push. CMIS seems like something that I would use if I wanted an ongoing connection from one CMS to another CMS. Can I use the SOAP or REST API to add content to these specialized types?