Package org.apache.jetspeed.services

Examples of org.apache.jetspeed.services.PortletServices


        }
    }

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


        return cm;       
    }
   
    public void sessionCreated(HttpSessionEvent se)
    {
        PortletServices services = JetspeedPortletServices.getSingleton();
        if (services != null)
        {
            PortalSessionsManager psm = (PortalSessionsManager)services.getService(PortalSessionsManager.SERVICE_NAME);
            if (psm != null)
            {
                psm.portalSessionCreated(se.getSession());
            }
        }
View Full Code Here

       
        try
        {
            jsLogger.info(TRY_START_MSG + contextPath);
            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);

                    jsLogger.info(STARTED_MSG + contextPath);
                    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) && pam.isStarted())
                        {
                            JetspeedLogger jsLogger = JetspeedLoggerUtil.getSharedLogger(getClass());
                            jsLogger.info(STOP_MSG + contextName);
                            getServletContext().log(STOP_MSG + contextName);
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 static boolean attemptRegistration(ServletContext context, String portletApplicationName)
    {
        try
        {
            PortletServices services = JetspeedPortletServices.getSingleton();
            if (services != null)
            {
                DeploymentRegistration registrar =
                    (DeploymentRegistration)services.getService("PAM");

                if (registrar != null)
                {
                    FileSystemHelper webapp = new DirectoryHelper(new File(context.getRealPath("/")));
                    if (registrar.registerPortletApplication(webapp, portletApplicationName))
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

    {
        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(PortletApplicationResources.CPS_USER_MANAGER_COMPONENT);                       
            System.out.println("u2 == " + u2);
            System.out.println("um == " + userManager);
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.