org.sharengo.wikitty
Class WikittyProxy

java.lang.Object
  extended by org.sharengo.wikitty.WikittyProxy

public class WikittyProxy
extends Object

Version:
$Revision: 36 $ Last update: $Date: 2010-05-06 11:48:36 +0200 (jeu., 06 mai 2010) $ by : $Author: echatellier $
Author:
poussin

Field Summary
protected  WikittyService wikittyService
           
 
Constructor Summary
WikittyProxy()
           
 
Method Summary
 void addLabel(String wikittyId, String label)
           
 String asyncExportAllByCriteria(Criteria criteria)
           
<E extends BusinessEntityWikitty>
String
asyncExportAllByExample(E e)
           
 String asyncImportFromUri(String uri)
           
 void cancelJob(String jobId)
          cancel job you must call freeJobResource
 void delete(Collection<String> ids)
           
 void delete(String id)
           
 Set<String> findAllAppliedLabels(String wikittyId)
           
<E extends BusinessEntity>
PagedResult<E>
findAllByCriteria(Class<E> clazz, Criteria criteria)
          Search object that correspond to criteria and that have all extension needed by BusinessEntity (clazz).
<E extends BusinessEntityWikitty>
PagedResult<E>
findAllByExample(E e, int firstIndex, int endIndex, String... fieldFacet)
           
 PagedResult<Wikitty> findAllByLabel(String label, int firstIndex, int endIndex)
           
<E extends BusinessEntity>
E
findByCriteria(Class<E> clazz, Criteria criteria)
           
<E extends BusinessEntityWikitty>
E
findByExample(E e)
           
 Wikitty findByLabel(String label)
           
 void freeJobResource(String jobId)
          This method must be call when your job is done and you have result, or when you call cancelJob
 WikittyService getWikittyService()
           
<E extends BusinessEntity>
boolean
hasType(Class<E> clazz, String wikittyId)
           
 JobState infoJob(String jobId)
          give the job state
<E extends BusinessEntity>
List<E>
restore(Class<E> clazz, List<String> id)
           
<E extends BusinessEntity>
List<E>
restore(Class<E> clazz, List<String> id, boolean checkExtension)
           
<E extends BusinessEntity>
E
restore(Class<E> clazz, String id)
          Restore wikitty entity with specified id or null if entity can't be found.
<E extends BusinessEntity>
E
restore(Class<E> clazz, String id, boolean checkExtension)
          Restore wikitty entity with specified id or null if entity can't be found.
<E extends BusinessEntity>
Map<E,Integer>
restoreChildren(Class<E> clazz, String wikittyId, Criteria filter)
           
<E extends BusinessEntity>
Map<E,Integer>
restoreChildren(Class<E> clazz, String wikittyId, Criteria filter, boolean checkExtension)
           
<E extends BusinessEntity>
Map.Entry<E,Integer>
restoreNode(Class<E> clazz, String wikittyId, Criteria filter)
           
<E extends BusinessEntity>
Map.Entry<E,Integer>
restoreNode(Class<E> clazz, String wikittyId, Criteria filter, boolean checkExtension)
           
 Tree restoreTree(String wikittyId)
           
 Wikitty restoreVersion(String wikittyId, String version)
           
 void setWikittyService(WikittyService wikittyService)
           
<E extends BusinessEntity>
E
store(E e)
           
<E extends BusinessEntity>
List<E>
store(List<E> objets)
          Store to WikittyService objects.
 String syncExportAllByCriteria(Criteria criteria)
           
<E extends BusinessEntityWikitty>
String
syncExportAllByExample(E e)
           
 void syncImportFromUri(String uri)
           
 void syncImportFromXml(String xml)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wikittyService

protected WikittyService wikittyService
Constructor Detail

WikittyProxy

public WikittyProxy()
Method Detail

getWikittyService

public WikittyService getWikittyService()

setWikittyService

public void setWikittyService(WikittyService wikittyService)

store

public <E extends BusinessEntity> E store(E e)

store

public <E extends BusinessEntity> List<E> store(List<E> objets)
Store to WikittyService objects.

Parameters:
objets - list of BeanDto
Returns:

restore

public <E extends BusinessEntity> E restore(Class<E> clazz,
                                            String id,
                                            boolean checkExtension)
Restore wikitty entity with specified id or null if entity can't be found.

Parameters:
clazz - entity class
id - entity id
checkExtension - if true check that Wikitty result has all extension declared in clazz
Returns:
wikitty entity with specified id or null if entity can't be found

restore

public <E extends BusinessEntity> E restore(Class<E> clazz,
                                            String id)
Restore wikitty entity with specified id or null if entity can't be found.

Parameters:
clazz - entity class
id - entity id
Returns:
wikitty entity with specified id or null if entity can't be found

restore

public <E extends BusinessEntity> List<E> restore(Class<E> clazz,
                                                  List<String> id,
                                                  boolean checkExtension)
Parameters:
clazz -
id -
checkExtension - if true check that Wikitty result has all extension
Returns:

restore

public <E extends BusinessEntity> List<E> restore(Class<E> clazz,
                                                  List<String> id)

delete

public void delete(String id)

delete

public void delete(Collection<String> ids)

findAllByExample

public <E extends BusinessEntityWikitty> PagedResult<E> findAllByExample(E e,
                                                                         int firstIndex,
                                                                         int endIndex,
                                                                         String... fieldFacet)

findByExample

public <E extends BusinessEntityWikitty> E findByExample(E e)

findAllByCriteria

public <E extends BusinessEntity> PagedResult<E> findAllByCriteria(Class<E> clazz,
                                                                   Criteria criteria)
Search object that correspond to criteria and that have all extension needed by BusinessEntity (clazz). If criteria is null, find all extensions else if crtiteria is empty return nothing.

Parameters:
clazz -
criteria -
firstIndex -
endIndex -
Returns:

findByCriteria

public <E extends BusinessEntity> E findByCriteria(Class<E> clazz,
                                                   Criteria criteria)

addLabel

public void addLabel(String wikittyId,
                     String label)

findAllByLabel

public PagedResult<Wikitty> findAllByLabel(String label,
                                           int firstIndex,
                                           int endIndex)

findByLabel

public Wikitty findByLabel(String label)

findAllAppliedLabels

public Set<String> findAllAppliedLabels(String wikittyId)

restoreTree

public Tree restoreTree(String wikittyId)

restoreNode

public <E extends BusinessEntity> Map.Entry<E,Integer> restoreNode(Class<E> clazz,
                                                                   String wikittyId,
                                                                   Criteria filter)

restoreNode

public <E extends BusinessEntity> Map.Entry<E,Integer> restoreNode(Class<E> clazz,
                                                                   String wikittyId,
                                                                   Criteria filter,
                                                                   boolean checkExtension)

restoreChildren

public <E extends BusinessEntity> Map<E,Integer> restoreChildren(Class<E> clazz,
                                                                 String wikittyId,
                                                                 Criteria filter)

restoreChildren

public <E extends BusinessEntity> Map<E,Integer> restoreChildren(Class<E> clazz,
                                                                 String wikittyId,
                                                                 Criteria filter,
                                                                 boolean checkExtension)

restoreVersion

public Wikitty restoreVersion(String wikittyId,
                              String version)

hasType

public <E extends BusinessEntity> boolean hasType(Class<E> clazz,
                                                  String wikittyId)

syncImportFromXml

public void syncImportFromXml(String xml)

syncImportFromUri

public void syncImportFromUri(String uri)

asyncImportFromUri

public String asyncImportFromUri(String uri)
Parameters:
uri -
Returns:
job id

asyncExportAllByExample

public <E extends BusinessEntityWikitty> String asyncExportAllByExample(E e)
Parameters:
e -
Returns:
job id

syncExportAllByExample

public <E extends BusinessEntityWikitty> String syncExportAllByExample(E e)
Parameters:
e -
Returns:
xml string

asyncExportAllByCriteria

public String asyncExportAllByCriteria(Criteria criteria)
Parameters:
criteria -
Returns:
job id

syncExportAllByCriteria

public String syncExportAllByCriteria(Criteria criteria)
Parameters:
criteria -
Returns:
xml string

infoJob

public JobState infoJob(String jobId)
give the job state

Parameters:
jobId -
Returns:

cancelJob

public void cancelJob(String jobId)
cancel job you must call freeJobResource

Parameters:
jobId -

freeJobResource

public void freeJobResource(String jobId)
This method must be call when your job is done and you have result, or when you call cancelJob

Parameters:
jobId -


Copyright © 2009-2010 CodeLutin. All Rights Reserved.