Examples of IStylesheetDescriptor


Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

    }

    protected void loadStylesheetUserPreferencesAttributes(IPerson person, IUserProfile profile,
            org.dom4j.Element layout, final int structureStylesheetId, final String nodeType) {

        final IStylesheetDescriptor stylesheetDescriptor = this.stylesheetDescriptorDao
                .getStylesheetDescriptor(structureStylesheetId);
        final List<org.dom4j.Element> structureAttributes = layout.selectNodes("//" + nodeType + "-attribute");

        IStylesheetUserPreferences ssup = this.stylesheetUserPreferencesDao
                .getStylesheetUserPreferences(stylesheetDescriptor, person, profile);
View Full Code Here

Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

        this.name = name;
    }

    @Override
    public final Iterator<Attribute> getAdditionalAttributes(HttpServletRequest request, HttpServletResponse response, StartElement event) {
        final IStylesheetDescriptor stylesheetDescriptor = this.getStylesheetDescriptor(request);
       
        final PreferencesScope stylesheetPreferencesScope = this.getStylesheetPreferencesScope(request);
       
        final Collection<Attribute> attributes = new LinkedList<Attribute>();
       
        for (final ILayoutAttributeDescriptor layoutAttributeDescriptor : stylesheetDescriptor.getLayoutAttributeDescriptors()) {
            final Set<String> targetElementNames = layoutAttributeDescriptor.getTargetElementNames();
            final QName eventName = event.getName();
            final String localEventName = eventName.getLocalPart();
            if (targetElementNames.contains(localEventName)) {
                final Attribute subscribeIdAttr = event.getAttributeByName(IUserLayoutManager.ID_ATTR_NAME);
View Full Code Here

Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

        final String stylesheetParameter = this.stylesheetUserPreferencesService.getStylesheetParameter(httpServletRequest, PreferencesScope.STRUCTURE, this.defaultTabParameter);
        if (stylesheetParameter != null) {
            return stylesheetParameter;
        }
       
        final IStylesheetDescriptor stylesheetDescriptor = this.stylesheetUserPreferencesService.getStylesheetDescriptor(httpServletRequest, PreferencesScope.STRUCTURE);
        final IStylesheetParameterDescriptor stylesheetParameterDescriptor = stylesheetDescriptor.getStylesheetParameterDescriptor(this.defaultTabParameter);
        if (stylesheetParameterDescriptor != null) {
            return stylesheetParameterDescriptor.getDefaultValue();
        }
       
        return null;
View Full Code Here

Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

        IUserPreferencesManager upm = ui.getPreferencesManager();
        IUserProfile profile = upm.getUserProfile();
       
        // get the theme for this profile
        long themeId = profile.getThemeStylesheetId();
        IStylesheetDescriptor theme = stylesheetDao.getStylesheetDescriptor(themeId);

        // set the theme name as a portlet response property
        final String themeName = theme.getName();
        propertiesPopulator.put(IPortletRenderer.THEME_NAME_PROPERTY, themeName);
        propertiesPopulator.put(THEME_NAME_PROPERTY, themeName);
    }
View Full Code Here

Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

    public boolean test(IPerson person) {
        HttpServletRequest currentPortalRequest = getCurrentHttpServletRequest();
        if (currentPortalRequest == null) {
            return false;
        }
        IStylesheetDescriptor descriptor = getCurrentUserProfileStyleSheetDescriptor(person, currentPortalRequest);
        String uiTheme = descriptor.getName();
        logDebugMessages(uiTheme);
        return getStringCompareResults(uiTheme);
    }
View Full Code Here

Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

    public PipelineEventReader<XMLEventReader, XMLEvent> getEventReader(HttpServletRequest request, HttpServletResponse response) {
        final PipelineEventReader<XMLEventReader, XMLEvent> pipelineEventReader = this.wrappedComponent.getEventReader(request, response);

        final XMLEventReader eventReader = pipelineEventReader.getEventReader();
       
        final IStylesheetDescriptor stylesheetDescriptor = stylesheetAttributeSource.getStylesheetDescriptor(request);
       
        final IPortalRequestInfo portalRequestInfo = this.urlSyntaxProvider.getPortalRequestInfo(request);
       
        final XMLEventReader filteredEventReader;
        if (portalRequestInfo.getTargetedPortletWindowId() == null) {
            final IStylesheetParameterDescriptor defaultWindowStateParam = stylesheetDescriptor.getStylesheetParameterDescriptor("dashboardForcedWindowState");
            if (defaultWindowStateParam != null) {
                //Set all window states to the specified default
                final WindowState windowState = PortletUtils.getWindowState(defaultWindowStateParam.getDefaultValue());
                filteredEventReader = new SinglePortletWindowStateSettingXMLEventReader(request, eventReader, windowState);
            }
View Full Code Here

Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

public class JsonThemeTransformerSource extends BaseTransformerSource {
   
    @Override
    protected long getStylesheetDescriptorId(IUserPreferencesManager preferencesManager) {
        IStylesheetDescriptor descriptor = this.stylesheetDescriptorDao.getStylesheetDescriptorByName("JsonLayout");
        return descriptor.getId();
    }
View Full Code Here

Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

public class JsonStructureTransformerSource extends BaseTransformerSource {

    @Override
    protected long getStylesheetDescriptorId(IUserPreferencesManager preferencesManager) {
        IStylesheetDescriptor descriptor = this.stylesheetDescriptorDao.getStylesheetDescriptorByName("DLMMobileColumns");
        return descriptor.getId();
    }
View Full Code Here

Examples of org.jasig.portal.layout.om.IStylesheetDescriptor

        throw new IllegalStateException("No IUrlNodeSyntaxHelper could be found for the current request. Review the IStylesheetDescriptor configuration.");
    }

    @Override
    public IUrlNodeSyntaxHelper getUrlNodeSyntaxHelperForStylesheet(final int stylesheetDescriptorId) {
        final IStylesheetDescriptor stylesheetDescriptor = this.stylesheetDescriptorDao.getStylesheetDescriptor(stylesheetDescriptorId);
        if (stylesheetDescriptor == null) {
            throw new IllegalArgumentException("No IStylesheetDescriptor found for id: " + stylesheetDescriptorId);
        }
       
        final String themeUrlSyntaxHelperName = stylesheetDescriptor.getUrlNodeSyntaxHelperName();
        if (themeUrlSyntaxHelperName != null) {
            return this.getUrlNodeSyntaxHelper(themeUrlSyntaxHelperName);
        }
       
        return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.