atg.svc.repository.service
Class UserOptionsService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.svc.repository.service.BaseService
              extended by atg.svc.repository.service.KnowledgeBaseService
                  extended by atg.svc.repository.service.UserOptionsService
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, java.util.EventListener

public class UserOptionsService
extends KnowledgeBaseService

Business methods for editing/reading/saving user options.


Nested Class Summary
protected  class UserOptionsService.LazyUserOptionsMap
          A Map for UserOptions that waits until get() or containsKey() is called to load the UserOption value into the Map.
 
Field Summary
static java.lang.String CLASS_VERSION
           
 ProfileService mProfileService
           
 
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
UserOptionsService()
           
 
Method Summary
 java.lang.String[] getArrayValue(java.lang.String pOptionName)
          Gets the value of the given option for the current user as am array of String.
 java.lang.String[] getArrayValue(java.lang.String pOptionName, atg.repository.RepositoryItem pProfile)
          Gets the value of the given option for the given user as am array of Strings.
 java.lang.String[] getArrayValue(java.lang.String pOptionName, java.lang.String pSegmentName)
          Gets the value of the given option for the current user as am array of Strings.
 java.lang.String[] getArrayValueForUserOptionOnly(java.lang.String pOptionName)
          Gets the value of the given option for the current user as am array of String.
 java.lang.String[] getArrayValueForUserOptionOnly(java.lang.String pOptionName, atg.repository.RepositoryItem pProfile)
          Gets the value of the given option for the given user as am array of Strings.
 boolean getBooleanValue(java.lang.String pName)
          Gets the value of the given option for the current user as a boolean.
 boolean getBooleanValue(java.lang.String pName, atg.repository.RepositoryItem pProfile)
          Gets the value of the given option for the given user as a boolean.
 boolean getBooleanValue(java.lang.String pOptionName, java.lang.String pSegmentName)
          Gets the value of the given option for the current user as a boolean.
 boolean getBooleanValueForUserOptionOnly(java.lang.String pName)
          Gets the value of the given option for the current user as a boolean.
 boolean getBooleanValueForUserOptionOnly(java.lang.String pName, atg.repository.RepositoryItem pProfile)
          Gets the value of the given option for the given user as a boolean.
 int getIntegerValue(java.lang.String pOptionName)
          Gets the value of the given option for the current user as an int.
 int getIntegerValue(java.lang.String pOptionName, atg.repository.RepositoryItem pProfile)
          Gets the value of the given option for the given user as an int.
 int getIntegerValue(java.lang.String pOptionName, java.lang.String pSegmentName)
          Gets the value of the given option for the given segment as an int.
 int getIntegerValueForUserOptionOnly(java.lang.String pOptionName)
          Gets the value of the given option for the current user as an int.
 int getIntegerValueForUserOptionOnly(java.lang.String pOptionName, atg.repository.RepositoryItem pProfile)
          Gets the value of the given option for the given user as an int.
 java.util.Map getOptions(java.lang.String pProfileId)
          Gets a map of all the options that can be edited by the given user.
 java.util.Map getOptionsForCurrentUser()
          Gets a map of all the options that can be edited by the current user.
 atg.svc.repository.service.util.OptionUtils getOptionUtils()
          Gets the common options utilities component.
 ProfileService getProfileService()
          Gets the ProfileService service.
 SegmentedOptionService getSegmentedOptionService()
          Gets the SegmentedOption service.
 java.lang.String getSiteId()
          Gets the id of the site this component is configured for.
 SiteService getSiteService()
          Gets the site service.
 java.lang.String getStringValue(java.lang.String pOptionName)
          Gets the value of the given option for the current user as a String.
 java.lang.String getStringValue(java.lang.String pOptionName, atg.repository.RepositoryItem pProfile)
          Gets the value of the given option for the given user as a String.
 java.lang.String getStringValue(java.lang.String pOptionName, java.lang.String pSegmentName)
          Gets the value of the given option for the given user segment as a String.
 java.lang.String getStringValueForUserOptionOnly(java.lang.String pOptionName)
          Gets the value of the given option for the current user as a String.
 java.lang.String getStringValueForUserOptionOnly(java.lang.String pOptionName, atg.repository.RepositoryItem pProfile)
          Gets the value of the given option for the given user as a String.
 boolean isCheckSegmentedOptions()
          Returns true if the option value methods should also look for segmented options.
 void restoreDefaultOptionForCurrentUser(java.lang.String pOptionName)
          Restores a single user option to its default given the name of the user option.
 void restoreDefaultOptionsForCurrentUser()
          Restores all default options for the current user.
 void restoreDefaultOptionsForCurrentUser(java.lang.String[] pOptionNames)
          Restores the default options for the given set of user option names.
 void saveOptions(java.util.Map pUserOptions)
          Saves a collection of user options.
 void setCheckSegmentedOptions(boolean pCheckSegmentedOptions)
          Sets true if the option value methods should also look for segmented options.
 void setOptionUtils(atg.svc.repository.service.util.OptionUtils pOptionUtils)
          Set the common options utilities component.
 void setProfileService(ProfileService pProfileService)
          Sets the ProfileService service.
 void setSegmentedOptionService(SegmentedOptionService pSegmentedOptionService)
          Sets the SegmentedOption service.
 void setSiteId(java.lang.String pSiteId)
          Sets the id of the site this component is configured for.
 void setSiteService(SiteService pSiteService)
          Sets the site service.
 
Methods inherited from class atg.svc.repository.service.KnowledgeBaseService
getKnowledgeHomesFactory, getOptionBeanHomes, getOptionRepositoryHomes, getServiceSegmentBeanHomes, getServiceSegmentRepositoryHomes, getSolutionBeanHomes, getSolutionRepositoryHomes, getUserOptionBeanHomes, getUserOptionRepositoryHomes, setKnowledgeHomesFactory
 
Methods inherited from class atg.svc.repository.service.BaseService
getRepositoryService, getToday, setRepositoryService
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, 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

mProfileService

public ProfileService mProfileService
Constructor Detail

UserOptionsService

public UserOptionsService()
Method Detail

getOptionUtils

public atg.svc.repository.service.util.OptionUtils getOptionUtils()
Gets the common options utilities component. This is configured in the nucleus component properties file.

Returns:
The common options utilities component.

setOptionUtils

public void setOptionUtils(atg.svc.repository.service.util.OptionUtils pOptionUtils)
Set the common options utilities component. This is configured in the nucleus component properties file.

Parameters:
pOptionUtils - The common options utilities component.

getSiteId

public java.lang.String getSiteId()
Gets the id of the site this component is configured for. This is set in the component configuration properties file.

Returns:
The id of the site this component is configured for.

setSiteId

public void setSiteId(java.lang.String pSiteId)
Sets the id of the site this component is configured for. This is set in the component configuration properties file.

Parameters:
pSiteId - The id of the site this component is configured for.

getSiteService

public SiteService getSiteService()
Gets the site service. This is set in the component configuration properties file.

Returns:
The site service.

setSiteService

public void setSiteService(SiteService pSiteService)
Sets the site service. This is set in the component configuration properties file.

Parameters:
pSiteService - The site service.

getSegmentedOptionService

public SegmentedOptionService getSegmentedOptionService()
Gets the SegmentedOption service. This is set in the component configuration properties file.

Returns:
The SegmentedOption service.

setSegmentedOptionService

public void setSegmentedOptionService(SegmentedOptionService pSegmentedOptionService)
Sets the SegmentedOption service. This is set in the component configuration properties file.

Parameters:
pSegmentedOptionService - The SegmentedOption service.

getProfileService

public ProfileService getProfileService()
Gets the ProfileService service. This is set in the component configuration properties file.

Returns:
The ProfileService service.

setProfileService

public void setProfileService(ProfileService pProfileService)
Sets the ProfileService service. This is set in the component configuration properties file.

Parameters:
pProfileService - The ProfileService service.

isCheckSegmentedOptions

public boolean isCheckSegmentedOptions()
Returns true if the option value methods should also look for segmented options.

Returns:
True if the option value methods should also look for segmented options.

setCheckSegmentedOptions

public void setCheckSegmentedOptions(boolean pCheckSegmentedOptions)
Sets true if the option value methods should also look for segmented options.

Parameters:
pCheckSegmentedOptions - True if the option value methods should also look for segmented options.

getOptionsForCurrentUser

public java.util.Map getOptionsForCurrentUser()
                                       throws ObjectNotFoundException
Gets a map of all the options that can be edited by the current user. The map is organized by the option name.

Returns:
The map of user options.
Throws:
ObjectNotFoundException - If the default value for a user option cannot be found.

getOptions

public java.util.Map getOptions(java.lang.String pProfileId)
                         throws ObjectNotFoundException
Gets a map of all the options that can be edited by the given user. The map is organized by the option name.

Returns:
The map of user options.
Throws:
ObjectNotFoundException - If the default value for a user option cannot be found.

saveOptions

public void saveOptions(java.util.Map pUserOptions)
                 throws ObjectNotFoundException,
                        PersistenceException
Saves a collection of user options. If an option is new it will be created. If it exists it will be updated.

Parameters:
pUserOptions - The map of user options as UserOption beans.
Throws:
ObjectNotFoundException - If a bean represents an existing repository object and it is not found.
PersistenceException - If the save fails.

restoreDefaultOptionsForCurrentUser

public void restoreDefaultOptionsForCurrentUser()
                                         throws ObjectNotFoundException,
                                                PersistenceException
Restores all default options for the current user. This is done deleting the user options that had been previously created (if any).

Throws:
ObjectNotFoundException - If an ObjectNotFoundException exception occurs during delete.
PersistenceException - If an PersistenceException exception occurs during delete.

restoreDefaultOptionForCurrentUser

public void restoreDefaultOptionForCurrentUser(java.lang.String pOptionName)
                                        throws ObjectNotFoundException,
                                               PersistenceException
Restores a single user option to its default given the name of the user option. This is done deleting the user option if it exists. If it does not exist it is already the default.

Parameters:
pOptionName - The name of the option to restore.
Throws:
ObjectNotFoundException - If an ObjectNotFoundException exception occurs during delete.
PersistenceException - If an PersistenceException exception occurs during delete.

restoreDefaultOptionsForCurrentUser

public void restoreDefaultOptionsForCurrentUser(java.lang.String[] pOptionNames)
                                         throws ObjectNotFoundException,
                                                PersistenceException
Restores the default options for the given set of user option names.

Parameters:
pOptionNames - The array of option names to be restored. Cannot be null or empty.
Throws:
ObjectNotFoundException - If the corresponding default value cannot be found.
PersistenceException - If the save of the defaulted options fails.
java.lang.IllegalArgumentException - If the pOptionNames parameter is null or empty.

getBooleanValue

public boolean getBooleanValue(java.lang.String pName)
                        throws javax.ejb.FinderException,
                               ObjectNotFoundException
Gets the value of the given option for the current user as a boolean.

If the value is not found as a user preference then depending on configuration either the segmented option or site option for the given option name will be found instead. If one of those options is found the value will be returned if non-null otherwise the default value of the option will be returned. If no user, segmented, or site option is found then the option name specified is either misspelled or the option data is missing from the database. In that case an ObjectNotFoundException will be thrown.

Parameters:
pName - The name of option to find.
Returns:
A boolean representation of the value.
Throws:
ObjectNotFoundException - If no user preference, segmented or site value for the given name is found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
See Also:
findUserOptionValue(java.lang.String)

getBooleanValueForUserOptionOnly

public boolean getBooleanValueForUserOptionOnly(java.lang.String pName)
                                         throws javax.ejb.FinderException,
                                                ObjectNotFoundException
Gets the value of the given option for the current user as a boolean. Finds the value of an option only in the current user's options. This method does not look for a value in the segmented or global options.

Parameters:
pName - The name of option to find.
Returns:
A boolean representation of the value.
Throws:
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException

getBooleanValue

public boolean getBooleanValue(java.lang.String pOptionName,
                               java.lang.String pSegmentName)
                        throws javax.ejb.FinderException,
                               ObjectNotFoundException
Gets the value of the given option for the current user as a boolean. If the option is not found for the given user then the given segment is used to find the option value.

Parameters:
pOptionName - The name of option to find.
pSegmentName - The name of the segment to search if there is no user option found.
Returns:
A boolean representation of the value.
Throws:
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException

getBooleanValue

public boolean getBooleanValue(java.lang.String pName,
                               atg.repository.RepositoryItem pProfile)
                        throws javax.ejb.FinderException,
                               ObjectNotFoundException
Gets the value of the given option for the given user as a boolean.

If the value is not found as a user preference then depending on configuration either the segmented option or site option for the given option name will be found instead. If one of those options is found the value will be returned if non-null otherwise the default value of the option will be returned. If no user, segmented, or site option is found then the option name specified is either misspelled or the option data is missing from the database. In that case an ObjectNotFoundException will be thrown.

Parameters:
pName - The name of option to find.
pProfile - The user to find the option for.
Returns:
A boolean representation of the value.
Throws:
ObjectNotFoundException - If no user preference, segmented or site value for the given name is found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
See Also:
findUserOptionValue(java.lang.String)

getBooleanValueForUserOptionOnly

public boolean getBooleanValueForUserOptionOnly(java.lang.String pName,
                                                atg.repository.RepositoryItem pProfile)
                                         throws javax.ejb.FinderException,
                                                ObjectNotFoundException
Gets the value of the given option for the given user as a boolean. Finds the value of an option in the current user's options. This method does not look for a value in the segmented or global options.

Parameters:
pName - The name of option to find.
pProfile - The user to get the value for.
Returns:
A boolean representation of the value.
Throws:
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException

getIntegerValue

public int getIntegerValue(java.lang.String pOptionName)
                    throws javax.ejb.FinderException,
                           ObjectNotFoundException
Gets the value of the given option for the current user as an int.

If the value is not found as a user preference then depending on configuration either the segmented option or site option for the given option name will be found instead. If one of those options is found the value will be returned if non-null otherwise the default value of the option will be returned. If no user, segmented, or site option is found then the option name specified is either misspelled or the option data is missing from the database. In that case an ObjectNotFoundException will be thrown.

Parameters:
pOptionName - The name of option to find.
Returns:
An int representation of the value.
Throws:
ObjectNotFoundException - If no user preference, segmented or site value for the given name is found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
java.lang.NumberFormatException - If the string value cannot be formatted as an int.
See Also:
findUserOptionValue(java.lang.String)

getIntegerValueForUserOptionOnly

public int getIntegerValueForUserOptionOnly(java.lang.String pOptionName)
                                     throws javax.ejb.FinderException,
                                            ObjectNotFoundException
Gets the value of the given option for the current user as an int. Finds the value of an option in the current user's options. This method does not look for a value in the segmented or global options.

Parameters:
pOptionName - The name of option to find.
Returns:
An int representation of the value.
Throws:
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
java.lang.NumberFormatException - If the string value cannot be formatted as an int.

getIntegerValue

public int getIntegerValue(java.lang.String pOptionName,
                           java.lang.String pSegmentName)
                    throws javax.ejb.FinderException,
                           ObjectNotFoundException
Gets the value of the given option for the given segment as an int.

Parameters:
pOptionName - The name of option to find.
pSegmentName - The name of the segment to search if there is no user option found.
Returns:
An int representation of the value.
Throws:
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
java.lang.NumberFormatException - If the string value cannot be formatted as an int.

getIntegerValue

public int getIntegerValue(java.lang.String pOptionName,
                           atg.repository.RepositoryItem pProfile)
                    throws javax.ejb.FinderException,
                           ObjectNotFoundException
Gets the value of the given option for the given user as an int.

If the value is not found as a user preference then depending on configuration either the segmented option or site option for the given option name will be found instead. If one of those options is found the value will be returned if non-null otherwise the default value of the option will be returned. If no user, segmented, or site option is found then the option name specified is either misspelled or the option data is missing from the database. In that case an ObjectNotFoundException will be thrown.

Parameters:
pOptionName - The name of option to find.
pProfile - The user to get the value for.
Returns:
An int representation of the value.
Throws:
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
java.lang.NumberFormatException - If the string value cannot be formatted as an int.
See Also:
findUserOptionValue(java.lang.String)

getIntegerValueForUserOptionOnly

public int getIntegerValueForUserOptionOnly(java.lang.String pOptionName,
                                            atg.repository.RepositoryItem pProfile)
                                     throws javax.ejb.FinderException,
                                            ObjectNotFoundException
Gets the value of the given option for the given user as an int. Finds the value of an option in the current user's options. This method does not look for a value in the segmented or global options.

Parameters:
pOptionName - The name of option to find.
pProfile - The user to get the value for.
Returns:
An int representation of the value.
Throws:
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
java.lang.NumberFormatException - If the string value cannot be formatted as an int.

getStringValue

public java.lang.String getStringValue(java.lang.String pOptionName)
                                throws javax.ejb.FinderException,
                                       ObjectNotFoundException
Gets the value of the given option for the current user as a String.

If the value is not found as a user preference then depending on configuration either the segmented option or site option for the given option name will be found instead. If one of those options is found the value will be returned if non-null otherwise the default value of the option will be returned. If no user, segmented, or site option is found then the option name specified is either misspelled or the option data is missing from the database. In that case an ObjectNotFoundException will be thrown.

Parameters:
pOptionName - The name of option to find.
Returns:
A string representation of the value.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
See Also:
findUserOptionValue(java.lang.String)

getStringValueForUserOptionOnly

public java.lang.String getStringValueForUserOptionOnly(java.lang.String pOptionName)
                                                 throws javax.ejb.FinderException,
                                                        ObjectNotFoundException
Gets the value of the given option for the current user as a String. Finds the value of an option in the current user's options. This method does not look for a value in the segmented or global options.

Parameters:
pOptionName - The name of option to find.
Returns:
A string representation of the value.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.

getStringValue

public java.lang.String getStringValue(java.lang.String pOptionName,
                                       java.lang.String pSegmentName)
                                throws javax.ejb.FinderException,
                                       ObjectNotFoundException
Gets the value of the given option for the given user segment as a String.

Parameters:
pOptionName - The name of option to find.
pSegmentName - The name of the segment to search if there is no user option found.
Returns:
A string representation of the value.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.

getStringValue

public java.lang.String getStringValue(java.lang.String pOptionName,
                                       atg.repository.RepositoryItem pProfile)
                                throws javax.ejb.FinderException,
                                       ObjectNotFoundException
Gets the value of the given option for the given user as a String.

If the value is not found as a user preference then depending on configuration either the segmented option or site option for the given option name will be found instead. If one of those options is found the value will be returned if non-null otherwise the default value of the option will be returned. If no user, segmented, or site option is found then the option name specified is either misspelled or the option data is missing from the database. In that case an ObjectNotFoundException will be thrown.

Parameters:
pOptionName - The name of option to find.
pProfile - The user profile to get the value for.
Returns:
A string representation of the value.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
See Also:
findUserOptionValue(java.lang.String)

getStringValueForUserOptionOnly

public java.lang.String getStringValueForUserOptionOnly(java.lang.String pOptionName,
                                                        atg.repository.RepositoryItem pProfile)
                                                 throws javax.ejb.FinderException,
                                                        ObjectNotFoundException
Gets the value of the given option for the given user as a String. Finds the value of an option in the current user's options. This method does not look for a value in the segmented or global options.

Parameters:
pOptionName - The name of option to find.
pProfile - The user profile to get the value for.
Returns:
A string representation of the value.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.

getArrayValue

public java.lang.String[] getArrayValue(java.lang.String pOptionName)
                                 throws javax.ejb.FinderException,
                                        ObjectNotFoundException
Gets the value of the given option for the current user as am array of String.

If the value is not found as a user preference then depending on configuration either the segmented option or site option for the given option name will be found instead. If one of those options is found the value will be returned if non-null otherwise the default value of the option will be returned. If no user, segmented, or site option is found then the option name specified is either misspelled or the option data is missing from the database. In that case an ObjectNotFoundException will be thrown.

Parameters:
pOptionName - The name of the option.
Returns:
The list of values for the site option.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
See Also:
findUserOptionValue(java.lang.String)

getArrayValueForUserOptionOnly

public java.lang.String[] getArrayValueForUserOptionOnly(java.lang.String pOptionName)
                                                  throws javax.ejb.FinderException,
                                                         ObjectNotFoundException
Gets the value of the given option for the current user as am array of String. Finds the value of an option in the current user's options. This method does not look for a value in the segmented or global options.

Parameters:
pOptionName - The name of the option.
Returns:
The list of values for the site option.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.

getArrayValue

public java.lang.String[] getArrayValue(java.lang.String pOptionName,
                                        java.lang.String pSegmentName)
                                 throws javax.ejb.FinderException,
                                        ObjectNotFoundException
Gets the value of the given option for the current user as am array of Strings.

Parameters:
pOptionName - The name of the option.
pSegmentName - The name of the segment to search if there is no user option found.
Returns:
The list of values for the site option.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.

getArrayValue

public java.lang.String[] getArrayValue(java.lang.String pOptionName,
                                        atg.repository.RepositoryItem pProfile)
                                 throws javax.ejb.FinderException,
                                        ObjectNotFoundException
Gets the value of the given option for the given user as am array of Strings.

If the value is not found as a user preference then depending on configuration either the segmented option or site option for the given option name will be found instead. If one of those options is found the value will be returned if non-null otherwise the default value of the option will be returned. If no user, segmented, or site option is found then the option name specified is either misspelled or the option data is missing from the database. In that case an ObjectNotFoundException will be thrown.

Parameters:
pOptionName - The name of the option.
pProfile - The user profile to get the value for.
Returns:
The list of values for the site option.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
See Also:
findUserOptionValue(java.lang.String)

getArrayValueForUserOptionOnly

public java.lang.String[] getArrayValueForUserOptionOnly(java.lang.String pOptionName,
                                                         atg.repository.RepositoryItem pProfile)
                                                  throws javax.ejb.FinderException,
                                                         ObjectNotFoundException
Gets the value of the given option for the given user as am array of Strings. Finds the value of an option in the current user's options. This method does not look for a value in the segmented or global options.

Parameters:
pOptionName - The name of the option.
pProfile - The user profile to get the value for.
Returns:
The list of values for the site option.
Throws:
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option name is found.