Package org.apache.jetspeed.om.profile

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


            //
            // create a new profile
            //
            if(doc != null)
            {
                Portlets portlets = doc.getPortlets();
                //
                // Profiler does not provide update capability - must remove before replacing
                //
                if (PsmlManager.getDocument(locator) != null)
                {
                    Profiler.removeProfile(locator);
                }
               
                Portlets clonedPortlets = (Portlets) SerializationUtils.clone(portlets);
                org.apache.jetspeed.util.PortletUtils.regenerateIds(clonedPortlets);
               
                profile = Profiler.createProfile(locator, clonedPortlets);
            }
            else
View Full Code Here


                    //
                    // create a new profile
                    //
                    if(doc != null)
                    {
                        Portlets portlets = doc.getPortlets();
                        //
                        // Profiler does not provide update capability - must remove before replacing
                        //
                        if (PsmlManager.getDocument(locator) != null)
                        {
View Full Code Here

            doc = new BasePSMLDocument();
            doc.setName(fileOrUrl);

            // now that we have a file reference, try to load the serialized PSML
            Portlets portlets = null;
            FileReader reader = null;
            try
            {
                reader = new FileReader(f);
View Full Code Here

            roleProfile.getDocument() != null &&
            userProfile != null &&
            userProfile.getDocument() != null)
        {
            Profile tmpProfile = (Profile) roleProfile.clone();
            Portlets rolePortlets = tmpProfile.getDocument().getPortlets();
            Portlets userPortlets = userProfile.getDocument().getPortlets();

            // Handle pane based profile
            if (rolePortlets.getPortletsCount() > 0)
            {
                for (int i = 0; i < rolePortlets.getPortletsCount(); i++)
                {
                    Portlets pane = rolePortlets.getPortlets(i);
                    pane.setLayout(null);                           
                    userPortlets.addPortlets(pane);
                    if (logger.isDebugEnabled())
                    {
                        logger.debug("UserRoleUpdateAction: appended pane: " + pane.getId() + " to user: " + user.getUserName());
                    }
                }
            }
            // Handle profile with no panes
            else
View Full Code Here

            else if (baseProfile != null)
            {
                PSMLDocument doc = baseProfile.getDocument();
                if (doc != null)
                {
                    Portlets portlets = doc.getPortlets();
                   
                    Portlets clonedPortlets = (Portlets) SerializationUtils.clone(portlets);
                    org.apache.jetspeed.util.PortletUtils.regenerateIds(clonedPortlets);
                    profile = Profiler.createProfile(locator, clonedPortlets);
                }
                else
                {
View Full Code Here

            //
            // create a new profile
            //
            if (doc != null)
            {
                Portlets portlets = doc.getPortlets();
                //
                // Profiler does not provide update capability - must remove before replacing
                //
                if (PsmlManager.getDocument(locator) != null)
                {
View Full Code Here

                    //
                    // create a new profile
                    //
                    if (doc != null)
                    {
                        Portlets portlets = doc.getPortlets();
                        //
                        // Profiler does not provide update capability - must remove before replacing
                        //
                        if (PsmlManager.getDocument(locator) != null)
                        {
                            Profiler.removeProfile(locator);
                        }
                       
                        Portlets clonedPortlets = (Portlets) SerializationUtils.clone(portlets);
                        org.apache.jetspeed.util.PortletUtils.regenerateIds(clonedPortlets);
                        Profiler.createProfile(locator, clonedPortlets);
                    }
                    else
                    {
View Full Code Here

            doc = new BasePSMLDocument();
            doc.setName(fileOrUrl);

            // now that we have a file reference, try to load the serialized PSML
            Portlets portlets = null;
            FileReader reader = null;
            try
            {
                reader = new FileReader(f);
View Full Code Here

            doc = new BasePSMLDocument();
            doc.setName(fileOrUrl);

            // now that we have a file reference, try to load the serialized PSML
            Portlets portlets = null;
            try
            {
                DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = dbfactory.newDocumentBuilder();
View Full Code Here

     */
    protected Portlets load(Reader reader)
        throws IOException, MarshalException, ValidationException, MappingException
    {
        Unmarshaller unmarshaller = new Unmarshaller(this.mapping);
        Portlets portlets = (Portlets)unmarshaller.unmarshal(reader);
        return portlets;
    }
View Full Code Here

TOP

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

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.