Export and Import through API
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2007 03:12 AM
I am using alfresco 2.0 in windows with tomcat server and oracle database.
I am not able to understand the following code given in the wiki link http://wiki.alfresco.com/wiki/Export_and_Import :
Can anyone please explain how it will work… especially how the handler is being created and how 'exporter' will be obtained.
Is there any other way to export or import programmatically?
Thanks in advance.
Arnab
I am not able to understand the following code given in the wiki link http://wiki.alfresco.com/wiki/Export_and_Import :
// define which part of the Repository to exportLocation location = new Location(new StoreRef("workspace", "SpacesStore");location.setPath("/");ExporterCrawlerParameters parameters = new ExporterCrawlerParameters();parameters.setExportFrom(location);// setup an ACP Package Handler to export to an ACP file formatExportPackageHandler handler = new ACPExportPackageHandler(…);// now export (note: we're not interested in progress in the example)exporter.exportView(handler, parameters, null);
Can anyone please explain how it will work… especially how the handler is being created and how 'exporter' will be obtained.
Is there any other way to export or import programmatically?
Thanks in advance.
Arnab
Labels:
- Labels:
-
Archive
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2007 07:08 AM
The handler is created via
The exporter is the Exporter Service which is referenced by injecting it via Spring. The bean is called 'ExporterService'.
new
. The parameters to the constructor inform the exporter where to place the exported contents.The exporter is the Exporter Service which is referenced by injecting it via Spring. The bean is called 'ExporterService'.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2008 04:24 PM
Hello,
I am a newbie in using this functions of the webclient api. I tried to get the import and export working, but also the firstFoundationClient does not work in my environment.
Can somebody deliver a working example maybe included in a project?
I am using Alfresco 2.9B (tomcat preconfigured).
Thanks,
Jens
I am a newbie in using this functions of the webclient api. I tried to get the import and export working, but also the firstFoundationClient does not work in my environment.
Can somebody deliver a working example maybe included in a project?
I am using Alfresco 2.9B (tomcat preconfigured).
Thanks,
Jens

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2009 07:36 AM
Hi
Does someone manage to make an export import through API ? I spend 2 days looking for some usefull documentation and dind't find anything i could use.
The exporter is the Exporter Service which is referenced by injecting it via Spring. The bean is called 'ExporterService'. - what does this mean ? Can you copy paste an example ?
I have a separate applications who will make export/import to an alfresco 3 labs installation.
How can i get that exporter variable?
I found something :
Or:
I hope someone(probably nobody) will have 1 minute to write an answer here..
Thanks!
Does someone manage to make an export import through API ? I spend 2 days looking for some usefull documentation and dind't find anything i could use.
The exporter is the Exporter Service which is referenced by injecting it via Spring. The bean is called 'ExporterService'. - what does this mean ? Can you copy paste an example ?
I have a separate applications who will make export/import to an alfresco 3 labs installation.
How can i get that exporter variable?
I found something :
ExporterService exporterService = getRepositoryImpl().getServiceRegistry().getExporterService();
But how do i get the RepositoryImpl ? I have just a WebServiceFactory…Or:
ExporterService exporter = getServiceRegistry().getExporterService();
Same question… how do i get a ServiceRegistry ??I hope someone(probably nobody) will have 1 minute to write an answer here..
Thanks!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2009 01:46 PM
Hi dacia_berlina
If you've only got a WebServiceFactory, it means you're using Alfresco through its webservice client. However Import / Export is not available using webservices to my knowledge.
Native APIs like ServiceRegistry and other services are only available locally in the Alfresco server. To take advantage of them, the easiest is to write a javascript or Java webscript (see webscript APIs on the wiki).
A little bit harder would be to write a Spring extension to Alfresco. You can see how it's done in the server side part of the ETL Connector extension for Alfresco (contributed on the Alfresco forge at http://forge.alfresco.com/projects/etlconnector/). Maybe you could even use it and provide ACP XML to it over REST HTTP ?
If you've only got a WebServiceFactory, it means you're using Alfresco through its webservice client. However Import / Export is not available using webservices to my knowledge.
Native APIs like ServiceRegistry and other services are only available locally in the Alfresco server. To take advantage of them, the easiest is to write a javascript or Java webscript (see webscript APIs on the wiki).
A little bit harder would be to write a Spring extension to Alfresco. You can see how it's done in the server side part of the ETL Connector extension for Alfresco (contributed on the Alfresco forge at http://forge.alfresco.com/projects/etlconnector/). Maybe you could even use it and provide ACP XML to it over REST HTTP ?
