org.nuiton.wikitty.publication
Class AbstractWikittyFileService

java.lang.Object
  extended by org.nuiton.wikitty.publication.AbstractWikittyFileService
All Implemented Interfaces:
WikittyService
Direct Known Subclasses:
WikittyPublicationFileSystem, WikittyServiceJarLoader

public abstract class AbstractWikittyFileService
extends Object
implements WikittyService

This service must be extends by wikitty service that are over file system directly or this kind of storage for wikitty.

Author:
mfortun

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nuiton.wikitty.WikittyService
WikittyService.ServiceListenerType
 
Constructor Summary
AbstractWikittyFileService()
           
 
Method Summary
 boolean checkRestriction(Restriction restriction, Wikitty w)
          Write by jcouteau, used to check if a wikitty check a restriction
 List<PagedResult<String>> findAllByCriteria(String securityToken, List<Criteria> criteria)
           
 List<String> findByCriteria(String securityToken, List<Criteria> criteria)
           
protected abstract  Map<String,Wikitty> getAllWikitties()
          Method that must be implemented by the extended service.
 WikittyExtension restoreExtensionLastVersion(String securityToken, String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuiton.wikitty.WikittyService
addWikittyServiceListener, canDelete, canRead, canWrite, clear, delete, deleteExtension, deleteTree, exists, findTreeNode, getAllExtensionIds, getAllExtensionsRequires, isDeleted, login, logout, removeWikittyServiceListener, replay, restore, restoreExtension, restoreVersion, store, storeExtension, syncSearchEngine
 

Constructor Detail

AbstractWikittyFileService

public AbstractWikittyFileService()
Method Detail

getAllWikitties

protected abstract Map<String,Wikitty> getAllWikitties()
Method that must be implemented by the extended service. This must return all the wikitty stored. The result will be use to checkrestriction for a find.

Returns:
a Map with wikittyId as Key and wikitty as value

checkRestriction

public boolean checkRestriction(Restriction restriction,
                                Wikitty w)
Write by jcouteau, used to check if a wikitty check a restriction

Parameters:
restriction - the restriction
w - the wikitty to check
Returns:
if the wikitty check the restriction
See Also:
WikittySearchEngineInMemory.checkRestriction(org.nuiton.wikitty.services.WikittyTransaction, org.nuiton.wikitty.search.operators.Restriction, org.nuiton.wikitty.entities.Wikitty)

findAllByCriteria

public List<PagedResult<String>> findAllByCriteria(String securityToken,
                                                   List<Criteria> criteria)
Specified by:
findAllByCriteria in interface WikittyService

findByCriteria

public List<String> findByCriteria(String securityToken,
                                   List<Criteria> criteria)
Specified by:
findByCriteria in interface WikittyService

restoreExtensionLastVersion

public WikittyExtension restoreExtensionLastVersion(String securityToken,
                                                    String name)
Specified by:
restoreExtensionLastVersion in interface WikittyService


Copyright © 2010-2011 CodeLutin. All Rights Reserved.