Examples of PortletEntry


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

        {
            Iterator result = PortletDbEntryPeer.doSelect(new Criteria())
                    .iterator();
            while (result.hasNext())
            {
                PortletEntry se =
                    mapDatabaseToEntry((PortletDbEntry) result.next());
                extent.add(se);
            }
        } catch (TorqueException e)
        {
View Full Code Here

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

     * 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

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

        Security adminSecurity = new BaseSecurity("admin");
        assertNotNull( "Have admin security", adminSecurity);
        Security userSecurity = new BaseSecurity("user");
        assertNotNull( "Have user security", userSecurity);

        PortletEntry userPortletEntry = new BasePortletEntry();
        assertNotNull( "Have userPortletEntry", userPortletEntry);
        userPortletEntry.setName( USER_PORTLET);
        userPortletEntry.setSecurity( userSecurity);
        Parameter adminParam = new BaseParameter();
        assertNotNull( "Have adminParameter", adminParam);
        adminParam.setName("AdminParam");
        adminParam.setValue("adminValue");
        adminParam.setSecurity(adminSecurity);
        userPortletEntry.addParameter(adminParam);

        Parameter userParam = new BaseParameter();
        assertNotNull( "Have userParameter", userParam);
        userParam.setName("UserParam");
        userParam.setValue("userValue");
        userParam.setSecurity(userSecurity);
        userPortletEntry.addParameter(userParam);
        assertEquals( "Admin user customize access to admin parameter", true, JetspeedPortalAccessController.checkPermission( adminUser, new PortalResource( userPortletEntry, adminParam), JetspeedSecurity.PERMISSION_CUSTOMIZE));
        assertEquals( "Turbine user customize access to admin parameter", false, JetspeedPortalAccessController.checkPermission( turbineUser, new PortalResource( userPortletEntry, adminParam), JetspeedSecurity.PERMISSION_CUSTOMIZE));
        assertEquals( "Admin user customize access to admin parameter", true, JetspeedPortalAccessController.checkPermission( adminUser, new PortalResource( userPortletEntry, userParam), JetspeedSecurity.PERMISSION_CUSTOMIZE));
        assertEquals( "Turbine user customize access to admin parameter", true, JetspeedPortalAccessController.checkPermission( turbineUser, new PortalResource( userPortletEntry, userParam), JetspeedSecurity.PERMISSION_CUSTOMIZE));
       
View Full Code Here

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

        if (p == null)
            return;

        // retrieve the portlet parameters
        PortletEntry entry =
            (PortletEntry) Registry.getEntry(Registry.PORTLET, p.getName());
        // save the entry in the session
        Vector params = new Vector();
        Iterator i = entry.getParameterNames();

        //System.out.println("==========================================");
        while (i.hasNext())
        {
            String name = (String) i.next();
            Parameter param = entry.getParameter(name);

            // filter some "system" and hidden parameters
            if ((!param.isHidden()) && (name.charAt(0) != '_'))
            {
                // check the user role
View Full Code Here

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

        // Update paramaters
        try
        {
            PortletInstance instance =
                PersistenceManager.getInstance(p, rundata);
            PortletEntry regEntry =
                (PortletEntry) Registry.getEntry(Registry.PORTLET, p.getName());

            Iterator i = params.iterator();

            //System.out.println("==========================================");
            while (i.hasNext())
            {
                Parameter param = (Parameter) i.next();
                String name = param.getName();
                String newValue = null;
                String[] testArray = rundata.getParameters().getStrings(name);
                if (testArray != null && testArray.length > 1)
                {
                    newValue =
                        org.apache.jetspeed.util.StringUtils.arrayToString(
                            testArray,
                            ",");
                }
                else
                {
                    newValue = rundata.getParameters().getString(name);
                    if (newValue == null)
                    {
                        newValue = "";
                    }
                }
                String regValue = regEntry.getParameter(name).getValue();
                //param.getValue();
                String psmlValue = instance.getAttribute(name);

                //System.out.println(name + "= [" + psmlValue + "] in psml");
                //System.out.println(name + "= [" + regValue + "] in registry");
View Full Code Here

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

              result = URILookup.getURI(URILookup.TYPE_EDIT_ACCOUNT, URILookup.SUBTYPE_NONE, data);
           

            /* APPLICATIONS */
            if (type.equalsIgnoreCase( "Applications" )) {
              PortletEntry entry = null;
              entry = (PortletEntry)Registry.getEntry( Registry.PORTLET, "Applications" );
              result = PortletURIManager.getPortletMaxURI( entry, data ).toString();
           

            /* BASE URL */
 
View Full Code Here

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

                //create a Runnable for updating this Portlet in the cache.

                Enumeration enum1 = Registry.get(Registry.PORTLET).getEntries();

                while( enum1.hasMoreElements() ) {
                    PortletEntry entry = (PortletEntry)enum1.nextElement();

                    if ( (entry.getURL()!= null) && entry.getURL().equals(url) )
                    {
                        try
                        {
                            PortletRefresher pr = new PortletRefresher( entry );
View Full Code Here

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

                }

                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

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

            // If portlet name is specified, it will be used to check security for the parameter
            if (this.portlet != null)
            {
                // Retrieve registry entry and its parameter
                PortletEntry entry = (PortletEntry) Registry.getEntry(Registry.PORTLET, this.portlet);
                Parameter param = entry.getParameter(this.name);

                // Verify security for the parameter
                canAccess = JetspeedSecurity.checkPermission((JetspeedUser) data.getUser(),
                                                             new PortalResource(entry, param),
                                                             JetspeedSecurity.PERMISSION_CUSTOMIZE);
View Full Code Here

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

        {
            try
            {

                Entry psmlEntry = (Entry) eit.next();
                PortletEntry entry =
                    (PortletEntry) Registry.getEntry(Registry.PORTLET, psmlEntry.getParent());

                if (entry != null)
                {
                    Portlet p = PortletFactory.getPortlet(psmlEntry);
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.