Package org.exoplatform.container

Examples of org.exoplatform.container.PortalContainer


         {
            throw new ServletException("Could not initialize PortalContainer." + "Current ExoContainer is: "
               + ExoContainerContext.getCurrentContainer());           
         }
      }
      PortalContainer pcontainer = (PortalContainer)container;
      try
      {
         PortalContainer.setInstance(pcontainer);
         chain.doFilter(request, response);
      }
View Full Code Here


*/
public class QueueTaskJob extends BaseJob
{
   public void execute(JobContext context) throws Exception
   {
      PortalContainer manager = PortalContainer.getInstance();
      QueueTasks qtasks = (QueueTasks)manager.getComponentInstanceOfType(QueueTasks.class);
      Task task = qtasks.poll();
      while (task != null)
      {
         try
         {
View Full Code Here

public class TestDatabaseService extends TestCase
{

   public void testDatabaseService() throws Exception
   {
      PortalContainer pcontainer = PortalContainer.getInstance();
      DatabaseService service =
         (DatabaseService)pcontainer.getComponentInstanceOfType(XAPoolTxSupportDatabaseService.class);
      assertNotNull(service);
      assertConfiguration(service);
      assertDBTableManager(service);
      assertIDGenerator(service);
   }
View Full Code Here

      super(name);
   }

   public void setUp() throws Exception
   {
      PortalContainer pcontainer = PortalContainer.getInstance();
      hservice_ = (HibernateService)pcontainer.getComponentInstanceOfType(HibernateService.class);
   }
View Full Code Here

   public void setUp() throws Exception
   {
      // >>>>> to avoid  two top-level container exception 
      //    StandaloneContainer.setConfigurationPath("src/main/java/conf/standalone/test-configuration.xml");
      //    container = StandaloneContainer.getInstance();
      PortalContainer container = PortalContainer.getInstance();
      dbcreator = (DBSchemaCreator)container.getComponentInstanceOfType(DBSchemaCreator.class);
   }
View Full Code Here

      super(name);
   }

   public void setUp() throws Exception
   {
      PortalContainer manager = PortalContainer.getInstance();
      nservice_ = (NetService)manager.getComponentInstanceOfType(NetService.class);
   }
View Full Code Here

      super(name);
   }

   public void setUp() throws Exception
   {
      PortalContainer manager = PortalContainer.getInstance();
      nservice_ = (NetService)manager.getComponentInstanceOfType(NetService.class);
   }
View Full Code Here

     */
    @Override
    public String getSaltedHash(String password) throws SaltedHashException {
        try {
            byte[] salt = new byte[saltByteLength];
            PortalContainer container = PortalContainer.getInstance();
            SecureRandom random = ((SecureRandomService) container.getComponentInstanceOfType(SecureRandomService.class)).getSecureRandom();
            random.nextBytes(salt);
            SaltedHash saltedHash = new SaltedHash(algorithm, iterationCount, salt, hash(this.algorithm, password, salt,
                    iterationCount, hashByteLength));
            return codec.encode(saltedHash);
        } catch (InvalidKeySpecException e) {
View Full Code Here

            executor.shutdown();
        }
    }

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

        return LoginServlet.COOKIE_NAME + nextRandom();
    }

    protected String nextRandom() {
        byte[] randomBytes = new byte[tokenByteLength];
        PortalContainer container = PortalContainer.getInstance();
        SecureRandom random = ((SecureRandomService) container.getComponentInstanceOfType(SecureRandomService.class)).getSecureRandom();
        random.nextBytes(randomBytes);
        return Base64.encodeBytes(randomBytes, EncodingOption.USEURLSAFEENCODING);
    }
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.