atg.repository.search.indexing.accessor
Class LanguagePropertyAccessor

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.repository.search.indexing.PropertyAccessorImpl
              extended by atg.repository.search.indexing.accessor.LanguagePropertyAccessor
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, atg.repository.search.indexing.PropertyAccessor, atg.repository.search.indexing.SchemedPropertyAccessor, java.util.EventListener

public class LanguagePropertyAccessor
extends atg.repository.search.indexing.PropertyAccessorImpl

This propertyAccessor is use to get and return the correct translation of the property of the item for the process of indexing


Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
LanguagePropertyAccessor()
           
 
Method Summary
protected  atg.repository.search.indexing.accessor.LanguagePropertyAccessor.IndexingLanguageTranslation getCachedContextTranslationDescriptor(atg.repository.search.indexing.Context pContext, atg.beans.DynamicPropertyDescriptor pPropertyDescriptor)
          Get the cached ContextTranslationDescriptor, if any.
 java.lang.String getContextCacheKey()
          Get the Context attribute key used to store of the cache fo ContextFirstWithLocale's for a given property descriptor.
protected  java.lang.Object getDefaultPropertyValue(atg.repository.RepositoryItem pItem, java.lang.String pPropertyName)
          This function passes the default value of the property passed to it.
protected  java.lang.Object getTextOrMetaPropertyValue(atg.repository.search.indexing.Context pContext, atg.repository.RepositoryItem pItem, java.lang.String pPropertyName, atg.repository.search.indexing.specifier.PropertyTypeEnum pType)
          This function sets the pContext in the ContextranslationRepositoryKeyService.
 boolean isLoggingDebug()
          Get the logging debug.
 boolean isLoggingError()
          Get the logging error Logs through the IndexingOutputConfig on the Context.
 boolean isLoggingWarning()
          Get the logging warning Logs through the IndexingOutputConfig on the Context.
protected  void putCachedContextTranslationDescriptor(atg.repository.search.indexing.Context pContext, atg.beans.DynamicPropertyDescriptor pPropertyDescriptor, atg.repository.search.indexing.accessor.LanguagePropertyAccessor.IndexingLanguageTranslation pIndexingTranslationDescriptor)
          Cache the specified ContextTranslationDescriptor.
 void setLoggingDebug(boolean pLoggingDebug)
          Set the logging debug.
 void setLoggingError(boolean pLoggingError)
          Set the logging error Logs through the IndexingOutputConfig on the Context.
 void setLoggingWarning(boolean pLoggingWarning)
          Set the logging warning Logs through the IndexingOutputConfig on the Context.
 
Methods inherited from class atg.repository.search.indexing.PropertyAccessorImpl
getMetaPropertyValue, getMetaScheme, getMetaSecurityConstraint, getSiteContextPropertyValue, getSubItemPropertyValue, getTextPropertyValue, getTextSecurityConstraint, onIndexingInitialization, onIndexingTermination, resolveDollarProperty
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingInfo, isLoggingTrace, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingInfo, setLoggingTrace, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Constructor Detail

LanguagePropertyAccessor

public LanguagePropertyAccessor()
Method Detail

setLoggingDebug

public void setLoggingDebug(boolean pLoggingDebug)
Set the logging debug. Logs through the IndexingOutputConfig on the Context.

Specified by:
setLoggingDebug in interface atg.nucleus.logging.ApplicationLogging
Overrides:
setLoggingDebug in class atg.nucleus.GenericService
Parameters:
pLoggingDebug - A boolean value to enable/disable logging debug.

isLoggingDebug

public boolean isLoggingDebug()
Get the logging debug. Logs through the IndexingOutputConfig on the Context.

Specified by:
isLoggingDebug in interface atg.nucleus.logging.ApplicationLogging
Overrides:
isLoggingDebug in class atg.nucleus.GenericService
Returns:
True if loggingDebug set,False otherwise.

setLoggingError

public void setLoggingError(boolean pLoggingError)
Set the logging error Logs through the IndexingOutputConfig on the Context.

Specified by:
setLoggingError in interface atg.nucleus.logging.ApplicationLogging
Overrides:
setLoggingError in class atg.nucleus.GenericService
Parameters:
pLoggingError - A boolean value to enable/disable logging errors.

isLoggingError

public boolean isLoggingError()
Get the logging error Logs through the IndexingOutputConfig on the Context.

Specified by:
isLoggingError in interface atg.nucleus.logging.ApplicationLogging
Overrides:
isLoggingError in class atg.nucleus.GenericService
Returns:
True if logging for errors is enabled,False otherwise.

setLoggingWarning

public void setLoggingWarning(boolean pLoggingWarning)
Set the logging warning Logs through the IndexingOutputConfig on the Context.

Specified by:
setLoggingWarning in interface atg.nucleus.logging.ApplicationLogging
Overrides:
setLoggingWarning in class atg.nucleus.GenericService
Parameters:
pLoggingWarning - A boolean value to enable/disable logging warnings.

isLoggingWarning

public boolean isLoggingWarning()
Get the logging warning Logs through the IndexingOutputConfig on the Context.

Specified by:
isLoggingWarning in interface atg.nucleus.logging.ApplicationLogging
Overrides:
isLoggingWarning in class atg.nucleus.GenericService
Returns:
True if logging for warnings is enabled,False otherwise.

getTextOrMetaPropertyValue

protected java.lang.Object getTextOrMetaPropertyValue(atg.repository.search.indexing.Context pContext,
                                                      atg.repository.RepositoryItem pItem,
                                                      java.lang.String pPropertyName,
                                                      atg.repository.search.indexing.specifier.PropertyTypeEnum pType)
This function sets the pContext in the ContextranslationRepositoryKeyService.

Overrides:
getTextOrMetaPropertyValue in class atg.repository.search.indexing.PropertyAccessorImpl
Parameters:
pContext - Current locale of the property whose value is needed.
pItem - A RepositoryItem object to get the value of the property passed.
pPropertyName - Name of the property whose value is needed.
pType - Type of the property whose value is needed.
Returns:
Object The value of the pPropertyName obtained from TranslationDescriptor.

getCachedContextTranslationDescriptor

protected atg.repository.search.indexing.accessor.LanguagePropertyAccessor.IndexingLanguageTranslation getCachedContextTranslationDescriptor(atg.repository.search.indexing.Context pContext,
                                                                                                                                             atg.beans.DynamicPropertyDescriptor pPropertyDescriptor)
Get the cached ContextTranslationDescriptor, if any.

Parameters:
pContext - context in which to store the map of property descriptors to ContextTranslationDescriptors.
pPropertyDescriptor - the property descriptor

putCachedContextTranslationDescriptor

protected void putCachedContextTranslationDescriptor(atg.repository.search.indexing.Context pContext,
                                                     atg.beans.DynamicPropertyDescriptor pPropertyDescriptor,
                                                     atg.repository.search.indexing.accessor.LanguagePropertyAccessor.IndexingLanguageTranslation pIndexingTranslationDescriptor)
Cache the specified ContextTranslationDescriptor.

Parameters:
pContext - context in which to store the map of property descriptors to ContextTranslationDescriptors.
pPropertyDescriptor - the property descriptor
pIndexingTranslationDescriptor - the IndexingTranslationDescriptor to cache.

getContextCacheKey

public java.lang.String getContextCacheKey()
Get the Context attribute key used to store of the cache fo ContextFirstWithLocale's for a given property descriptor.


getDefaultPropertyValue

protected java.lang.Object getDefaultPropertyValue(atg.repository.RepositoryItem pItem,
                                                   java.lang.String pPropertyName)
This function passes the default value of the property passed to it.

Parameters:
pItem - A RepositoryItem object to get the value of the property passed.
pPropertyName - Name of the property whose default value is needed.
Returns:
Object The default value of the property passed.