Package org.exoplatform.container

Examples of org.exoplatform.container.PortalContainer


   private static final Log LOG = ExoLogger.getLogger(ErrorLoginServlet.class.getName());

   @Override
   protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
   {
      PortalContainer pContainer = PortalContainer.getInstance();
      ServletContext context = pContainer.getPortalContext();
      // Unregister the token cookie
      unregisterTokenCookie(req);
      // Clear the token cookie
      clearTokenCookie(req, resp);
      // This allows the customer to define another login page without changing the portal
View Full Code Here


      Credentials credentials = (Credentials)session.getAttribute(InitiateLoginServlet.CREDENTIALS);

      //
      if (credentials == null)
      {
         PortalContainer pContainer = PortalContainer.getInstance();
         ServletContext context = pContainer.getPortalContext();

         //
         String token = getRememberMeTokenCookie(req);
         if (token != null)
         {
View Full Code Here

      // do nothing
   }

   public static <T extends AbstractTokenService> T getInstance(Class<T> classType)
   {
      PortalContainer container = PortalContainer.getInstance();
      return classType.cast(container.getComponentInstanceOfType(classType));
   }
View Full Code Here

public class BootstrapTestCase extends AbstractKernelTest
{

   public void testWorkspace() throws Exception
   {
      PortalContainer container = PortalContainer.getInstance();
      HibernateService hibernate = (HibernateService)container.getComponentInstanceOfType(HibernateService.class);
      assertNotNull(hibernate);
      OrganizationService organization = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
      assertNotNull(organization);
   }
View Full Code Here

   /** . */
   private String previousTmpDirPath = null;

   public void testRequestLifeCycle()
   {
      PortalContainer container = PortalContainer.getInstance();
      CustomService testService = (CustomService)container.getComponentInstanceOfType(CustomService.class);
      assertNull(testService.currentContainer);
      begin();
      assertNotNull(testService);
      assertSame(container, testService.currentContainer);
      end();
View Full Code Here

      assertNull(testService.currentContainer);
   }

   public void testDataSource() throws Exception
   {
      PortalContainer container = PortalContainer.getInstance();
      container.getComponentInstanceOfType(InitialContextInitializer.class);
      DataSource ds = (DataSource)new InitialContext().lookup("jdbcexo");
      assertNotNull(ds);
      Connection conn = ds.getConnection();
      DatabaseMetaData databaseMD = conn.getMetaData();
      String db = databaseMD.getDatabaseProductName() + " " + databaseMD.getDatabaseProductVersion() + "." +
View Full Code Here

      assertNotNull(organization);
   }

   public void testBasicOperation() throws Exception
   {
      PortalContainer container = PortalContainer.getInstance();
      OrganizationService organization = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
      assertNotNull(organization);

      begin();
      User test = new UserImpl("testUser");
      organization.getUserHandler().createUser(test, false);
View Full Code Here

         }
      };
     
      super.setUp();
      begin();
      PortalContainer container = PortalContainer.getInstance();
      storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
      mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
      session = mgr.openSession();
     
      events = new LinkedList<Event>();
      listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
     
      listenerService.addListener(DataStorage.PAGE_CREATED, listener);
      listenerService.addListener(DataStorage.PAGE_REMOVED, listener);
      listenerService.addListener(DataStorage.PAGE_UPDATED, listener);
      listenerService.addListener(DataStorage.NAVIGATION_CREATED, listener);
View Full Code Here

   @Override
   protected void setUp() throws Exception
   {
      super.setUp();
      begin();
      PortalContainer container = getContainer();
      organizationService = (OrganizationService)container.getComponentInstance(OrganizationService.class);
   }
View Full Code Here

         {
            events.add(event);
         }
      };

      PortalContainer container = getContainer();
      userPortalConfigSer_ =
         (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
      orgService_ = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
      mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
      authenticator = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
      listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
      events = new LinkedList<Event>();
      storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
      mopStorage = (POMDataStorage)container.getComponentInstanceOfType(POMDataStorage.class);

      // Register only once for all unit tests
      if (!registered)
      {
         // I'm using this due to crappy design of
View Full Code Here

TOP

Related Classes of org.exoplatform.container.PortalContainer

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.