Package org.apache.jetspeed.om.profile

Examples of org.apache.jetspeed.om.profile.Entry


    /**
     * @see PortletInstance#getImage()
     */
    public String getImage()
    {
        Entry entry = getEntry();

        String image = null;
        if (entry != null)
        {
            MetaInfo metaInfo = entry.getMetaInfo();
            if (metaInfo != null)
            {
                return image = metaInfo.getImage();
            }
        }
View Full Code Here


                assertTrue(controllerParam.getName().equals("b"));
                assertTrue(controllerParam.getValue().equals("2"));

                Iterator entries = rootset.getEntriesIterator();
                assertNotNull(entries);
                Entry entry = (Entry)entries.next();
                assertTrue(entry.getParent().equals("LoggedInWelcome"));   
                assertTrue(entry.getId().equals("03"));   

                Layout elayout = entry.getLayout();
                assertNotNull(elayout);
                Iterator elayoutParams = elayout.getParameterIterator();
                assertNotNull(elayoutParams);
                Parameter elayoutParam = (Parameter)elayoutParams.next();
                assertTrue(elayoutParam.getName().equals("column"));
                elayoutParam = (Parameter)elayoutParams.next();
                assertTrue(elayoutParam.getName().equals("row"));

                Iterator pv = rootset.getPortletsIterator();

                Portlets p = (Portlets)pv.next();
                assertNotNull(p);

                Controller pc = p.getController();
                assertNotNull(pc);
                assertTrue(pc.getName().equals("TwoColumns"));

                Iterator pe = p.getEntriesIterator();
                assertNotNull(pe);
                Entry e1 = (Entry)pe.next();
                assertTrue(e1.getParent().equals("HelloWhatever"));   
                assertTrue(e1.getId().equals("99"));   

                Entry e2 = (Entry)pe.next();
                assertTrue(e2.getParent().equals("HelloVelocity"));   
                assertTrue(e2.getId().equals("100"));   

                Entry e3 = (Entry)pe.next();
                assertTrue(e3.getParent().equals("HelloCleveland"));   
                assertTrue(e3.getId().startsWith("P-"));   
                System.out.println(e3.getId());

                Iterator rv = p.getReferenceIterator();
                assertNotNull(rv);
                Reference ref = (Reference)rv.next();
                assertNotNull(ref);
View Full Code Here

                        assertEquals( "Portlet ID 02 Title", "Portlet Description", pp02MetaInfo.getDescription());
                        assertEquals( "Portlet ID 02 Title", "Portlet Image", pp02MetaInfo.getImage());
                        Iterator pp02itt = pp.getEntriesIterator();
                        while (pp02itt.hasNext())
                        {
                            Entry pp02Entry = (Entry) pp02itt.next();
                            assertNotNull( "Portlet Id 02 has entry", pp02Entry);
                            if (pp02Entry.getId().equals("07"))
                            {
                                foundEntry07 = true;
                                MetaInfo entry07MetaInfo = pp02Entry.getMetaInfo();
                                assertNotNull( "Entry ID 07 has metaInfo", entry07MetaInfo);
                                assertEquals( "Entry ID 07 Title", "Entry Title", entry07MetaInfo.getTitle());
                                assertEquals( "Entry ID 07 Title", "Entry Description", entry07MetaInfo.getDescription());
                                assertEquals( "Entry ID 07 Title", "Entry Image", entry07MetaInfo.getImage());
                            }
View Full Code Here

        assertNotNull( "Getting turbine user", turbineUser);
        turbineUser.setHasLoggedIn(Boolean.TRUE);
       
        JetspeedUser anonymousUser =  (JetspeedUser) JetspeedSecurity.getAnonymousUser();
        assertNotNull( "Getting anonymous user", anonymousUser);
        Entry adminEntry = createEntry( ADMIN_PORTLET, "ST_01.admin");
        Entry userEntry = createEntry(USER_PORTLET, "ST_01.user");
        Entry allEntry = createEntry(ALL_PORTLET, "ST_01.all");
       
        assertEquals( "Admin user has view access to " + ADMIN_PORTLET, true, JetspeedPortalAccessController.checkPermission( adminUser, adminEntry, "view"));
//        assertEquals( "Turbine user DOES NOT have view access to " + ADMIN_PORTLET, false, JetspeedPortalAccessController.checkPermission( turbineUser, adminEntry, "view"));

//        assertEquals( "Anonymous user DOES NOT have view access to " + ADMIN_PORTLET, false, JetspeedPortalAccessController.checkPermission( anonymousUser, adminEntry, "view"));
View Full Code Here

        try
        {
            pageContext.getOut().flush();

            ConcreteElement result = new ConcreteElement();
            Entry entry = null;

            if (this.psml != null)
            {
                ProfileLocator baseLocator = Profiler.createLocator();
                baseLocator.createFromPath(this.psml);
View Full Code Here

                    continue;
                }

                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;
                }

                if (identityElement instanceof Reference)
                {
View Full Code Here

        String controlName = data.getParameters().getString("control");
        String id = data.getParameters().getString("js_peid");

        try
        {
            Entry entry = jdata.getCustomizedProfile().getDocument().getEntryById(id);

            if (entry != null)
            {
                if (controlName != null && controlName.trim().length() > 0)
                {
                    PsmlControl control = new PsmlControl();
                    control.setName(controlName);
                    if (control != null)
                    {
                        entry.setControl(control);
                    }
                }
                else
                {
                    entry.setControl(null);
                }
            }
        }
        catch (Exception e)
        {
View Full Code Here

    String skinName = data.getParameters().getString("portletSkin");
    String id = data.getParameters().getString("js_peid");

    try
    {
      Entry entry = jdata.getCustomizedProfile().getDocument().getEntryById(id);

      if (entry != null)
      {
        if (skinName != null && skinName.trim().length() > 0)
        {
          PsmlSkin skin = new PsmlSkin();
          skin.setName(skinName);
          if (skin != null)
          {
            entry.setSkin(skin);
          }
        }
        else
        {
          entry.setSkin(null);
        }
      }
    }
    catch (Exception e)
    {
View Full Code Here

    String securityRefName = data.getParameters().getString("portletSecurityRef");
    String id = data.getParameters().getString("js_peid");

    try
    {
      Entry entry = jdata.getCustomizedProfile().getDocument().getEntryById(id);

      if (entry != null)
      {
        if (securityRefName != null && securityRefName.trim().length() > 0)
        {
          BaseSecurityReference securityRef = new BaseSecurityReference();
          securityRef.setParent(securityRefName);
          if (securityRef != null)
          {
            entry.setSecurityRef(securityRef);
          }
        }
        else
        {
          entry.setSecurityRef(null);
        }
      }
    }
    catch (Exception e)
    {
View Full Code Here

                    .getPortletsById(set.getID());

            List usedPortlets = AutoProfile.getPortletList(rundata);
            boolean addIt;
            int cc;
            Entry usedEntry;

            for (int i = 0; i < pnames.length; i++)
            {
                PortletEntry entry =
                    (PortletEntry) Registry.getEntry(
                        Registry.PORTLET,
                        pnames[i]);

                // add only new portlets!
                if ((entry != null) && (portlets != null))
                {

                    addIt = true;
                    /*
                                       for (cc=0; cc<usedPortlets.size(); cc++)
                                       {
                                         usedEntry = (Entry) usedPortlets.get(cc);
                                         if (entry.getName().equals(usedEntry.getParent()))
                                         {
                                           addIt = false;
                                           break;
                                         }
                                        
                                       }
                    */
                    if (addIt)
                    {
                        Entry p = new PsmlEntry();
                        // add the ClearPortletControl to wml entries     
                        //if (isWML)
                        //  p.setControl (ctrl);

                        p.setParent(pnames[i]);
                        p.setId(JetspeedIdGenerator.getNextPeid());
                        //                      SecurityReference defaultRef = PortalToolkit.getDefaultSecurityRef(
                        //                          ((JetspeedRunData) rundata).getCustomizedProfile());
                        //                      if (defaultRef != null)
                        //                      {
                        //                          if (Log.getLogger().isDebugEnabled())
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.profile.Entry

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.