Examples of IPortletDefinition


Examples of org.jasig.portal.portlet.om.IPortletDefinition

      // get the list of requested user attributes
        final HttpServletRequest httpServletRequest = this.portalRequestUtils.getOriginalPortletAdaptorRequest(request);
        final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow);
        final IPortletEntity portletEntity = this.portletWindowRegistry.getParentPortletEntity(httpServletRequest, portletWindow.getPortletWindowId());
        final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletEntity.getPortletEntityId());
        final PortletAppDD portletApplicationDescriptor = this.portletDefinitionRegistry.getParentPortletApplicationDescriptor(portletDefinition.getPortletDefinitionId());
       
        // check to see if the proxy ticket key is one of the requested user attributes
        List<UserAttributeDD> requestedUserAttributes = portletApplicationDescriptor.getUserAttributes();
        for (final UserAttributeDD userAttributeDD : requestedUserAttributes) {
            final String attributeName = userAttributeDD.getName();
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

            this.logger.warn("Unknown WindowState '" + urlWindowState + "' specified for portlet window " + portletWindow + ", defaulting to NORMAL");
        }
        url.append(windowStateString);
       
        //Add channel information: /fname.chanid
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(portletEntity.getPortletDefinitionId());
        final IChannelDefinition channelDefinition = portletDefinition.getChannelDefinition();
        final String fname = channelDefinition.getFName();
        final String validFname = FunctionalNameType.INVALID_CHARS_PATTERN.matcher(fname).replaceAll("_");
        url.append("/").append(validFname).append(".").append(channelSubscribeId);
       
        //File part
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

        IPortletDefinitionId mockPortletDefinitionId = createMock(IPortletDefinitionId.class);
        replay(mockPortletDefinitionId);
        IChannelDefinition mockChannelDefinition = createMock(IChannelDefinition.class);
        expect(mockChannelDefinition.getFName()).andReturn(details.getChannelFName());
        replay(mockChannelDefinition);
        IPortletDefinition mockPortletDefinition = createMock(IPortletDefinition.class);
        expect(mockPortletDefinition.getChannelDefinition()).andReturn(mockChannelDefinition);
        replay(mockPortletDefinition);
        IPortletEntity mockPortletEntity = createMock(IPortletEntity.class);
        expect(mockPortletEntity.getChannelSubscribeId()).andReturn(details.getChannelId()).times(2);
        expect(mockPortletEntity.getPortletDefinitionId()).andReturn(mockPortletDefinitionId);
        replay(mockPortletEntity);
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

    /* (non-Javadoc)
     * @see org.jasig.portal.portlet.registry.IPortletDefinitionRegistry#getOrCreatePortletDefinition(int)
     */
    public IPortletDefinition getOrCreatePortletDefinition(int channelPublishId) {
        final IPortletDefinition portletDefinition = this.getPortletDefinition(channelPublishId);
        if (portletDefinition != null) {
            return portletDefinition;
        }
       
        return this.createPortletDefinition(channelPublishId);
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

   
    /* (non-Javadoc)
     * @see org.jasig.portal.portlet.registry.IPortletDefinitionRegistry#getParentPortletApplicationDescriptor(org.jasig.portal.portlet.om.IPortletDefinitionId)
     */
    public PortletAppDD getParentPortletApplicationDescriptor(IPortletDefinitionId portletDefinitionId) throws PortletContainerException {
        final IPortletDefinition portletDefinition = this.getPortletDefinition(portletDefinitionId);
        if (portletDefinition == null) {
            return null;
        }
       
        final Tuple<String, String> portletDescriptorKeys = this.getPortletDescriptorKeys(portletDefinition);
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

   
    /* (non-Javadoc)
     * @see org.jasig.portal.portlet.registry.IPortletDefinitionRegistry#getParentPortletDescriptor(org.jasig.portal.portlet.om.IPortletDefinitionId)
     */
    public PortletDD getParentPortletDescriptor(IPortletDefinitionId portletDefinitionId) throws PortletContainerException {
        final IPortletDefinition portletDefinition = this.getPortletDefinition(portletDefinitionId);
        if (portletDefinition == null) {
            return null;
        }
       
        final Tuple<String, String> portletDescriptorKeys = this.getPortletDescriptorKeys(portletDefinition);
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

     * @param portletWindow The window to get the parent PortletDD for.
     * @return The parent portlet descriptor for the window
     * @throws PortalException if the PortletDD fails to load.
     */
    protected PortletDD getPortletDeployment(HttpServletRequest httpServletRequest, IPortletWindow portletWindow) {
        final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletWindow.getPortletEntityId());
       
        try {
            return this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinition.getPortletDefinitionId());
        }
        catch (PortletContainerException pce) {
            throw new PortalException("Failed to retrieve the PortletDD for portlet window: " + portletWindow, pce);
        }
    }
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

    public InternalPortletPreference[] getStoredPreferences(PortletWindow plutoPortletWindow, PortletRequest portletRequest) throws PortletContainerException {
        final HttpServletRequest httpServletRequest = this.portalRequestUtils.getOriginalPortletAdaptorRequest(portletRequest);
       
        final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow);
        final IPortletEntity portletEntity = this.portletWindowRegistry.getParentPortletEntity(httpServletRequest, portletWindow.getPortletWindowId());
        final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletEntity.getPortletEntityId());
        final PortletDD portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinition.getPortletDefinitionId());

       
        //Linked hash map used to add preferences in order loaded from the descriptor, definition and entity
        final LinkedHashMap<String, InternalPortletPreference> preferencesMap = new LinkedHashMap<String, InternalPortletPreference>();
       
        //Add descriptor preferences
        final List<IPortletPreference> descriptorPreferencesList = this.getDescriptorPreferences(portletDescriptor);
        this.addPreferencesToMap(descriptorPreferencesList, preferencesMap);
       
        //Add definition preferences
        final IPortletPreferences definitionPreferences = portletDefinition.getPortletPreferences();
        final List<IPortletPreference> definitionPreferencesList = definitionPreferences.getPortletPreferences();
        this.addPreferencesToMap(definitionPreferencesList, preferencesMap);
       
        //Determine if the user is a guest
        final boolean isGuest = isGuestUser(httpServletRequest);
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

            return;
        }

        final IPortletWindow portletWindow = this.portletWindowRegistry.convertPortletWindow(httpServletRequest, plutoPortletWindow);
        final IPortletEntity portletEntity = this.portletWindowRegistry.getParentPortletEntity(httpServletRequest, portletWindow.getPortletWindowId());
        final IPortletDefinition portletDefinition = this.portletEntityRegistry.getParentPortletDefinition(portletEntity.getPortletEntityId());
        final PortletDD portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinition.getPortletDefinitionId());

        //Is this CONFIG mode
        final boolean configMode = IPortletAdaptor.CONFIG.equals(portletWindow.getPortletMode());
       
        //Get Map of descriptor and definition preferences to check new preferences against
        final Map<String, InternalPortletPreference> basePreferences = new HashMap<String, InternalPortletPreference>();
       
        //Add deploy preferences
        final List<IPortletPreference> descriptorPreferencesList = this.getDescriptorPreferences(portletDescriptor);
        this.addPreferencesToMap(descriptorPreferencesList, basePreferences);
       
        //Add definition preferences if not config mode
        final IPortletPreferences definitionPreferences = portletDefinition.getPortletPreferences();
        if (!configMode) {
            final List<IPortletPreference> definitionPreferencesList = definitionPreferences.getPortletPreferences();
            this.addPreferencesToMap(definitionPreferencesList, basePreferences);
        }
View Full Code Here

Examples of org.jasig.portal.portlet.om.IPortletDefinition

        final IChannelDefinition channelDefinition = this.channelRegistryStore.getChannelDefinition(fName);
        if (channelDefinition == null || !channelDefinition.isPortlet()) {
            return null;
        }
       
        final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(channelDefinition.getId());
        final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
       
        return this.createRequestDispatcher(portletRequest, portletDefinitionId);
    }
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.