Package org.exoplatform.portal.pom.config

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


      {
         throw new NullPointerException();
      }

      //
      POMSession session = manager.getSession();
      ObjectType<Site> objectType = objectType(navigation.key.getType());
      Workspace workspace = session.getWorkspace();
      Site site = workspace.getSite(objectType, navigation.key.getName());

      //
      if (site == null)
      {
View Full Code Here


      {
         throw new IllegalArgumentException("Already removed");
      }

      //
      POMSession session = manager.getSession();
      ObjectType<Site> objectType = objectType(navigation.key.getType());
      Workspace workspace = session.getWorkspace();
      Site site = workspace.getSite(objectType, navigation.key.getName());

      //
      if (site == null)
      {
View Full Code Here

         throw new NullPointerException("No null scope accepted");
      }
      String nodeId = navigation.data.rootId;
      if (navigation.data.rootId != null)
      {
         POMSession session = manager.getSession();
         NodeData data = dataCache.getNodeData(session, nodeId);
         if (data != null)
         {
            NodeContext<N> context = new NodeContext<N>(model, data);
            updateNode(context, scope, listener);
View Full Code Here

      {
         throw new IllegalArgumentException("For now we don't accept to update a context that has pending changes");
      }

      //
      POMSession session = manager.getSession();
      NodeData data = dataCache.getNodeData(session, tree.root.data.id);
      if (data == null)
      {
         throw new NavigationServiceException(NavigationError.UPDATE_CONCURRENTLY_REMOVED_NODE);
      }
View Full Code Here

      dataCache.clear();
   }

   private <N> void saveTree(TreeContext<N> tree, NodeChangeListener<NodeContext<N>> listener) throws NullPointerException, NavigationServiceException
   {
      POMSession session = manager.getSession();

      //
      NodeData data = dataCache.getNodeData(session, tree.root.data.id);
      if (data == null)
      {
View Full Code Here

      }
   }

   private <N> TreeContext<N> rebase(TreeContext<N> tree, Scope.Visitor visitor) throws NavigationServiceException
   {
      POMSession session = manager.getSession();
      NodeData data = dataCache.getNodeData(session, tree.root.getId());
      if (data == null)
      {
         throw new NavigationServiceException(NavigationError.UPDATE_CONCURRENTLY_REMOVED_NODE);
      }
View Full Code Here

        if (contentId == null) {
            throw new NullPointerException("No null content id accepted");
        }

        //
        POMSession session = registry.mopManager.getSession();

        //
        Workspace workspace = session.getWorkspace();

        //
        Customization customization = workspace.getCustomizationContext().getCustomization(definitionName);

        //
View Full Code Here

    @ManyToOne
    public abstract CategoryDefinition getCategory();

    public Customization getCustomization() {
        CategoryDefinition category = getCategory();
        POMSession session = category.registry.mopManager.getSession();
        Workspace workspace = session.getWorkspace();
        String name = getName();
        return workspace.getCustomizationContext().getCustomization(name);
    }
View Full Code Here

    }

    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

    private boolean performImport() throws Exception {
        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();
                if (st != null) {
                    Status status = Status.getStatus(st);
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.pom.config.POMSession

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.