Package org.gatein.mop.api.workspace

Examples of org.gatein.mop.api.workspace.Workspace


         return NavigationData.class;
      }

      public NavigationData run(POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(siteType, key.getId());
         if (site != null)
         {
            Navigation nav = site.getRootNavigation();
            Navigation defaultNav = nav.getChild("default");
            if (defaultNav != null)
View Full Code Here


         return key;
      }

      public Void run(POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(siteType, key.getId());
         if (site == null)
         {
            throw new IllegalArgumentException("Cannot insert page navigation "
               + " as the corresponding portal " + key.getId() + " with type " + siteType + " does not exist");
         }
View Full Code Here

         return key;
      }

      public Void run(POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(siteType, key.getId());
         if (site == null)
         {
            throw new IllegalArgumentException("Cannot insert page navigation "
               + " as the corresponding portal " + key.getId() + " with type " + siteType + " does not exist");
         }
View Full Code Here

         return key;
      }

      public Void run(POMSession session)
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(type, key.getId());
         if (site == null)
         {
            throw new NoSuchDataException("Could not remove non existing portal " + key.getId());
         }
         else
View Full Code Here

         return key;
      }

      public Void run(POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(type, key.getId());
         if (site != null)
         {
            if (!overwrite)
            {
               throw new IllegalArgumentException("Cannot create portal " + config.getName() + " that already exist");
            }
         }
         else
         {
            if (overwrite)
            {
               throw new IllegalArgumentException("Cannot update portal " + config.getName() + " that does not exist");
            }

            //
            site = workspace.addSite(type, config.getName());
            Page root = site.getRootPage();
            root.addChild("pages");
            root.addChild("templates");

            // Add pending preferences
View Full Code Here

         return PortalData.class;
      }

      public PortalData run(POMSession session)
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(type, key.getId());
         if (site != null)
         {
            return new Mapper(session).load(site);
         }
View Full Code Here

         this.cloneSiteType = Mapper.parseSiteType(cloneOwnerType);
      }

      public PageData run(POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();

         //
         org.gatein.mop.api.workspace.Page srcPage;
         Site srcSite = workspace.getSite(siteType, ownerId);
         if (srcSite == null)
         {
            throw new NoSuchDataException("Could not clone  page " + name + "from non existing site of type "
               + ownerType + " with id " + ownerId);
         }
         else
         {
            org.gatein.mop.api.workspace.Page root = srcSite.getRootPage();
            org.gatein.mop.api.workspace.Page pages = root.getChild("pages");
            srcPage = pages.getChild(name);
         }

         //
         if (srcPage == null)
         {
            throw new NoSuchDataException("Could not clone non existing page " + name + " from site of type "
               + ownerType + " with id " + ownerId);
         }

         //
         Site dstSite = workspace.getSite(cloneSiteType, cloneOwnerId);
         if (dstSite == null)
         {
            throw new IllegalArgumentException("Could not clone page " + name + "to non existing site of type "
               + ownerType + " with id " + ownerId);
         }
View Full Code Here

         return key;
      }

      public Void run(POMSession session)
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(siteType, ownerId);
         if (site == null)
         {
            throw new NoSuchDataException("Could not remove page " + name + "of non existing site of type "
               + ownerType + " with id " + ownerId);
         }
View Full Code Here

         return key;
      }

      public Void run(POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(siteType, ownerId);
         if (site == null)
         {
            throw new IllegalArgumentException("Cannot insert page " + page + " as the corresponding portal "
               + ownerId + " with type " + siteType + " does not exist");
         }
View Full Code Here

         return PageData.class;
      }

      public PageData run(POMSession session)
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(siteType, ownerId);
         if (site != null)
         {
            org.gatein.mop.api.workspace.Page root = site.getRootPage();
            org.gatein.mop.api.workspace.Page pages = root.getChild("pages");
            org.gatein.mop.api.workspace.Page page = pages.getChild(name);
View Full Code Here

TOP

Related Classes of org.gatein.mop.api.workspace.Workspace

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.