Package org.apache.jetspeed.om.registry

Examples of org.apache.jetspeed.om.registry.PortletEntry


    /**
     */
    public boolean supportsType( MimeType mimeType )
    {
        PortletEntry entry = (PortletEntry)Registry.getEntry(Registry.PORTLET, getName() );
        String baseType = mimeType.toString();
        if (entry!=null)
        {
            Iterator i = entry.listMediaTypes();

            while(i.hasNext())
            {
                String name = (String)i.next();
                MediaTypeEntry media = (MediaTypeEntry)Registry.getEntry(Registry.MEDIA_TYPE, name);
View Full Code Here


     * @param id the PSML entry's portlet id    
     * @return an instanciated portlet corresponding to this entry
     */
    public Portlet getPortlet( Entry entry ) throws PortletException
    {
        PortletEntry regEntry = (PortletEntry)Registry.getEntry(Registry.PORTLET,
                                                                entry.getParent() );
        if (regEntry == null)
        {
            throw new PortletException("PortletFactory: unknown portlet entry in Registry: "+entry.getParent());
        }
       
        if (PortletEntry.TYPE_ABSTRACT.equals(regEntry.getType()))
        {
            throw new PortletException("PortletFactory: can't instanciate abstract registry entry: "+regEntry.getName());
        }
           
        PortletConfig pc = getPortletConfig(regEntry, entry.getId());

        // Set portlet config with values from PSML Entry
View Full Code Here

     * @param name the name of a portlet in the registry
     * @return an instanciated portlet corresponding to this entry
     */
    public Portlet getPortlet( String name, String id ) throws PortletException
    {
        PortletEntry regEntry = (PortletEntry)Registry.getEntry(Registry.PORTLET, name );

        if (regEntry == null)
        {
            throw new PortletException("PortletFactory: unknown portlet entry in Registry: "+name);
        }
       
        if (PortletEntry.TYPE_ABSTRACT.equals(regEntry.getType()))
        {
            throw new PortletException("PortletFactory: can't instanciate abstract registry entry: "+name);
        }
           
        PortletConfig pc = getPortletConfig(regEntry, id);
View Full Code Here

        }

        if ( entry.getParent() != null )
        {

            PortletEntry parent = (PortletEntry)Registry
                .getEntry( Registry.PORTLET, entry.getParent() );

            if (parent != null)
            {
                MetaData parentData = getMetaData( parent );
View Full Code Here

     * @return PortletEntry Parent of Entry
     * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
     */
    protected static PortletEntry getParentEntry(PortletEntry entry)
    {
        PortletEntry parent = (PortletEntry) Registry.getEntry(Registry.PORTLET, entry.getParent());

        return parent;
    }
View Full Code Here

    protected String getClassname(PortletEntry entry)
    {
        String className = entry.getClassname();
        if (className == null)
        {
            PortletEntry parent = getParentEntry(entry);
            if (parent != null)
            {
              // We must walk up the hierarchy just to be safe
                className = getClassname(parent);
            }
View Full Code Here

     * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
     */
    protected void addParentInitParameters(PortletEntry entry, Map hash)
    {
        // Now map any parameters from the parent that the child does not have
        PortletEntry parent = getParentEntry(entry);
        if (parent != null)
        {
            Map parentMap = parent.getParameterMap();
            Iterator names = parent.getParameterNames();

            while (names.hasNext())
            {
                String key = (String) names.next();
                if (!hash.containsKey(key))
View Full Code Here

                }

                if (identityElement instanceof Entry)
                {
                    Entry entry = (Entry) identityElement;
                    PortletEntry pentry = (PortletEntry) Registry.getEntry(Registry.PORTLET, entry.getParent());
                    if ((pentry != null) && (pentry.getTitle() != null))
                    {
                        titles.put(entry.getId(), pentry.getTitle());
                        continue;
                    }

                    titles.put(entry.getId(), entry.getParent());
                    continue;
View Full Code Here

     * PortletConfig.setInitParameter() is all but useless in this case.  The portlet
     * config availble in the Portlet is never saved back to the registry.
     */
    public static void setPortletConfigParameter(Portlet portlet, String name, String value)
    {
        PortletEntry pEntry = (PortletEntry) Registry.getEntry(Registry.PORTLET, portlet.getName());

        if (pEntry != null)
        {
            Parameter param = pEntry.getParameter(name);
            portlet.getPortletConfig().setInitParameter(name, value);
            if (param != null)
            {
                param.setValue(value);
            }
            else
            {
                pEntry.addParameter(name, value);
            }
        }
    }
View Full Code Here

     * Utility method for retreiving the correct security reference based
     * on profile and registry information.
     */
    public static SecurityReference getSecurityReference(Entry entry,  JetspeedRunData rundata)
    {
        PortletEntry pEntry = null;
        if (entry != null)
        {
            pEntry = (PortletEntry) Registry.getEntry(Registry.PORTLET, entry.getParent());
        }
        SecurityReference securityRef = null;
        // First, check the profile level security
        if (entry != null)
        {
            securityRef = entry.getSecurityRef();
        }
      
        // If no profile level security has been assigned, use the registry               
        if (securityRef == null && pEntry != null)
        {
            securityRef = pEntry.getSecurityRef();
        }
       
        // still no security? go with the default.
        if (securityRef == null && rundata != null)
        {         
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.registry.PortletEntry

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.