org.nuiton.wikitty
Class WikittyImportExportService

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

public class WikittyImportExportService
extends Object

Import/export service.

Version:
$Revision$ Last update: $Date$ by : $Author$
Author:
poussin

Nested Class Summary
static class WikittyImportExportService.FORMAT
           
 
Field Summary
protected static String EXPORT_DIRECTORY
          directory path where export asynchronous file are stored
protected static String EXPORT_URL
          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
protected static int MAX_IMPORT_EXPORT_THREAD
          number of thread used to import/export task
protected  String securityToken
           
protected  WikittyService ws
           
 
Constructor Summary
WikittyImportExportService(String securityToken, WikittyService ws)
           
 
Method Summary
 String asyncExportAllByCriteria(WikittyImportExportService.FORMAT format, Criteria criteria)
          Asynchronous export by criteria.
 String asyncExportAllByExample(WikittyImportExportService.FORMAT format, BusinessEntityWikitty e)
          Asynchronous export by example.
 String asyncImportFromUri(WikittyImportExportService.FORMAT format, String uri)
           
 void cancelJob(String jobId)
           
 void freeJobResource(String jobId)
           
 WikittyService getWikittyService()
           
 JobState infoJob(String jobId)
          Return job information.
 String syncExportAllByCriteria(WikittyImportExportService.FORMAT format, Criteria criteria)
          Synchronous export by criteria.
 String syncExportAllByExample(WikittyImportExportService.FORMAT format, BusinessEntityWikitty e)
          Synchronous export by example.
 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

MAX_IMPORT_EXPORT_THREAD

protected static final int MAX_IMPORT_EXPORT_THREAD
number of thread used to import/export task

See Also:
Constant Field Values

EXPORT_DIRECTORY

protected static final String EXPORT_DIRECTORY
directory path where export asynchronous file are stored

See Also:
Constant Field Values

EXPORT_URL

protected static final String EXPORT_URL
url used by client to retrieve export file when job is ended

See Also:
Constant Field Values

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


ws

protected WikittyService ws

securityToken

protected String securityToken
Constructor Detail

WikittyImportExportService

public WikittyImportExportService(String securityToken,
                                  WikittyService ws)
Method Detail

getWikittyService

public WikittyService getWikittyService()

syncImport

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

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,
                                      BusinessEntityWikitty e)
Asynchronous export by example.

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

syncExportAllByExample

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

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

asyncExportAllByCriteria

public String asyncExportAllByCriteria(WikittyImportExportService.FORMAT format,
                                       Criteria criteria)
Asynchronous export by criteria.

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

syncExportAllByCriteria

public String syncExportAllByCriteria(WikittyImportExportService.FORMAT format,
                                      Criteria criteria)
Synchronous export by criteria.

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

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-2010 CodeLutin. All Rights Reserved.