atg.repository.search.indexing
Class Context

java.lang.Object
  extended by atg.repository.search.indexing.ItemAndSpecifierStack
      extended by atg.repository.search.indexing.Context

public class Context
extends ItemAndSpecifierStack

A context class used by the LoaderImpl and subclasses and passed to the various methods of PropertyAccessor. It contains a current list of parents (both specifiers and repository items), the current document URL (if any), the current collected output values (if any), and status information.

The Context class is also used (via the ContextStatus interface and ContextStatusImpl object) to provide status information to th HTML admin.

Created: February 07 2005


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
Context()
           
 
Method Summary
 void addDeletedDocumentURL(java.lang.String pURL)
          Add a deleted documnet URL to the list.
 void addGeneratedDocumentURL(java.lang.String pURL)
          Add a generated documnet URL to the list.
 TransactionDemarcation beginTransaction(javax.transaction.TransactionManager pTransactionManager)
           
 void endTransaction()
          End the current transaction.
 PropertyAccessor getAccessorForPropertyPath(java.lang.String pPropertyPath)
          Get the appropriate property accessor for the specified property path.
 java.lang.Object getAttribute(java.lang.String pName)
          Get an attribute by name.
 java.util.Map getAttributes()
          Get a read-only representation of the attributes map.
 int getClaimedGeneration()
          Get the change generation claimed by the current indexing update task.
 java.lang.String getCurrentBaseURL()
          The current base URL.
 java.util.Locale getCurrentDocumentLocale()
          Get the locale for the current document.
 java.lang.String getCurrentURL()
          Return the URL for the current document being generated.
 PropertyAccessor getDefaultAccessor()
          Return the default property.
 java.util.Map getDevelopmentLineItems()
           
 DevLineIndexInfo getDevLineIndexInfo()
           
 java.lang.String getDocumentRepositoryId()
          Get the repository id of the repository item that corresponds to the document.
 DocumentSubmitterSession getDocumentSubmitterSession()
          Get the document submitter session.
 IndexingOutputConfig getIndexingOutputConfig()
          Get the indexing output config for which this context was create.
 java.lang.String getIndexingOutputConfigurationPath()
          Return the absolute Nucleus path for the indexing output configuration.
 java.util.Map getIterationUniqueParams()
          Get the iteration unique parameters...
 long getLastActivityPersistedTime()
          Get the time at which lastActivity time was persisted.
 LoaderImpl getLoader()
          The loader that created this Context.
 int getNumFailures()
          The number of failures.
 int getNumSuccesses()
          The number of successes.
 OutputDocumentContent getOutputDocumentContent()
          Get the output document content object.
 int getSplitValueIndex()
          The split value index.
 ContextStatusEnum getStatus()
          Get the status for this context.
 boolean hasDeletedDocumentURL(java.lang.String pURL)
          Return whether the document URL has already been deleted .
 boolean hasGeneratedDocumentURL(java.lang.String pURL)
          Return whether the document URL has already been generated .
 boolean hasTransactionDemarcation()
           
 void incrementFailures()
          Increment the number of failures.
 void incrementSuccesses()
          Increment the number of successes.
 boolean isAllowingMultipleSubmitsPerURL()
          Whether to allow multiple submits per document URL.
 boolean isBulkLoad()
          Whether we are currently doing a full/bulk load.
 boolean isDocumentInDevLine()
           
 boolean isOnlyNonDocumentItems()
          Get the onlyNonDocumentItems entry to true.
 java.lang.Object removeAttribute(java.lang.String pName)
          Remove an attribute by name.
 void setAllowingMultipleSubmitsPerURL(boolean pAllowingMultipleSubmitsPerURL)
          Whether to allow multiple submits per document URL.
 void setAttribute(java.lang.String pName, java.lang.Object pAttribute)
          Get an attribute by name.
 void setBulkLoad(boolean pBulkLoad)
          Whether we are currently doing a full/bulk load.
 void setClaimedGeneration(int pClaimedGeneration)
          Set the change generation claimed by the current indexing update task.
 void setCurrentBaseURL(java.lang.String pCurrentBaseURL)
          The current base URL.
 void setCurrentDocumentLocale(java.util.Locale pCurrentDocumentLocale)
          Set the locale for the current document.
 void setCurrentURL(java.lang.String pURL)
          Set the URL for the current document being generated.
 void setDevelopmentLineItems(java.util.Map pItems)
           
 void setDevLineIndexInfo(DevLineIndexInfo pDevLineIndexInfo)
           
 void setDocumentInDevLine(boolean pInDevLine)
           
 void setDocumentRepositoryId(java.lang.String pDocumentRepositoryId)
          Set the repository id of the repository item that corresponds to the document.
 void setDocumentSubmitterSession(DocumentSubmitterSession pDocumentSubmitterSession)
          Set the document submitter session.
 void setIndexingOutputConfig(IndexingOutputConfig pIndexingOutputConfig)
          Set the indexing output config for which this context was create.
 void setIterationUniqueParams(java.util.Map pIterationUniqueParams)
          Set the iteration unique parameters...
 void setLastActivityPersistedTime(long pLastActivityPersistedTime)
          Set the time at which lastActivity time was persisted.
 void setLoader(LoaderImpl pLoader)
          The loader that created this Context.
 void setOnlyNonDocumentItems(boolean pOnlyNonDocumentItems)
          Set the onlyNonDocumentItems property.
 void setOutputDocumentContent(OutputDocumentContent pOutputDocumentContent)
          Set the output document content object.
 void setSplitValueIndex(int pSplitValueIndex)
          The split value index.
 void setStatus(ContextStatusEnum pStatus)
          Set the status for this context.
 void updateLastActivityTime()
           
 
Methods inherited from class atg.repository.search.indexing.ItemAndSpecifierStack
getAncestorCount, getNthAncestor, getNthAncestorItemAndSpecifier, getParent, isInDocument, popParent, pushParent, pushParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

Context

public Context()
Method Detail

isDocumentInDevLine

public boolean isDocumentInDevLine()

setDocumentInDevLine

public void setDocumentInDevLine(boolean pInDevLine)

setDevelopmentLineItems

public void setDevelopmentLineItems(java.util.Map pItems)

getDevelopmentLineItems

public java.util.Map getDevelopmentLineItems()

setDevLineIndexInfo

public void setDevLineIndexInfo(DevLineIndexInfo pDevLineIndexInfo)

getDevLineIndexInfo

public DevLineIndexInfo getDevLineIndexInfo()

getCurrentURL

public java.lang.String getCurrentURL()
Return the URL for the current document being generated.


setCurrentURL

public void setCurrentURL(java.lang.String pURL)
Set the URL for the current document being generated.


setCurrentBaseURL

public void setCurrentBaseURL(java.lang.String pCurrentBaseURL)
The current base URL. This is the repository item URL with only the iteration parameters.


getCurrentBaseURL

public java.lang.String getCurrentBaseURL()
The current base URL. This is the repository item URL with only the iteration parameters.


setDocumentRepositoryId

public void setDocumentRepositoryId(java.lang.String pDocumentRepositoryId)
Set the repository id of the repository item that corresponds to the document.


getDocumentRepositoryId

public java.lang.String getDocumentRepositoryId()
Get the repository id of the repository item that corresponds to the document.


getDefaultAccessor

public PropertyAccessor getDefaultAccessor()
Return the default property.


getAccessorForPropertyPath

public PropertyAccessor getAccessorForPropertyPath(java.lang.String pPropertyPath)
Get the appropriate property accessor for the specified property path.


setOutputDocumentContent

public void setOutputDocumentContent(OutputDocumentContent pOutputDocumentContent)
Set the output document content object.


getOutputDocumentContent

public OutputDocumentContent getOutputDocumentContent()
Get the output document content object.


setDocumentSubmitterSession

public void setDocumentSubmitterSession(DocumentSubmitterSession pDocumentSubmitterSession)
Set the document submitter session. This is used for submitting document content.


getDocumentSubmitterSession

public DocumentSubmitterSession getDocumentSubmitterSession()
Get the document submitter session. This is used for submitting document content.


setOnlyNonDocumentItems

public void setOnlyNonDocumentItems(boolean pOnlyNonDocumentItems)
Set the onlyNonDocumentItems property. If true, this causes processItem to only process Non-document child items.


isOnlyNonDocumentItems

public boolean isOnlyNonDocumentItems()
Get the onlyNonDocumentItems entry to true. This causes processItem to only process Non-document child items.


isAllowingMultipleSubmitsPerURL

public boolean isAllowingMultipleSubmitsPerURL()
Whether to allow multiple submits per document URL.


setAllowingMultipleSubmitsPerURL

public void setAllowingMultipleSubmitsPerURL(boolean pAllowingMultipleSubmitsPerURL)
Whether to allow multiple submits per document URL.


setAttribute

public void setAttribute(java.lang.String pName,
                         java.lang.Object pAttribute)
Get an attribute by name.


getAttribute

public java.lang.Object getAttribute(java.lang.String pName)
Get an attribute by name.


removeAttribute

public java.lang.Object removeAttribute(java.lang.String pName)
Remove an attribute by name.


getAttributes

public java.util.Map getAttributes()
Get a read-only representation of the attributes map.


addGeneratedDocumentURL

public void addGeneratedDocumentURL(java.lang.String pURL)
Add a generated documnet URL to the list.


hasGeneratedDocumentURL

public boolean hasGeneratedDocumentURL(java.lang.String pURL)
Return whether the document URL has already been generated .

Parameters:
pURL - The URL to check for previous generation.

addDeletedDocumentURL

public void addDeletedDocumentURL(java.lang.String pURL)
Add a deleted documnet URL to the list.


hasDeletedDocumentURL

public boolean hasDeletedDocumentURL(java.lang.String pURL)
Return whether the document URL has already been deleted .

Parameters:
pURL - The URL to check for previous generation.

setLastActivityPersistedTime

public void setLastActivityPersistedTime(long pLastActivityPersistedTime)
Set the time at which lastActivity time was persisted.


getLastActivityPersistedTime

public long getLastActivityPersistedTime()
Get the time at which lastActivity time was persisted.


setClaimedGeneration

public void setClaimedGeneration(int pClaimedGeneration)
Set the change generation claimed by the current indexing update task.


getClaimedGeneration

public int getClaimedGeneration()
Get the change generation claimed by the current indexing update task.


setIndexingOutputConfig

public void setIndexingOutputConfig(IndexingOutputConfig pIndexingOutputConfig)
Set the indexing output config for which this context was create.


getIndexingOutputConfig

public IndexingOutputConfig getIndexingOutputConfig()
Get the indexing output config for which this context was create.


setIterationUniqueParams

public void setIterationUniqueParams(java.util.Map pIterationUniqueParams)
Set the iteration unique parameters... these are the parameters that make this iteration unique.


getIterationUniqueParams

public java.util.Map getIterationUniqueParams()
Get the iteration unique parameters... these are the parameters that make this iteration unique.


setSplitValueIndex

public void setSplitValueIndex(int pSplitValueIndex)
The split value index. For unsplit values, will be zero.


getSplitValueIndex

public int getSplitValueIndex()
The split value index. For unsplit values, will be zero.


setCurrentDocumentLocale

public void setCurrentDocumentLocale(java.util.Locale pCurrentDocumentLocale)
Set the locale for the current document. Null means use the default Locale.


getCurrentDocumentLocale

public java.util.Locale getCurrentDocumentLocale()
Get the locale for the current document. Null means use the default Locale.


getNumSuccesses

public int getNumSuccesses()
The number of successes.


incrementSuccesses

public void incrementSuccesses()
Increment the number of successes.


getNumFailures

public int getNumFailures()
The number of failures.


incrementFailures

public void incrementFailures()
Increment the number of failures.


setStatus

public void setStatus(ContextStatusEnum pStatus)
Set the status for this context.


getStatus

public ContextStatusEnum getStatus()
Get the status for this context.


setBulkLoad

public void setBulkLoad(boolean pBulkLoad)
Whether we are currently doing a full/bulk load.


isBulkLoad

public boolean isBulkLoad()
Whether we are currently doing a full/bulk load.


setLoader

public void setLoader(LoaderImpl pLoader)
The loader that created this Context.


getLoader

public LoaderImpl getLoader()
The loader that created this Context.


getIndexingOutputConfigurationPath

public java.lang.String getIndexingOutputConfigurationPath()
Return the absolute Nucleus path for the indexing output configuration.


updateLastActivityTime

public void updateLastActivityTime()
                            throws IndexingException
Throws:
IndexingException

hasTransactionDemarcation

public boolean hasTransactionDemarcation()

beginTransaction

public TransactionDemarcation beginTransaction(javax.transaction.TransactionManager pTransactionManager)
                                        throws TransactionDemarcationException
Throws:
TransactionDemarcationException

endTransaction

public void endTransaction()
                    throws TransactionDemarcationException
End the current transaction. Throws an exception if the transaction is not in place. Always clears the current TransactionDemarcation.

Throws:
TransactionDemarcationException