use of org.apereo.portal.IUserPreferencesManager in project uPortal by Jasig.
the class PortletWindowRegistryImpl method getThemeStylesheetDescriptor.
protected IStylesheetDescriptor getThemeStylesheetDescriptor(HttpServletRequest request) {
final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
final IUserProfile userProfile = preferencesManager.getUserProfile();
final int themeStylesheetId = userProfile.getThemeStylesheetId();
return stylesheetDescriptorDao.getStylesheetDescriptor(themeStylesheetId);
}
use of org.apereo.portal.IUserPreferencesManager in project uPortal by Jasig.
the class BaseTransformerSource method getStylesheetDescriptor.
protected IStylesheetDescriptor getStylesheetDescriptor(HttpServletRequest request) {
final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
final long id = this.getStylesheetDescriptorId(preferencesManager);
return this.stylesheetDescriptorDao.getStylesheetDescriptor(id);
}
use of org.apereo.portal.IUserPreferencesManager in project uPortal by Jasig.
the class UserLayoutStoreComponent method getUserLayoutManager.
/** Get the {@link IUserLayoutManager} for the user making the request */
protected IUserLayoutManager getUserLayoutManager(HttpServletRequest request) {
final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
return preferencesManager.getUserLayoutManager();
}
use of org.apereo.portal.IUserPreferencesManager in project uPortal by Jasig.
the class PortletEntityRegistryImpl method getOrCreatePortletEntityByFname.
@Override
public IPortletEntity getOrCreatePortletEntityByFname(HttpServletRequest request, IUserInstance userInstance, String fname) {
final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
final String subscribeId = userLayoutManager.getSubscribeId(fname);
return this.getOrCreatePortletEntity(request, userInstance, subscribeId);
}
use of org.apereo.portal.IUserPreferencesManager in project uPortal by Jasig.
the class PortletEntityRegistryImpl method getOrCreatePortletEntity.
@Override
public IPortletEntity getOrCreatePortletEntity(HttpServletRequest request, IUserInstance userInstance, String layoutNodeId) {
final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
//Find the channel and portlet definitions
final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription) userLayoutManager.getNode(layoutNodeId);
if (channelNode == null) {
this.logger.warn("No layout node exists for id " + layoutNodeId + ", no portlet entity will be returned.");
return null;
}
final String channelPublishId = channelNode.getChannelPublishId();
final IPortletDefinition portletDefinition = this.getPortletDefinition(request, userInstance, channelPublishId);
if (portletDefinition != null) {
final IPerson person = userInstance.getPerson();
return this.getOrCreatePortletEntity(request, portletDefinition.getPortletDefinitionId(), layoutNodeId, person.getID());
}
// No permission to see the portlet
return null;
}
Aggregations