Package org.exoplatform.container

Examples of org.exoplatform.container.ExoContainer


   @Override
   public void onEvent(Event<UserHandler, User> event) throws Exception
   {
      User user = event.getData();
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      UserPortalConfigService portalConfigService =
         (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
      String userName = user.getUserName();
      portalConfigService.removeUserPortalConfig("user", userName);
   }
View Full Code Here


   @Override
   public void onEvent(Event<GroupHandler, Group> event) throws Exception
   {
      Group group = event.getData();
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      UserPortalConfigService portalConfigService =
         (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
      String groupId = group.getId().substring(1);
      portalConfigService.removeUserPortalConfig("group", groupId);
   }
View Full Code Here

        if (userPortalConfig == null) {
            String portalName = null;
            String remoteUser = getRemoteUser();
            SiteType siteType = getSiteType();

            ExoContainer appContainer = getApplication().getApplicationServiceContainer();
            UserPortalConfigService service_ = (UserPortalConfigService) appContainer
                    .getComponentInstanceOfType(UserPortalConfigService.class);
            if (SiteType.PORTAL == siteType) {
                portalName = getSiteName();
            }
View Full Code Here

            UIPortal uiportal = Util.getUIPortal();

            //
            UserNode node = uiportal.getSelectedUserNode();
            if (node != null) {
                ExoContainer container = getApplication().getApplicationServiceContainer();
                container.getComponentInstanceOfType(UserPortalConfigService.class);
                UserPortalConfigService configService = (UserPortalConfigService) container
                        .getComponentInstanceOfType(UserPortalConfigService.class);
                PageKey pageRef = node.getPageRef();
                PageContext page = configService.getPage(pageRef);

                //
View Full Code Here

    * @return actual ExoContainer instance.
    */
   protected ExoContainer getContainer() throws Exception
   {
      // TODO set correct current container
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      if (container instanceof RootContainer)
      {
         container = RootContainer.getInstance().getPortalContainer(portalContainerName);
         if (container == null)
         {
View Full Code Here

public class RemoveGroupPortalConfigListener extends Listener<GroupHandler, Group> {

    @Override
    public void onEvent(Event<GroupHandler, Group> event) throws Exception {
        Group group = event.getData();
        ExoContainer container = ExoContainerContext.getCurrentContainer();
        UserPortalConfigService portalConfigService = (UserPortalConfigService) container
                .getComponentInstanceOfType(UserPortalConfigService.class);
        String groupId = group.getId().substring(1);
        portalConfigService.removeUserPortalConfig("group", groupId);
    }
View Full Code Here

            TransientApplicationState<S> state = (TransientApplicationState<S>) existing;
            return new TransientApplicationState<S>(state.getContentId(), state.getContentState(), state.getOwnerType(),
                    state.getOwnerId());
        } else {
            // Hate doing this, but it's the only way to deal with persistent application state...
            ExoContainer container = ExoContainerContext.getCurrentContainer();
            if (container instanceof PortalContainer) {
                DataStorage ds = (DataStorage) container.getComponentInstanceOfType(DataStorage.class);
                try {
                    S s = ds.load(existing, type);
                    String contentId = ds.getId(existing);

                    return new TransientApplicationState<S>(contentId, s);
View Full Code Here

public class RemoveUserPortalConfigListener extends Listener<UserHandler, User> {

    @Override
    public void onEvent(Event<UserHandler, User> event) throws Exception {
        User user = event.getData();
        ExoContainer container = ExoContainerContext.getCurrentContainer();
        UserPortalConfigService portalConfigService = (UserPortalConfigService) container
                .getComponentInstanceOfType(UserPortalConfigService.class);
        String userName = user.getUserName();
        portalConfigService.removeUserPortalConfig("user", userName);
    }
View Full Code Here

        saveSessionLocale(context, loc);
    }

    private void resetOrientation(PortalRequestContext context, Locale loc) {
        ExoContainer container = context.getApplication().getApplicationServiceContainer();
        LocaleConfigService localeConfigService = (LocaleConfigService) container
                .getComponentInstanceOfType(LocaleConfigService.class);
        LocaleConfig localeConfig = localeConfigService.getLocaleConfig(LocaleContextInfo.getLocaleAsString(loc));
        if (localeConfig == null) {
            if (log.isWarnEnabled())
                log.warn("Locale changed to unsupported Locale during request processing: " + loc);
View Full Code Here

        cookie.setPath("/");
        res.addCookie(cookie);
    }

    private void saveLocaleToUserProfile(PortalRequestContext context, Locale loc, String user) {
        ExoContainer container = context.getApplication().getApplicationServiceContainer();
        OrganizationService svc = (OrganizationService) container.getComponentInstanceOfType(OrganizationService.class);

        // Don't rely on UserProfileLifecycle loaded UserProfile when doing
        // an update to avoid a potential overwrite of other changes
        UserProfile userProfile = loadUserProfile(container, context);
        if (userProfile != null) {
View Full Code Here

TOP

Related Classes of org.exoplatform.container.ExoContainer

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.