org.alfresco.repo.search
Class AVMSnapShotTriggeredIndexingMethodInterceptorImpl

java.lang.Object
  extended by org.alfresco.repo.search.AVMSnapShotTriggeredIndexingMethodInterceptorImpl
All Implemented Interfaces:
AVMSnapShotTriggeredIndexingMethodInterceptor, org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class AVMSnapShotTriggeredIndexingMethodInterceptorImpl
extends java.lang.Object
implements AVMSnapShotTriggeredIndexingMethodInterceptor

Method interceptor for atomic indexing of AVM entries The properties can defined how stores are indexed based on type (as set by Alfresco the Web site management UI) or based on the name of the store. Creates and deletes are indexed synchronously. Updates may be asynchronous, synchronous or ignored by the index.


Nested Class Summary
static class AVMSnapShotTriggeredIndexingMethodInterceptorImpl.StoreType
           
 
Field Summary
 
Fields inherited from interface org.alfresco.repo.search.AVMSnapShotTriggeredIndexingMethodInterceptor
PROP_SANDBOX_AUTHOR_MAIN, PROP_SANDBOX_AUTHOR_PREVIEW, PROP_SANDBOX_AUTHOR_WORKFLOW_MAIN, PROP_SANDBOX_AUTHOR_WORKFLOW_PREVIEW, PROP_SANDBOX_STAGING_MAIN, PROP_SANDBOX_STAGING_PREVIEW, PROP_SANDBOX_WORKFLOW_MAIN, PROP_SANDBOX_WORKFLOW_PREVIEW
 
Constructor Summary
AVMSnapShotTriggeredIndexingMethodInterceptorImpl()
           
 
Method Summary
 void createIndex(java.lang.String store)
           
 void deleteIndex(java.lang.String store)
           
 AVMLuceneIndexer getIndexer(java.lang.String store)
           
 IndexMode getIndexMode(java.lang.String store)
          Given an avm store name determine if it is indexed and if so how.
 int getLastIndexedSnapshot(java.lang.String store)
           
 boolean hasIndexBeenCreated(java.lang.String store)
           
 void indexSnapshot(java.lang.String store, int after)
           
 void indexSnapshot(java.lang.String store, int before, int after)
           
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi)
           
 boolean isIndexingEnabled()
          Is snapshot triggered indexing enabled
 boolean isIndexUpToDate(java.lang.String store)
          Check if the index is up to date according to its index defintion i it does not check that all asynchronous work is done.
 boolean isIndexUpToDateAndSearchable(java.lang.String store)
          Check if the index is up to date according to its index defintion and that all asynchronous work is done.
 boolean isSnapshotIndexed(java.lang.String store, int id)
          Is the snapshot applied to the index? Is there an entry for any node that was added OR have all the nodes in the transaction been deleted as expected?
 void setAvmService(AVMService avmService)
          Set the AVM service
 void setDefaultMode(IndexMode defaultMode)
          Set the default index mode = used when there are no matches
 void setEnableIndexing(boolean enableIndexing)
          Enable or disable indexing
 void setIndexerAndSearcher(IndexerAndSearcher indexerAndSearcher)
          Set the AVM indexer and searcher
 void setIndexingDefinitions(java.util.List definitions)
          Set the index modes....
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVMSnapShotTriggeredIndexingMethodInterceptorImpl

public AVMSnapShotTriggeredIndexingMethodInterceptorImpl()
Method Detail

invoke

public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi)
                        throws java.lang.Throwable
Specified by:
invoke in interface AVMSnapShotTriggeredIndexingMethodInterceptor
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
java.lang.Throwable

setAvmService

public void setAvmService(AVMService avmService)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Set the AVM service

Specified by:
setAvmService in interface AVMSnapShotTriggeredIndexingMethodInterceptor

setIndexerAndSearcher

public void setIndexerAndSearcher(IndexerAndSearcher indexerAndSearcher)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Set the AVM indexer and searcher

Specified by:
setIndexerAndSearcher in interface AVMSnapShotTriggeredIndexingMethodInterceptor

setEnableIndexing

public void setEnableIndexing(boolean enableIndexing)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Enable or disable indexing

Specified by:
setEnableIndexing in interface AVMSnapShotTriggeredIndexingMethodInterceptor

setIndexingDefinitions

public void setIndexingDefinitions(java.util.List definitions)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Set the index modes.... Strings of the form ... (ASYNCHRONOUS | SYNCHRONOUS | UNINDEXED):(NAME | TYPE):regexp

Specified by:
setIndexingDefinitions in interface AVMSnapShotTriggeredIndexingMethodInterceptor

setDefaultMode

public void setDefaultMode(IndexMode defaultMode)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Set the default index mode = used when there are no matches

Specified by:
setDefaultMode in interface AVMSnapShotTriggeredIndexingMethodInterceptor

isIndexingEnabled

public boolean isIndexingEnabled()
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Is snapshot triggered indexing enabled

Specified by:
isIndexingEnabled in interface AVMSnapShotTriggeredIndexingMethodInterceptor
Returns:
true if indexing is enabled for AVM

indexSnapshot

public void indexSnapshot(java.lang.String store,
                          int before,
                          int after)
Specified by:
indexSnapshot in interface AVMSnapShotTriggeredIndexingMethodInterceptor

indexSnapshot

public void indexSnapshot(java.lang.String store,
                          int after)
Specified by:
indexSnapshot in interface AVMSnapShotTriggeredIndexingMethodInterceptor

getLastIndexedSnapshot

public int getLastIndexedSnapshot(java.lang.String store)
Specified by:
getLastIndexedSnapshot in interface AVMSnapShotTriggeredIndexingMethodInterceptor
Returns:
- the last indexed snapshot

isSnapshotIndexed

public boolean isSnapshotIndexed(java.lang.String store,
                                 int id)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Is the snapshot applied to the index? Is there an entry for any node that was added OR have all the nodes in the transaction been deleted as expected?

Specified by:
isSnapshotIndexed in interface AVMSnapShotTriggeredIndexingMethodInterceptor
Returns:
- true if applied, false if not

isIndexUpToDateAndSearchable

public boolean isIndexUpToDateAndSearchable(java.lang.String store)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Check if the index is up to date according to its index defintion and that all asynchronous work is done.

Specified by:
isIndexUpToDateAndSearchable in interface AVMSnapShotTriggeredIndexingMethodInterceptor
Returns:

isIndexUpToDate

public boolean isIndexUpToDate(java.lang.String store)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Check if the index is up to date according to its index defintion i it does not check that all asynchronous work is done.

Specified by:
isIndexUpToDate in interface AVMSnapShotTriggeredIndexingMethodInterceptor
Returns:

getIndexMode

public IndexMode getIndexMode(java.lang.String store)
Description copied from interface: AVMSnapShotTriggeredIndexingMethodInterceptor
Given an avm store name determine if it is indexed and if so how.

Specified by:
getIndexMode in interface AVMSnapShotTriggeredIndexingMethodInterceptor
Returns:

hasIndexBeenCreated

public boolean hasIndexBeenCreated(java.lang.String store)
Specified by:
hasIndexBeenCreated in interface AVMSnapShotTriggeredIndexingMethodInterceptor

createIndex

public void createIndex(java.lang.String store)
Specified by:
createIndex in interface AVMSnapShotTriggeredIndexingMethodInterceptor

getIndexer

public AVMLuceneIndexer getIndexer(java.lang.String store)
Specified by:
getIndexer in interface AVMSnapShotTriggeredIndexingMethodInterceptor

deleteIndex

public void deleteIndex(java.lang.String store)
Specified by:
deleteIndex in interface AVMSnapShotTriggeredIndexingMethodInterceptor


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.