Package org.apache.jetspeed.services

Examples of org.apache.jetspeed.services.PortletServices


    {
        try
        {
            //Context ctx = new InitialContext();
            //UserManager userManager = (UserManager)ctx.lookup("java:comp/UserManager");
            PortletServices services = JetspeedPortletServices.getSingleton();
            UserManager userManager =
                (UserManager)services.getService("UserManager");
           
            Map appMap = (Map)FacesContext.getCurrentInstance().getExternalContext().getApplicationMap();
            UserManager u2 = (UserManager)appMap.get(SecurityResources.CPS_USER_MANAGER_COMPONENT);                       
            System.out.println("u2 == " + u2);
            System.out.println("um == " + userManager);
View Full Code Here


     * @param clazz
     * @return
     */
    public static JetspeedLogger getSharedLogger(Class<?> clazz)
    {
        PortletServices ps = JetspeedPortletServices.getSingleton();
       
        if (ps != null)
        {
            JetspeedLoggerFactory jsLoggerFactory = (JetspeedLoggerFactory) ps.getService(JetspeedLoggerFactory.class.getName());
           
            if (jsLoggerFactory != null)
            {
                return jsLoggerFactory.getLogger(clazz);
            }
View Full Code Here

     * @param name
     * @return
     */
    public static JetspeedLogger getSharedLogger(String name)
    {
        PortletServices ps = JetspeedPortletServices.getSingleton();
       
        if (ps != null)
        {
            JetspeedLoggerFactory jsLoggerFactory = (JetspeedLoggerFactory) ps.getService(JetspeedLoggerFactory.class.getName());

            if (jsLoggerFactory != null)
            {
                return jsLoggerFactory.getLogger(name);
            }
View Full Code Here

    private boolean attemptStart(ServletContext context, String contextName, String contextPath, String paDir, ClassLoader paClassLoader)
    {
        try
        {
            context.log(TRY_START_MSG + contextPath);
            PortletServices services = JetspeedPortletServices.getSingleton();
            if (services != null)
            {
                PortletApplicationManagement pam =
                    (PortletApplicationManagement)services.getService("PAM");

                if (pam != null && pam.isStarted())
                {
                    DirectoryHelper paDirHelper = new DirectoryHelper(new File(paDir));
                    pam.startPortletApplication(contextName, contextPath, paDirHelper, paClassLoader);
                    started = true;
                    psm = (PortalSessionsManager)services.getService(PortalSessionsManager.SERVICE_NAME);

                    context.log(STARTED_MSG + contextPath);
                    return true;
                }
            }
View Full Code Here

            startTimer = null;
    }
          else if ( started )
          {
            started = false;
            PortletServices services = JetspeedPortletServices.getSingleton();
            if (services != null)
            {
                PortletApplicationManagement pam =
                    (PortletApplicationManagement)services.getService("PAM");

                if (pam != null)
    {
                    getServletContext().log(STOP_MSG + contextName);
        try
View Full Code Here

            {
                return null;
            }
           
            // return the service
            PortletServices services = JetspeedPortletServices.getSingleton();
            return services.getService(serviceName);
        }
        return servletContext.getAttribute(name);
    }
View Full Code Here

        session = null;
    }
   
    private PortalSessionsManager getManager()
    {
        PortletServices services = JetspeedPortletServices.getSingleton();
        if (services != null)
        {
            return (PortalSessionsManager)services.getService(PortalSessionsManager.SERVICE_NAME);
        }
        return null;
    }
View Full Code Here

    private boolean attemptStart(ServletContext context, String contextPath, String paDir, ClassLoader paClassLoader)
    {
        try
        {
            context.log(TRY_START_MSG + contextPath);
            PortletServices services = JetspeedPortletServices.getSingleton();
            if (services != null)
            {
                PortletApplicationManagement pam =
                    (PortletApplicationManagement)services.getService("PAM");

                if (pam != null && pam.isStarted())
                {
                    DirectoryHelper paDirHelper = new DirectoryHelper(new File(paDir));
                    pam.startPortletApplication(contextPath, paDirHelper, paClassLoader);
                    started = true;
                    psm = (PortalSessionsManager)services.getService(PortalSessionsManager.SERVICE_NAME);

                    context.log(STARTED_MSG + contextPath);
                    return true;
                }
            }
View Full Code Here

            startTimer = null;
    }
          else if ( started )
          {
            started = false;
            PortletServices services = JetspeedPortletServices.getSingleton();
            if (services != null)
            {
                PortletApplicationManagement pam =
                    (PortletApplicationManagement)services.getService("PAM");

                if (pam != null)
    {
                    getServletContext().log(STOP_MSG + contextName);
        try
View Full Code Here

        session = null;
    }

    private PortalSessionsManager getManager()
    {
        PortletServices services = JetspeedPortletServices.getSingleton();
        if (services != null)
        {
            return (PortalSessionsManager)services.getService(PortalSessionsManager.SERVICE_NAME);
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.services.PortletServices

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.