org.nuiton.wikitty.addons
Class WikittyImportExportService

java.lang.Object
  extended by org.nuiton.wikitty.addons.WikittyImportExportService

public class WikittyImportExportService
extends Object

Import/export service.

Version:
$Revision: 1345 $ Last update: $Date: 2012-01-20 11:25:17 +0100 (ven, 20 jan 2012) $ by : $Author: echatellier $
Author:
poussin

Nested Class Summary
static class WikittyImportExportService.FORMAT
           
 
Field Summary
protected  String exportDirectory
          directory path where export asynchronous file are stored
protected  String exportPublicURL
          url used by client to retrieve export file when job is ended
protected  ExecutorService importExportExecutor
          Executor that do import export task
protected  Map<String,Future<String>> importExportTask
          contains all import or export task, key is job id send to client
 
Constructor Summary
WikittyImportExportService(org.nuiton.util.ApplicationConfig config, String securityToken, WikittyService ws)
          Deprecated. since 3.2 use WikittyImportExportService(org.nuiton.wikitty.WikittyClient)
WikittyImportExportService(WikittyClient client)
           
 
Method Summary
 String asyncExportAllByCriteria(WikittyImportExportService.FORMAT format, Criteria criteria)
          Deprecated. since 3.4 user asyncExportAllByQuery(org.nuiton.wikitty.addons.WikittyImportExportService.FORMAT, org.nuiton.wikitty.query.WikittyQuery)
 String asyncExportAllByExample(WikittyImportExportService.FORMAT format, BusinessEntityImpl e)
          Asynchronous export by example.
 String asyncExportAllByQuery(WikittyImportExportService.FORMAT format, WikittyQuery query)
          Asynchronous export by criteria.
 String asyncImportFromUri(WikittyImportExportService.FORMAT format, String uri)
           
 void cancelJob(String jobId)
           
 void freeJobResource(String jobId)
           
 WikittyClient getClient()
           
 String getExportDirectory()
           
 String getExportPublicURL()
           
 WikittyService getWikittyService()
           
 JobState infoJob(String jobId)
          Return job information.
 String syncExportAllByCriteria(WikittyImportExportService.FORMAT format, Criteria criteria)
          Deprecated. since 3.4 user syncExportAllByQuery(org.nuiton.wikitty.addons.WikittyImportExportService.FORMAT, org.nuiton.wikitty.query.WikittyQuery)
 void syncExportAllByCriteria(WikittyImportExportService.FORMAT format, Criteria criteria, Writer writer)
          Deprecated. since 3.4 user syncExportAllByQuery(org.nuiton.wikitty.addons.WikittyImportExportService.FORMAT, org.nuiton.wikitty.query.WikittyQuery, java.io.Writer)
 String syncExportAllByExample(WikittyImportExportService.FORMAT format, BusinessEntityImpl e)
          Synchronous export by example.
 void syncExportAllByExample(WikittyImportExportService.FORMAT format, BusinessEntityImpl e, Writer writer)
          Synchronous export by example.
 String syncExportAllByQuery(WikittyImportExportService.FORMAT format, WikittyQuery query)
          Synchronous export by criteria.
 void syncExportAllByQuery(WikittyImportExportService.FORMAT format, WikittyQuery query, Writer writer)
          Synchronous export by criteria.
 void syncImport(WikittyImportExportService.FORMAT format, Reader reader)
           
 void syncImport(WikittyImportExportService.FORMAT format, String s)
           
 void syncImportFromUri(WikittyImportExportService.FORMAT format, String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exportDirectory

protected String exportDirectory
directory path where export asynchronous file are stored


exportPublicURL

protected String exportPublicURL
url used by client to retrieve export file when job is ended


importExportExecutor

protected ExecutorService importExportExecutor
Executor that do import export task


importExportTask

protected Map<String,Future<String>> importExportTask
contains all import or export task, key is job id send to client

Constructor Detail

WikittyImportExportService

public WikittyImportExportService(WikittyClient client)

WikittyImportExportService

@Deprecated
public WikittyImportExportService(org.nuiton.util.ApplicationConfig config,
                                             String securityToken,
                                             WikittyService ws)
Deprecated. since 3.2 use WikittyImportExportService(org.nuiton.wikitty.WikittyClient)

Parameters:
config -
securityToken -
ws -
Method Detail

getClient

public WikittyClient getClient()

getWikittyService

public WikittyService getWikittyService()

getExportDirectory

public String getExportDirectory()

getExportPublicURL

public String getExportPublicURL()

syncImport

public void syncImport(WikittyImportExportService.FORMAT format,
                       String s)

syncImport

public void syncImport(WikittyImportExportService.FORMAT format,
                       Reader reader)

syncImportFromUri

public void syncImportFromUri(WikittyImportExportService.FORMAT format,
                              String uri)

asyncImportFromUri

public String asyncImportFromUri(WikittyImportExportService.FORMAT format,
                                 String uri)

asyncExportAllByExample

public String asyncExportAllByExample(WikittyImportExportService.FORMAT format,
                                      BusinessEntityImpl e)
Asynchronous export by example.

Parameters:
format - export format
e - sample
Returns:
job id

syncExportAllByExample

public String syncExportAllByExample(WikittyImportExportService.FORMAT format,
                                     BusinessEntityImpl e)
Synchronous export by example.

Parameters:
format - export format
e - sample
Returns:
export string

syncExportAllByExample

public void syncExportAllByExample(WikittyImportExportService.FORMAT format,
                                   BusinessEntityImpl e,
                                   Writer writer)
Synchronous export by example.

Parameters:
format - export format
e - sample

asyncExportAllByQuery

public String asyncExportAllByQuery(WikittyImportExportService.FORMAT format,
                                    WikittyQuery query)
Asynchronous export by criteria.

Parameters:
format - export format
query - criteria
Returns:
export as string

syncExportAllByQuery

public String syncExportAllByQuery(WikittyImportExportService.FORMAT format,
                                   WikittyQuery query)
Synchronous export by criteria.

Parameters:
format - export format
query - criteria
Returns:
export as string

syncExportAllByQuery

public void syncExportAllByQuery(WikittyImportExportService.FORMAT format,
                                 WikittyQuery query,
                                 Writer writer)
Synchronous export by criteria.

Parameters:
format - export format
query - criteria

asyncExportAllByCriteria

@Deprecated
public String asyncExportAllByCriteria(WikittyImportExportService.FORMAT format,
                                                  Criteria criteria)
Deprecated. since 3.4 user asyncExportAllByQuery(org.nuiton.wikitty.addons.WikittyImportExportService.FORMAT, org.nuiton.wikitty.query.WikittyQuery)

Asynchronous export by criteria.

Parameters:
format - export format
criteria - criteria
Returns:
export as string

syncExportAllByCriteria

@Deprecated
public String syncExportAllByCriteria(WikittyImportExportService.FORMAT format,
                                                 Criteria criteria)
Deprecated. since 3.4 user syncExportAllByQuery(org.nuiton.wikitty.addons.WikittyImportExportService.FORMAT, org.nuiton.wikitty.query.WikittyQuery)

Synchronous export by criteria.

Parameters:
format - export format
criteria - criteria
Returns:
export as string

syncExportAllByCriteria

@Deprecated
public void syncExportAllByCriteria(WikittyImportExportService.FORMAT format,
                                               Criteria criteria,
                                               Writer writer)
Deprecated. since 3.4 user syncExportAllByQuery(org.nuiton.wikitty.addons.WikittyImportExportService.FORMAT, org.nuiton.wikitty.query.WikittyQuery, java.io.Writer)

Synchronous export by criteria.

Parameters:
format - export format
criteria - criteria

infoJob

public JobState infoJob(String jobId)
Return job information.

Parameters:
jobId - job id
Returns:
job state

cancelJob

public void cancelJob(String jobId)

freeJobResource

public void freeJobResource(String jobId)


Copyright © 2009-2012 CodeLutin. All Rights Reserved.