Package org.apache.pluto.descriptors.portlet

Examples of org.apache.pluto.descriptors.portlet.PortletDD


    }

    public Enumeration getResponseContentTypes() {
        if (contentTypes == null) {
            contentTypes = new Vector();
            PortletDD dd = internalPortletWindow.getPortletEntity().getPortletDefinition();
            Iterator supports = dd.getSupports().iterator();
            while (supports.hasNext()) {
                SupportsDD sup = (SupportsDD) supports.next();
                contentTypes.add(sup.getMimeType());
            }
            if (contentTypes.size() < 1) {
View Full Code Here


    private boolean isPortletModeAllowedByPortlet(PortletMode mode) {
        if (isPortletModeMandatory(mode)) {
            return true;
        }

        PortletDD dd = internalPortletWindow.getPortletEntity()
                .getPortletDefinition();

        Iterator mimes = dd.getSupports().iterator();
        while (mimes.hasNext()) {
            Iterator modes = ((SupportsDD) mimes.next()).getPortletModes().iterator();
            while (modes.hasNext()) {
                String m = (String) modes.next();
                if (m.equals(mode.toString())) {
View Full Code Here

        return isPortletModeAllowedByPortlet(mode)
               && isPortletModeAllowedByPortal(mode);
    }

    private boolean isPortletModeAllowedByPortlet(PortletMode mode) {
        PortletDD dd = getInternalPortletWindow().getPortletEntity()
            .getPortletDefinition();

        Iterator supports = dd.getSupports().iterator();
        while(supports.hasNext()) {
            SupportsDD sup = (SupportsDD)supports.next();
            Iterator modes = sup.getPortletModes().iterator();
            while(modes.hasNext()) {
                if (modes.next().toString().equalsIgnoreCase(mode.toString())) {
View Full Code Here

    private PortletDD validDD;

    public void setUp() throws Exception {
        super.setUp();

        validDD = new PortletDD();

        PortletInfoDD info = new PortletInfoDD();
        info.setTitle("Info Title");
        info.setShortTitle("Info Short Title");
        info.setKeywords("Info Keywords");
View Full Code Here

        } catch (PortletContainerException ex) {
            throw new ServletException(ex);
        }

        // Retrieve the portletDD and create portlet config.
        PortletDD portletDD = null;
        PortletAppDD portletAppDD =
            portletContext.getPortletApplicationDefinition();
        for (Iterator it = portletAppDD.getPortlets().iterator();
             it.hasNext();) {
            PortletDD currentDD = (PortletDD) it.next();
            if (currentDD.getPortletName().equals(portletName)) {
                portletDD = currentDD;
                break;
            }
        }
        if (portletDD == null) {
View Full Code Here

     * @return true if the content type is valid, false otherwise.
     */
    private boolean isValidContentType(String contentType) {
        boolean valid = false;

        PortletDD portletDD = getInternalPortletWindow().getPortletEntity()
            .getPortletDefinition();
        for (Iterator it = portletDD.getSupports().iterator();
             !valid && it.hasNext();) {

            SupportsDD supportsDD = (SupportsDD) it.next();
            String supportedType = supportsDD.getMimeType();

View Full Code Here

                throw new PortletContainerException("Optional Portlet Registry Service not found.");
            }           
            PortletAppDD ctx = portletRegistry.getPortletApplicationDescriptor(applicationId);
            Iterator i = ctx.getPortlets().iterator();
            while(i.hasNext()) {
                PortletDD dd = (PortletDD)i.next();
                if(portletName.equals(dd.getPortletName())) {
                    Iterator i2 = dd.getSupports().iterator();
                    while(i2.hasNext()) {
                        SupportsDD sd = (SupportsDD)i2.next();
                        Iterator pd = sd.getPortletModes().iterator();
                        while(pd.hasNext()) {
                            if(mode.equalsIgnoreCase((String)pd.next())) {
View Full Code Here

     *
     * @see org.apache.pluto.descriptors.portlet.PortletPreferenceDD
     */
    public InternalPortletPreference[] getDefaultPreferences() {
        if (defaultPreferences == null) {
            PortletDD portletDD = getPortletDefinition();
            PortletPreferencesDD prefsDD = portletDD.getPortletPreferences();
            if (prefsDD != null) {
              List prefs = new ArrayList();
              for (Iterator it = prefsDD.getPortletPreferences().iterator();
                  it.hasNext(); ) {
                PortletPreferenceDD prefDD = (PortletPreferenceDD) it.next();
View Full Code Here

        // Load PortletAppDD and find out the portlet definition.
        try {
            PortletAppDD appDD = PortletDescriptorRegistry.getRegistry()
                .getPortletAppDD(crossContext);
            for (Iterator it = appDD.getPortlets().iterator(); it.hasNext(); ) {
                PortletDD portletDD = (PortletDD) it.next();
                if (portletDD.getPortletName().equals(portletName)) {
                  portletDefinition = portletDD;
                  break;
                }
            }
        } catch (PortletContainerException ex) {
View Full Code Here

        // supported by a portlet, even if not defined in the descriptor
        if (mode.equals(PortletMode.VIEW)) {
            return true;
        }

        PortletDD dd = internalPortletWindow.getPortletEntity()
            .getPortletDefinition();
        Iterator supports = dd.getSupports().iterator();
        while(supports.hasNext()) {
            SupportsDD support = (SupportsDD)supports.next();
            Iterator modes = support.getPortletModes().iterator();
            while(modes.hasNext()) {
                String md = (String)modes.next();
View Full Code Here

TOP

Related Classes of org.apache.pluto.descriptors.portlet.PortletDD

Copyright © 2018 www.massapicom. 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.