Package org.exoplatform.container

Examples of org.exoplatform.container.PortalContainer


  
   public void testMultiplePortalContainers() throws Exception
   {
      ExoContainer oldContainer = ExoContainerContext.getCurrentContainerIfPresent();
      MyComponent component;
      PortalContainer container = null;
      MyComponent component2;
      PortalContainer container2 = null;
      String oldProfileList = System.getProperty(PropertyManager.RUNTIME_PROFILES);
      try
      {
         try
         {
View Full Code Here


      super(name);
   }

   public void setUp() throws Exception
   {
      PortalContainer pcontainer = PortalContainer.getInstance();
      service = (MailService)pcontainer.getComponentInstanceOfType(MailService.class);
      // starting dummy SMTP Server
      mailServer = new Wiser();
      mailServer.setPort(SMTP_PORT);
      mailServer.start();
   }
View Full Code Here

      assertEquals(2, cache.getCacheMiss() - misses);
   }

   private ExoCacheFactory getExoCacheFactoryInstance() throws ExoCacheInitException
   {
      PortalContainer pc = PortalContainer.getInstance();
      ExoCacheFactoryImpl factory =
         new ExoCacheFactoryImpl(pc.getContext(), "jar:/conf/portal/cache-configuration-template.xml", (ConfigurationManager)pc
            .getComponentInstanceOfType(ConfigurationManager.class), Boolean.valueOf(
            System.getProperty("allow.shareable.cache")).booleanValue());
      InitParams params = new InitParams();
      ObjectParameter param = new ObjectParameter();
      param.setName("LRU");
View Full Code Here

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

            if (isDebugEnabled) {
                log.debug("Found the context '"+ r.getContextPath() +"' for '"+ resourcePath +"'");
            }

            String targetContextPath = r.getContextPath();
            PortalContainer portalContainer = PortalContainer.getInstance();
            ServletContext mergedContext = portalContainer.getPortalContext();
            ServletContext targetContext = mergedContext.getContext(targetContextPath);

            String resourceURI = r.getDirectoryAndPath();
            HttpServletRequest request = context.getRequest();
            HttpServletResponse response = context.getResponse();
View Full Code Here

        String url = hreq.getParameter("url");
        if (url == null) {
            hresp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "No URL");
        } else {
            // Get container
            PortalContainer container = PortalContainer.getInstance(ctx);
            if (container == null) {
                hresp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not access container for servlet context "
                        + ctx.getContextPath());
            } else {
                ProxyFilterService service = (ProxyFilterService) container
                        .getComponentInstanceOfType(ProxyFilterService.class);
                if (service == null) {
                    hresp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not access proxy filter service "
                            + ctx.getContextPath());
                } else {
View Full Code Here

   {
      boolean hasBeenSet = false;
      final ExoContainer oldContainer = ExoContainerContext.getCurrentContainer();
      try
      {
         PortalContainer portalContainer = PortalContainer.getInstanceIfPresent();
         if (portalContainer == null)
         {
            portalContainer = PortalContainer.getCurrentInstance(event.getServletContext());
            PortalContainer.setInstance(portalContainer);
            hasBeenSet = true;
View Full Code Here

  public void doFilter(ServletRequest request, ServletResponse response,
      FilterChain chain) throws IOException, ServletException {
   
    HttpServletRequest upcastedRequest = (HttpServletRequest)request;
   
    PortalContainer portalContainer = PortalContainer.getInstance();
    ServletContext mergedContext = portalContainer.getPortalContext();
   
    String path = upcastedRequest.getRequestURI();
    String ctx = upcastedRequest.getContextPath();
   
    if(ctx != null && ctx.length() > 0 && path.startsWith(ctx))
View Full Code Here

   * Get all the portal roles
   * @return List of the portal roles (list of it it.eng.spagobi.bo.Role)
   */
  public List getRoles() {
    List roles = new ArrayList();
    PortalContainer container = PortalContainer.getInstance()
    OrganizationService service = (OrganizationService) container.getComponentInstanceOfType(OrganizationService.class);
    try {
      Collection groups = service.getGroupHandler().getAllGroups();
        Iterator iter = groups.iterator();
        Group group = null;
        while(iter.hasNext()) {
View Full Code Here

  try {
    profile.setUniqueIdentifier(userId);
      profile.setUserId(userId);
      ArrayList roles = new ArrayList();
      HashMap userAttributes = new HashMap();
      PortalContainer container = PortalContainer.getInstance();

      if (container == null) {
    ConfigSingleton config = ConfigSingleton.getInstance();
    SourceBean securityconfSB = (SourceBean) config
      .getAttribute("SPAGOBI.SECURITY.PORTAL-SECURITY-CLASS.CONFIG");
    String paramCont = "NAME_PORTAL_APPLICATION";
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>", " Use param " + paramCont);
    SourceBean paramContSB = (SourceBean) securityconfSB.getAttribute(paramCont);
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>",
      " Param context name Source Bean " + "retrived: " + paramContSB);
    String nameCont = (String) paramContSB.getCharacters();
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>", " Use context name " + nameCont);
    RootContainer rootCont = RootContainer.getInstance();
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>", " Root container retrived: "
      + rootCont);
    container = rootCont.getPortalContainer(nameCont);
      }

      OrganizationService service = (OrganizationService) container
        .getComponentInstanceOfType(OrganizationService.class);

      // load user roles
      Collection tmpRoles = service.getGroupHandler().findGroupsOfUser(userId);
      GroupHandler groupHandler = service.getGroupHandler();
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.