|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectatg.nucleus.GenericService
atg.svc.repository.service.BaseService
atg.svc.repository.service.KnowledgeBaseService
atg.svc.repository.service.UserOptionsService
public class UserOptionsService
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.svc.repository.service.BaseService |
|---|
mBeanHomes, mBeanHomesName, mRepositoryHomes, mRepositoryHomesName |
| Fields inherited from class atg.nucleus.GenericService |
|---|
SERVICE_INFO_KEY |
| 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 |
|---|
getBeanHomes, getRepositoryHomes |
| Methods inherited from class atg.svc.repository.service.BaseService |
|---|
getBaseBeanHomes, getBaseRepositoryHomes, getBeanHomesName, getRepositoryHomesName, getRepositoryService, getToday, setBeanHomesName, setRepositoryHomesName, setRepositoryService |
| Methods inherited from class atg.nucleus.GenericService |
|---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingWarning, setServiceInfo, startService, stopService |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CLASS_VERSION
public ProfileService mProfileService
| Constructor Detail |
|---|
public UserOptionsService()
| Method Detail |
|---|
public atg.svc.repository.service.util.OptionUtils getOptionUtils()
public void setOptionUtils(atg.svc.repository.service.util.OptionUtils pOptionUtils)
pOptionUtils - The common options utilities component.public java.lang.String getSiteId()
public void setSiteId(java.lang.String pSiteId)
pSiteId - The id of the site this component is configured for.public SiteService getSiteService()
public void setSiteService(SiteService pSiteService)
pSiteService - The site service.public SegmentedOptionService getSegmentedOptionService()
public void setSegmentedOptionService(SegmentedOptionService pSegmentedOptionService)
pSegmentedOptionService - The SegmentedOption service.public ProfileService getProfileService()
public void setProfileService(ProfileService pProfileService)
pProfileService - The ProfileService service.public boolean isCheckSegmentedOptions()
public void setCheckSegmentedOptions(boolean pCheckSegmentedOptions)
pCheckSegmentedOptions - True if the option value methods should also look for segmented options.
public java.util.Map getOptionsForCurrentUser()
throws ObjectNotFoundException
ObjectNotFoundException - If the default value for a user option cannot be found.
public java.util.Map getOptions(java.lang.String pProfileId)
throws ObjectNotFoundException
ObjectNotFoundException - If the default value for a user option cannot be found.
public void saveOptions(java.util.Map pUserOptions)
throws ObjectNotFoundException,
PersistenceException
pUserOptions - The map of user options as UserOption beans.
ObjectNotFoundException - If a bean represents an existing repository object and it is not found.
PersistenceException - If the save fails.
public void restoreDefaultOptionsForCurrentUser()
throws ObjectNotFoundException,
PersistenceException
ObjectNotFoundException - If an ObjectNotFoundException exception occurs during delete.
PersistenceException - If an PersistenceException exception occurs during delete.
public void restoreDefaultOptionForCurrentUser(java.lang.String pOptionName)
throws ObjectNotFoundException,
PersistenceException
pOptionName - The name of the option to restore.
ObjectNotFoundException - If an ObjectNotFoundException exception occurs during delete.
PersistenceException - If an PersistenceException exception occurs during delete.
public void restoreDefaultOptionsForCurrentUser(java.lang.String[] pOptionNames)
throws ObjectNotFoundException,
PersistenceException
pOptionNames - The array of option names to be restored. Cannot be null or empty.
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.
public boolean getBooleanValue(java.lang.String pName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pName - The name of option to find.
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 errorfindUserOptionValue(java.lang.String)
public boolean getBooleanValueForUserOptionOnly(java.lang.String pName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pName - The name of option to find.
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException
public boolean getBooleanValue(java.lang.String pOptionName,
java.lang.String pSegmentName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.pSegmentName - The name of the segment to search if there is no user option found.
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException
public boolean getBooleanValue(java.lang.String pName,
atg.repository.RepositoryItem pProfile)
throws javax.ejb.FinderException,
ObjectNotFoundException
pName - The name of option to find.pProfile - The user to find the option for.
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 errorfindUserOptionValue(java.lang.String)
public boolean getBooleanValueForUserOptionOnly(java.lang.String pName,
atg.repository.RepositoryItem pProfile)
throws javax.ejb.FinderException,
ObjectNotFoundException
pName - The name of option to find.pProfile - The user to get the value for.
ObjectNotFoundException - If no value for the given option is not found.
javax.ejb.FinderException
public int getIntegerValue(java.lang.String pOptionName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.
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.findUserOptionValue(java.lang.String)
public int getIntegerValueForUserOptionOnly(java.lang.String pOptionName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.
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.
public int getIntegerValue(java.lang.String pOptionName,
java.lang.String pSegmentName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.pSegmentName - The name of the segment to search if there is no user option found.
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.
public int getIntegerValue(java.lang.String pOptionName,
atg.repository.RepositoryItem pProfile)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.pProfile - The user to get the value for.
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.findUserOptionValue(java.lang.String)
public int getIntegerValueForUserOptionOnly(java.lang.String pOptionName,
atg.repository.RepositoryItem pProfile)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.pProfile - The user to get the value for.
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.
public java.lang.String getStringValue(java.lang.String pOptionName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.findUserOptionValue(java.lang.String)
public java.lang.String getStringValueForUserOptionOnly(java.lang.String pOptionName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
public java.lang.String getStringValue(java.lang.String pOptionName,
java.lang.String pSegmentName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.pSegmentName - The name of the segment to search if there is no user option found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
public java.lang.String getStringValue(java.lang.String pOptionName,
atg.repository.RepositoryItem pProfile)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.pProfile - The user profile to get the value for.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.findUserOptionValue(java.lang.String)
public java.lang.String getStringValueForUserOptionOnly(java.lang.String pOptionName,
atg.repository.RepositoryItem pProfile)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of option to find.pProfile - The user profile to get the value for.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
public java.lang.String[] getArrayValue(java.lang.String pOptionName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of the option.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.findUserOptionValue(java.lang.String)
public java.lang.String[] getArrayValueForUserOptionOnly(java.lang.String pOptionName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of the option.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
public java.lang.String[] getArrayValue(java.lang.String pOptionName,
java.lang.String pSegmentName)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of the option.pSegmentName - The name of the segment to search if there is no user option found.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.
public java.lang.String[] getArrayValue(java.lang.String pOptionName,
atg.repository.RepositoryItem pProfile)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of the option.pProfile - The user profile to get the value for.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option is not found.findUserOptionValue(java.lang.String)
public java.lang.String[] getArrayValueForUserOptionOnly(java.lang.String pOptionName,
atg.repository.RepositoryItem pProfile)
throws javax.ejb.FinderException,
ObjectNotFoundException
pOptionName - The name of the option.pProfile - The user profile to get the value for.
javax.ejb.FinderException - If an underlying finder calls fails with a database error
ObjectNotFoundException - If no value for the given option name is found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||