|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.repository.search.indexing.ItemAndSpecifierStack atg.repository.search.indexing.Context
public class Context
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)
|
boolean |
containsAttribute(java.lang.String pName)
Returns true if the context attributes contains a mapping for the specified attribute name. |
void |
copyFrom(ItemAndSpecifierStack pItemAndSpecifierStack)
Copy property values from the specified Context. |
void |
endTransaction()
End the current transaction. |
atg.repository.search.indexing.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 a thread-specific attribute by name. |
java.util.Map |
getAttributes()
Get a read-only representation of the thread-specific 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. |
atg.repository.search.indexing.PropertyAccessor |
getDefaultAccessor()
Return the default property. |
java.util.Map |
getDevelopmentLineItems()
|
atg.repository.search.indexing.DevLineIndexInfo |
getDevLineIndexInfo()
|
atg.repository.search.indexing.threading.ProcessItemDispatcher |
getDispatcher()
|
java.lang.String |
getDocumentRepositoryId()
Get the repository id of the repository item that corresponds to the document. |
atg.repository.search.indexing.DocumentSubmitterSession |
getDocumentSubmitterSession()
Get the document submitter session. |
java.lang.Object |
getGlobalAttribute(java.lang.String pName)
Get an attribute by name. |
java.util.Map |
getGlobalAttributes()
Get a read-only representation of the attributes map. |
atg.search.index.IndexInfo |
getIndexInfo()
Get the IndexInfo object provided by the Search Admin or null. |
java.lang.String |
getIndexingHashValue()
The value to use for 'stringForHash' in the indexing commands. |
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. |
atg.repository.search.indexing.OutputDocumentContent |
getOutputDocumentContent()
Get the output document content object. |
int |
getSplitValueIndex()
The split value index. |
atg.repository.search.indexing.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. |
boolean |
isRunningInSubThread()
Whether this context is running in a sub-thread. |
java.lang.Object |
removeAttribute(java.lang.String pName)
Remove a thread-specific attribute by name. |
java.lang.Object |
removeGlobalAttribute(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)
Set a thread-specific 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(atg.repository.search.indexing.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(atg.repository.search.indexing.DocumentSubmitterSession pDocumentSubmitterSession)
Set the document submitter session. |
void |
setGlobalAttribute(java.lang.String pName,
java.lang.Object pGlobalAttribute)
Set an attribute by name. |
void |
setIndexInfo(atg.search.index.IndexInfo pIndexInfo)
Set the IndexInfo object provided by the Search Admin. |
void |
setIndexingHashValue(java.lang.String pValue)
The value to use for 'stringForHash' in the indexing commands. |
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(atg.repository.search.indexing.OutputDocumentContent pOutputDocumentContent)
Set the output document content object. |
void |
setSplitValueIndex(int pSplitValueIndex)
The split value index. |
void |
setStatus(atg.repository.search.indexing.ContextStatusEnum pStatus)
Set the status for this context. |
boolean |
shouldUseDispatcher()
Whether the sub-thread proces item dispatcher should be used. |
void |
updateLastActivityTime()
|
Methods inherited from class atg.repository.search.indexing.ItemAndSpecifierStack |
---|
clearParents, 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 |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public Context()
Method Detail |
---|
public boolean isDocumentInDevLine()
public void setDocumentInDevLine(boolean pInDevLine)
public void setDevelopmentLineItems(java.util.Map pItems)
public java.util.Map getDevelopmentLineItems()
public void setDevLineIndexInfo(atg.repository.search.indexing.DevLineIndexInfo pDevLineIndexInfo)
public atg.repository.search.indexing.DevLineIndexInfo getDevLineIndexInfo()
public java.lang.String getCurrentURL()
getCurrentURL
in interface atg.repository.search.indexing.ContextStatus
public void setCurrentURL(java.lang.String pURL)
public void setCurrentBaseURL(java.lang.String pCurrentBaseURL)
public java.lang.String getCurrentBaseURL()
public java.lang.String getIndexingHashValue()
public void setIndexingHashValue(java.lang.String pValue)
pValue
- the value to use for 'stringForHash'public void setDocumentRepositoryId(java.lang.String pDocumentRepositoryId)
public java.lang.String getDocumentRepositoryId()
public atg.repository.search.indexing.PropertyAccessor getDefaultAccessor()
public atg.repository.search.indexing.PropertyAccessor getAccessorForPropertyPath(java.lang.String pPropertyPath)
public void setOutputDocumentContent(atg.repository.search.indexing.OutputDocumentContent pOutputDocumentContent)
public atg.repository.search.indexing.OutputDocumentContent getOutputDocumentContent()
public void setDocumentSubmitterSession(atg.repository.search.indexing.DocumentSubmitterSession pDocumentSubmitterSession)
public atg.repository.search.indexing.DocumentSubmitterSession getDocumentSubmitterSession()
public void setOnlyNonDocumentItems(boolean pOnlyNonDocumentItems)
public boolean isOnlyNonDocumentItems()
public boolean isAllowingMultipleSubmitsPerURL()
public void setAllowingMultipleSubmitsPerURL(boolean pAllowingMultipleSubmitsPerURL)
public void setGlobalAttribute(java.lang.String pName, java.lang.Object pGlobalAttribute)
public java.lang.Object getGlobalAttribute(java.lang.String pName)
public java.lang.Object removeGlobalAttribute(java.lang.String pName)
public java.util.Map getGlobalAttributes()
public void setAttribute(java.lang.String pName, java.lang.Object pAttribute)
public java.lang.Object getAttribute(java.lang.String pName)
public boolean containsAttribute(java.lang.String pName)
public java.lang.Object removeAttribute(java.lang.String pName)
public java.util.Map getAttributes()
public void addGeneratedDocumentURL(java.lang.String pURL)
public boolean hasGeneratedDocumentURL(java.lang.String pURL)
pURL
- The URL to check for previous generation.public void addDeletedDocumentURL(java.lang.String pURL)
public boolean hasDeletedDocumentURL(java.lang.String pURL)
pURL
- The URL to check for previous generation.public void setLastActivityPersistedTime(long pLastActivityPersistedTime)
public long getLastActivityPersistedTime()
getLastActivityPersistedTime
in interface atg.repository.search.indexing.ContextStatus
public void setClaimedGeneration(int pClaimedGeneration)
public int getClaimedGeneration()
getClaimedGeneration
in interface atg.repository.search.indexing.ContextStatus
public void setIndexingOutputConfig(IndexingOutputConfig pIndexingOutputConfig)
public IndexingOutputConfig getIndexingOutputConfig()
public void setIterationUniqueParams(java.util.Map pIterationUniqueParams)
public java.util.Map getIterationUniqueParams()
public void setSplitValueIndex(int pSplitValueIndex)
public int getSplitValueIndex()
public void setCurrentDocumentLocale(java.util.Locale pCurrentDocumentLocale)
public java.util.Locale getCurrentDocumentLocale()
public int getNumSuccesses()
getNumSuccesses
in interface atg.repository.search.indexing.ContextStatus
public void incrementSuccesses()
public int getNumFailures()
getNumFailures
in interface atg.repository.search.indexing.ContextStatus
public void incrementFailures()
public void setStatus(atg.repository.search.indexing.ContextStatusEnum pStatus)
public atg.repository.search.indexing.ContextStatusEnum getStatus()
getStatus
in interface atg.repository.search.indexing.ContextStatus
public void setBulkLoad(boolean pBulkLoad)
public boolean isBulkLoad()
public void setLoader(LoaderImpl pLoader)
public LoaderImpl getLoader()
public java.lang.String getIndexingOutputConfigurationPath()
getIndexingOutputConfigurationPath
in interface atg.repository.search.indexing.ContextStatus
public void updateLastActivityTime() throws IndexingException
IndexingException
public atg.search.index.IndexInfo getIndexInfo()
getIndexInfo
in interface atg.repository.search.indexing.ContextStatus
public void setIndexInfo(atg.search.index.IndexInfo pIndexInfo)
public boolean hasTransactionDemarcation()
public TransactionDemarcation beginTransaction(javax.transaction.TransactionManager pTransactionManager) throws TransactionDemarcationException
TransactionDemarcationException
public void endTransaction() throws TransactionDemarcationException
TransactionDemarcationException
public boolean isRunningInSubThread()
public boolean shouldUseDispatcher()
public atg.repository.search.indexing.threading.ProcessItemDispatcher getDispatcher()
public void copyFrom(ItemAndSpecifierStack pItemAndSpecifierStack)
copyFrom
in class ItemAndSpecifierStack
pItemAndSpecifierStack
- the object from which to copy. Must
be an instance of Context.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |