atg.remote.multisite.service.validation
Class CountryLanguageCodeValidator

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.remote.multisite.service.validation.CountryLanguageCodeValidator
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, 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.remote.multisite.service.validation.SiteAssetServiceValidator, java.util.EventListener

public class CountryLanguageCodeValidator
extends atg.nucleus.GenericService
implements atg.remote.multisite.service.validation.SiteAssetServiceValidator

This validator ensures a site's country and language codes are valid.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  InternationalStoreSitePropertiesManager mStoreSitePropertiesManager
           
protected static java.lang.String RESOURCE_NAME
           
 
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
CountryLanguageCodeValidator()
           
 
Method Summary
 java.util.ResourceBundle getResourceBundle()
           
 atg.multisite.SiteManager getSiteManager()
          Gets the siteManager.
 InternationalStoreSitePropertiesManager getStoreSitePropertiesManager()
           
 void setSiteManager(atg.multisite.SiteManager pSiteManager)
          Sets the siteManager.
 void setStoreSitePropertiesManager(InternationalStoreSitePropertiesManager pStoreSitePropertiesManager)
           
 void validate(atg.remote.assetmanager.editor.service.AssetEditorInfo pEditorInfo, java.util.Collection pUpdates)
           
 void validateCountryLanguageCombination(atg.remote.assetmanager.editor.service.AssetEditorInfo pEditorInfo, java.lang.String pCountryCode, java.lang.String pLanguageCode)
          Ensure that the country/language codes can be combined to create a valid locale.
 void validateDefaultLanguageCodeValue(atg.remote.assetmanager.editor.service.AssetEditorInfo pEditorInfo, java.lang.String pLanguageCode)
          Ensure the defaultLanguage is a valid language code.
 void validateSiteLanguages(atg.remote.assetmanager.editor.service.AssetEditorInfo pEditorInfo, java.util.List<java.lang.String> pLanguageCodes, java.lang.String pPropName)
          Ensure the language defined in the site's languages property are valid language codes.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, 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, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 java.lang.String CLASS_VERSION
Class version string


RESOURCE_NAME

protected static final java.lang.String RESOURCE_NAME
See Also:
Constant Field Values

mStoreSitePropertiesManager

protected InternationalStoreSitePropertiesManager mStoreSitePropertiesManager
Constructor Detail

CountryLanguageCodeValidator

public CountryLanguageCodeValidator()
Method Detail

setSiteManager

public void setSiteManager(atg.multisite.SiteManager pSiteManager)
Sets the siteManager.

Parameters:
pSiteManager - The siteManager object.

getSiteManager

public atg.multisite.SiteManager getSiteManager()
Gets the siteManager.

Returns:
The siteManager object.

getStoreSitePropertiesManager

public InternationalStoreSitePropertiesManager getStoreSitePropertiesManager()
Returns:
the StoreSitePropertiesManager

setStoreSitePropertiesManager

public void setStoreSitePropertiesManager(InternationalStoreSitePropertiesManager pStoreSitePropertiesManager)
Parameters:
StoreSitePropertiesManager - the StoreSitePropertiesManager to set

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Returns:
The resource bundle based on the user's locale.

validate

public void validate(atg.remote.assetmanager.editor.service.AssetEditorInfo pEditorInfo,
                     java.util.Collection pUpdates)
Specified by:
validate in interface atg.remote.multisite.service.validation.SiteAssetServiceValidator
Parameters:
pEditorInfo - Information object for the current editor.
pUpdates - Collection of PropertyEditorAssetViewUpdate objects.

validateCountryLanguageCombination

public void validateCountryLanguageCombination(atg.remote.assetmanager.editor.service.AssetEditorInfo pEditorInfo,
                                               java.lang.String pCountryCode,
                                               java.lang.String pLanguageCode)
Ensure that the country/language codes can be combined to create a valid locale.

Parameters:
pEditorInfo - The asset editor requesting the update
pCountryCode - The country code to be validated.
pLanguageCode - The language code to be validated.

validateDefaultLanguageCodeValue

public void validateDefaultLanguageCodeValue(atg.remote.assetmanager.editor.service.AssetEditorInfo pEditorInfo,
                                             java.lang.String pLanguageCode)
Ensure the defaultLanguage is a valid language code.

Parameters:
pEditorInfo - Information object for the current editor.
pLanguageCode - The language code to be validated.

validateSiteLanguages

public void validateSiteLanguages(atg.remote.assetmanager.editor.service.AssetEditorInfo pEditorInfo,
                                  java.util.List<java.lang.String> pLanguageCodes,
                                  java.lang.String pPropName)
Ensure the language defined in the site's languages property are valid language codes.

Parameters:
pEditorInfo - Information object for the current editor.
pLanguageCode - The language codes to be validated.
pPropName - The name of the site 'languages' property.