public class UserPreferencesGenerator extends AbstractCurrentUserProviderServiceableGenerator
Modifier and Type | Field and Description |
---|---|
protected UserPreferencesExtensionPoint |
_userPrefEP
The user preferences extension point.
|
protected UserPreferencesManager |
_userPrefManager
The user preferences manager.
|
_currentUserProvider
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
UserPreferencesGenerator() |
Modifier and Type | Method and Description |
---|---|
protected void |
_saxPreference(UserPreference preference,
Object value,
Map<String,String> contextVars)
Generate a preference definition and value.
|
protected void |
_saxPreferences(String storageContext,
Map<String,String> contextVars,
UserIdentity user,
boolean excludePrivate)
Generate the list of user preferences for a given user and context.
|
void |
generate() |
protected Map<String,String> |
getContextVars(Request request)
Get the preferences context.
|
protected UserIdentity |
getUser()
Get the user in the user manager.
|
void |
service(ServiceManager serviceManager) |
_getCurrentUser
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
protected UserPreferencesExtensionPoint _userPrefEP
protected UserPreferencesManager _userPrefManager
public UserPreferencesGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class AbstractCurrentUserProviderServiceableGenerator
ServiceException
public void generate() throws IOException, SAXException, ProcessingException
protected UserIdentity getUser()
protected Map<String,String> getContextVars(Request request)
request
- the request.protected void _saxPreferences(String storageContext, Map<String,String> contextVars, UserIdentity user, boolean excludePrivate) throws ProcessingException, SAXException, UserPreferencesException
storageContext
- the preferences context.contextVars
- The context varsuser
- the user.excludePrivate
- true to exclude private user preferencesProcessingException
- if an error occurredSAXException
- if an error occurredUserPreferencesException
- if an error occurredprotected void _saxPreference(UserPreference preference, Object value, Map<String,String> contextVars) throws SAXException, ProcessingException
preference
- The parameter to SAXvalue
- The parameter value. Can be null.contextVars
- The context varsSAXException
- If an error occurred while SAXingProcessingException
- If an error occurred