org.apache.lenya.cms.lucene
Class IndexUpdaterImpl

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.lucene.IndexUpdaterImpl
All Implemented Interfaces:
org.apache.avalon.framework.activity.Startable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.thread.ThreadSafe, IndexUpdater, org.apache.lenya.cms.observation.RepositoryListener

public class IndexUpdaterImpl
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements IndexUpdater, org.apache.avalon.framework.activity.Startable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.thread.ThreadSafe

Index updater implementation.


Field Summary
 
Fields inherited from interface org.apache.lenya.cms.lucene.IndexUpdater
ROLE
 
Constructor Summary
IndexUpdaterImpl()
           
 
Method Summary
 void delete(org.apache.lenya.cms.repository.Session session, org.apache.lenya.cms.publication.ResourceType resourceType, java.lang.String pubId, java.lang.String area, java.lang.String uuid, java.lang.String language)
          Deletes a document from the index.
 void eventFired(org.apache.lenya.cms.observation.RepositoryEvent repoEvent)
           
 void index(org.apache.lenya.cms.repository.Session session, org.apache.lenya.cms.publication.ResourceType resourceType, java.lang.String pubId, java.lang.String area, java.lang.String uuid, java.lang.String language)
          Adds a document to the index.
 void service(org.apache.avalon.framework.service.ServiceManager manager)
           
 void start()
           
 void stop()
           
protected  void updateIndex(java.lang.String operation, org.apache.lenya.cms.publication.ResourceType resourceType, java.lang.String pubId, java.lang.String area, java.lang.String uuid, java.lang.String language)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexUpdaterImpl

public IndexUpdaterImpl()
Method Detail

eventFired

public void eventFired(org.apache.lenya.cms.observation.RepositoryEvent repoEvent)
Specified by:
eventFired in interface org.apache.lenya.cms.observation.RepositoryListener

updateIndex

protected void updateIndex(java.lang.String operation,
                           org.apache.lenya.cms.publication.ResourceType resourceType,
                           java.lang.String pubId,
                           java.lang.String area,
                           java.lang.String uuid,
                           java.lang.String language)
                    throws IndexException
Throws:
IndexException

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface org.apache.avalon.framework.activity.Startable
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface org.apache.avalon.framework.activity.Startable
Throws:
java.lang.Exception

service

public void service(org.apache.avalon.framework.service.ServiceManager manager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException

delete

public void delete(org.apache.lenya.cms.repository.Session session,
                   org.apache.lenya.cms.publication.ResourceType resourceType,
                   java.lang.String pubId,
                   java.lang.String area,
                   java.lang.String uuid,
                   java.lang.String language)
            throws IndexException
Description copied from interface: IndexUpdater
Deletes a document from the index.

Specified by:
delete in interface IndexUpdater
Parameters:
session - The session.
resourceType - The resource type.
pubId - The publication ID.
area - The area.
uuid - The UUID.
language - The language.
Throws:
IndexException - if an error occurs.

index

public void index(org.apache.lenya.cms.repository.Session session,
                  org.apache.lenya.cms.publication.ResourceType resourceType,
                  java.lang.String pubId,
                  java.lang.String area,
                  java.lang.String uuid,
                  java.lang.String language)
           throws IndexException
Description copied from interface: IndexUpdater
Adds a document to the index.

Specified by:
index in interface IndexUpdater
Parameters:
session - The session.
resourceType - The resource type.
pubId - The publication ID.
area - The area.
uuid - The UUID.
language - The language.
Throws:
IndexException - if an error occurs.


Copyright © $ Apache Software Foundation. All Rights Reserved.