Examples of POMSession


Examples of org.exoplatform.portal.pom.config.POMSession

      }
      if (locale == null)
      {
         throw new NullPointerException("No null locale accepted");
      }
      POMSession session = manager.getSession();
      WorkspaceObject obj = session.findObjectById(id);
      I18NAdapter able = obj.adapt(I18NAdapter.class);
      Described desc = able.getI18NMixin(Described.class, locale, true);
      desc.setState(description);
   }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

   {
      if (id == null)
      {
         throw new NullPointerException("No null id accepted");
      }
      POMSession session = manager.getSession();
      WorkspaceObject obj = session.findObjectById(id);
      I18NAdapter able = obj.adapt(I18NAdapter.class);
      Described desc = able.getMixin(Described.class, false);
      return desc != null ? desc.getState() : null;
   }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

   {
      if (id == null)
      {
         throw new NullPointerException("No null id accepted");
      }
      POMSession session = manager.getSession();
      WorkspaceObject obj = session.findObjectById(id);
      I18NAdapter able = obj.adapt(I18NAdapter.class);
      if (description != null)
      {
         Described desc = able.getMixin(Described.class, true);
         desc.setState(description);
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

   {
      if (id == null)
      {
         throw new NullPointerException("No null id accepted");
      }
      POMSession session = manager.getSession();
      WorkspaceObject obj = session.findObjectById(id);
      I18NAdapter able = obj.adapt(I18NAdapter.class);
      Map<Locale, Described> mixins = able.getI18NMixin(Described.class);
      Map<Locale, Described.State> names = null;
      if (mixins != null)
      {
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

   {
      if (id == null)
      {
         throw new NullPointerException("No null id accepted");
      }
      POMSession session = manager.getSession();
      WorkspaceObject obj = session.findObjectById(id);
      I18NAdapter able = obj.adapt(I18NAdapter.class);
      Collection<Locale> locales = able.removeI18NMixin(Described.class);
      for (Locale locale : locales)
      {
         cache.removeState(new CacheKey(locale, id));
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

   private void touchImport()
   {
      RequestLifeCycle.begin(PortalContainer.getInstance());
      try
      {
         POMSession session = pomMgr.getSession();
         Workspace workspace = session.getWorkspace();
         Imported imported = workspace.adapt(Imported.class);
         imported.setLastModificationDate(new Date());
         imported.setStatus(Status.DONE.status());
         session.save();
      }
      finally
      {
         RequestLifeCycle.end();
      }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

   {
      RequestLifeCycle.begin(PortalContainer.getInstance());
      try
      {
        
         POMSession session = pomMgr.getSession();

         // Obtain the status
         Workspace workspace = session.getWorkspace();
         boolean perform = !workspace.isAdapted(Imported.class);


         // We mark it
         if (perform)
         {
            Imported imported = workspace.adapt(Imported.class);
            imported.setCreationDate(new Date());
           
            // for legacy checking
            if (dataStorage_.getPortalConfig(defaultPortal) != null)
            {
               perform = false;
               imported.setStatus(Status.DONE.status());
            }
            else
            {
               isFirstStartup = true;
            }
            session.save();
         }
         else
         {
            Imported imported = workspace.adapt(Imported.class);
            Integer st = imported.getStatus();
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

      InputStream inputStream = attachment.getStream();
      if (inputStream == null) throw new OperationException(operationContext.getOperationName(), "No data stream available for import.");

      POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
      POMSession session = mgr.getSession();
      if (session == null) throw new OperationException(operationName, "MOP session was null");

      Workspace workspace = session.getWorkspace();
      if (workspace == null) throw new OperationException(operationName, "MOP workspace was null");

      DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
      if (dataStorage == null) throw new OperationException(operationName, "DataStorage was null");
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

      {
         throw new ResourceNotFoundException("No site type found for " + siteType);
      }

      POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
      POMSession session = mgr.getSession();
      if (session == null) throw new OperationException(operationName, "MOP session was null");

      Workspace workspace = session.getWorkspace();
      if (workspace == null) throw new OperationException(operationName, "MOP workspace was null");

      execute(operationContext, resultHandler, workspace, objectType);
   }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.POMSession

      {
         throw new NullPointerException();
      }

      //
      POMSession session = manager.getSession();
      NavigationData data = dataCache.getNavigationData(session, key);
      return data != null && data != NavigationData.EMPTY ? new NavigationContext(data) : null;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.