org.sharengo.wikitty
Interface WikittyService

All Known Implementing Classes:
AbstractWikittyService, WikittyServiceInMemory

public interface WikittyService

Version:
$Revision: 27 $ Last update: $Date: 2010-04-28 17:56:01 +0200 (mer., 28 avril 2010) $ by : $Author: bpoussin $
Author:
poussin

Field Summary
static int ALL_ELEMENTS
          Deprecated. 
 
Method Summary
 void addLabel(String wikittyId, String label)
          add new lable to the wikitty object
 String asyncExportAllByCriteria(Criteria criteria)
           
 String asyncImportFromUri(String uri)
           
 void cancelJob(String jobId)
           
 void clear()
          Use with caution : It will delete ALL indexes from search engine !
 void delete(Collection<String> ids)
          delete all object if id exists
 void delete(String id)
          delete object if id exists
 Set<String> findAllAppliedLabels(String wikittyId)
          retrieve all labels applied on a wikitty object
 PagedResult<Wikitty> findAllByCriteria(Criteria criteria)
           
 PagedResult<Wikitty> findAllByLabel(String label, int firstIndex, int endIndex)
           
 Wikitty findByCriteria(Criteria criteria)
          Fist lonely (or first one) wikitty object that match criteria, if no wikitty found return null
 Wikitty findByLabel(String label)
           
 void freeJobResource(String jobId)
          delete job info and all resources associated to that job (files or other ...)
 List<String> getAllExtensionIds()
          Return all extension id (ex: "extName[version])")
 List<String> getAllExtensionsRequires(String extensionName)
          Return all extension id (ex: "extName[version])") where extensionName is required.
 JobState infoJob(String jobId)
           
 List<Wikitty> restore(List<String> id)
           
 Wikitty restore(String id)
           
 Map<TreeNode,Integer> restoreChildren(String wikittyId, Criteria filter)
          Retrieve all wikitties children with count (no recursively) of an other one Wikitty reference by wikittyId MUST include the 'Node' extension
 WikittyExtension restoreExtension(String id)
           
 WikittyExtension restoreExtensionLastVersion(String name)
          Search extension with name in last version
 Map.Entry<TreeNode,Integer> restoreNode(String wikittyId, Criteria filter)
          Retrieve wikitty node with count.
 Tree restoreTree(String wikittyId)
          Retrieve all wikitties children (recursively) of an other one Wikitty reference by wikittyId MUST include the 'Node' extension
 Wikitty restoreVersion(String wikittyId, String version)
           
 UpdateResponse store(Collection<Wikitty> wikitties)
          Manage Update and creation.
 UpdateResponse store(Collection<Wikitty> wikitties, boolean disableAutoVersionIncrement)
          Manage Update and creation.
 UpdateResponse store(Wikitty wikitty)
          Manage Update and creation.
 UpdateResponse storeExtension(Collection<WikittyExtension> exts)
          Manage Update and creation.
 UpdateResponse storeExtension(WikittyExtension ext)
          Manage Update and creation.
 UpdateResponse syncEngin()
          Synchronise search engine with wikitty strorage engine, i.e. clear and reindex all wikitties.
 String syncExportAllByCriteria(Criteria criteria)
           
 void syncImportFromUri(String uri)
           
 void syncImportFromXml(String xml)
          synchonous or not ?
 

Field Detail

ALL_ELEMENTS

@Deprecated
static final int ALL_ELEMENTS
Deprecated. 
Use Criteria.ALL_ELEMENTS

See Also:
Constant Field Values
Method Detail

clear

void clear()
Use with caution : It will delete ALL indexes from search engine ! This operation should be disabled in production environment.


store

UpdateResponse store(Wikitty wikitty)
Manage Update and creation.

Parameters:
wikitty - contains an id all the time.

store

UpdateResponse store(Collection<Wikitty> wikitties)
Manage Update and creation.

Parameters:
wikitties - list of wikitty to be persisted

store

UpdateResponse store(Collection<Wikitty> wikitties,
                     boolean disableAutoVersionIncrement)
Manage Update and creation.

Parameters:
wikitties - list of wikitty to be persisted
disableAutoVersionIncrement - boolean to disable version increment on saved wikitty

getAllExtensionIds

List<String> getAllExtensionIds()
Return all extension id (ex: "extName[version])")

Returns:

getAllExtensionsRequires

List<String> getAllExtensionsRequires(String extensionName)
Return all extension id (ex: "extName[version])") where extensionName is required.

Returns:

storeExtension

UpdateResponse storeExtension(WikittyExtension ext)
Manage Update and creation.

Parameters:
wikitty - extension to be persisted

storeExtension

UpdateResponse storeExtension(Collection<WikittyExtension> exts)
Manage Update and creation.

Parameters:
exts - list of wikitty extension to be persisted

restoreExtension

WikittyExtension restoreExtension(String id)
Parameters:
id -
Returns:
the corresponding object, exception if no such object found.

restoreExtensionLastVersion

WikittyExtension restoreExtensionLastVersion(String name)
Search extension with name in last version

Parameters:
name -
Returns:
the corresponding object, exception if no such object found.

restore

Wikitty restore(String id)
Parameters:
id - object id to restore
Returns:
the corresponding object, or null if object doesn't exist or is deleted

restore

List<Wikitty> restore(List<String> id)
Parameters:
id - list of wikitty ids to restore
Returns:
list of corresponding wikitty, if one id is not valid (no object or deleted) this id is skip and result list have less elements than collection argument

delete

void delete(String id)
delete object if id exists

Parameters:
id - object's id to remove

delete

void delete(Collection<String> ids)
delete all object if id exists

Parameters:
ids - object's ids to remove

findAllByCriteria

PagedResult<Wikitty> findAllByCriteria(Criteria criteria)
Parameters:
criteria -
Returns:

findByCriteria

Wikitty findByCriteria(Criteria criteria)
Fist lonely (or first one) wikitty object that match criteria, if no wikitty found return null

Parameters:
criteria -
Returns:

addLabel

void addLabel(String wikittyId,
              String label)
add new lable to the wikitty object

Parameters:
wikittyId - id of wikitty object to add label
label - label to add

findAllByLabel

PagedResult<Wikitty> findAllByLabel(String label,
                                    int firstIndex,
                                    int endIndex)
Parameters:
label -
Returns:

findByLabel

Wikitty findByLabel(String label)
Parameters:
addLabel -
Returns:

findAllAppliedLabels

Set<String> findAllAppliedLabels(String wikittyId)
retrieve all labels applied on a wikitty object

Parameters:
wikittyId -
Returns:

restoreTree

Tree restoreTree(String wikittyId)
Retrieve all wikitties children (recursively) of an other one Wikitty reference by wikittyId MUST include the 'Node' extension

Parameters:
wikittyId -
Returns:

restoreNode

Map.Entry<TreeNode,Integer> restoreNode(String wikittyId,
                                        Criteria filter)
Retrieve wikitty node with count. Wikitty reference by wikittyId MUST include the 'Node' extension

Parameters:
wikittyId -
Returns:

restoreChildren

Map<TreeNode,Integer> restoreChildren(String wikittyId,
                                      Criteria filter)
Retrieve all wikitties children with count (no recursively) of an other one Wikitty reference by wikittyId MUST include the 'Node' extension

Parameters:
wikittyId -
Returns:

restoreVersion

Wikitty restoreVersion(String wikittyId,
                       String version)

syncEngin

UpdateResponse syncEngin()
Synchronise search engine with wikitty strorage engine, i.e. clear and reindex all wikitties.

Returns:

syncImportFromXml

void syncImportFromXml(String xml)
synchonous or not ?

Parameters:
xmlData - data to import

syncImportFromUri

void syncImportFromUri(String uri)
Parameters:
uri -

asyncImportFromUri

String asyncImportFromUri(String uri)
Parameters:
uri -
Returns:
a jobID

asyncExportAllByCriteria

String asyncExportAllByCriteria(Criteria criteria)
Parameters:
criteria -
Returns:

syncExportAllByCriteria

String syncExportAllByCriteria(Criteria criteria)
Parameters:
criteria -
Returns:

infoJob

JobState infoJob(String jobId)
Parameters:
jobId -
Returns:

cancelJob

void cancelJob(String jobId)
Parameters:
jobId -

freeJobResource

void freeJobResource(String jobId)
delete job info and all resources associated to that job (files or other ...)



Copyright © 2009-2010 CodeLutin. All Rights Reserved.