Package org.gatein.mop.api.workspace

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


      {
         ownerTypeChunk = "%";
      }

      //
      Workspace workspace = getWorkspace();
      String workspaceChunk = model.pathOf(workspace);

      //
      String statement;
      if (siteType != null)
View Full Code Here


        public FindSite(Query<PortalData> siteQuery) {
            super(siteQuery);
        }

        public LazyPageList<PortalData> run(final POMSession session) {
            Workspace workspace = session.getWorkspace();
            String ownerType = q.getOwnerType();
            ObjectType<Site> siteType = ownerType == null ? ObjectType.PORTAL_SITE : Mapper.parseSiteType(ownerType);
            final Collection<? extends Site> portals = workspace.getSites(siteType);
            final Iterator<? extends Site> iterator = portals.iterator();
            ListAccess<PortalData> la = new ListAccess<PortalData>() {
                public PortalData[] load(int index, int length) throws Exception {
                    // Iterator<? extends Site> iterator = portals.iterator();
                    Mapper mapper = new Mapper(session);
View Full Code Here

        public Serializable getKey() {
            return key;
        }

        public LazyPageList<PortalKey> run(final POMSession session) {
            Workspace workspace = session.getWorkspace();
            Collection<Site> sites = workspace.getSites(type);
            final ArrayList<PortalKey> keys = new ArrayList<PortalKey>(sites.size());
            for (Site site : sites) {
                keys.add(new PortalKey(q.getOwnerType(), site.getName()));
            }
            ListAccess<PortalKey> la = new ListAccess<PortalKey>() {
View Full Code Here

        public PortalKey getKey() {
            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 {
                site.destroy();
            }
View Full Code Here

        public PortalKey getKey() {
            return key;
        }

        public Void run(POMSession session) {
            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");
            }
            new Mapper(session).save(config, site);
View Full Code Here

         return Void.class;
      }

      public Void run(POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();
         Site site = workspace.getSite(siteType, ownerId);

         //
         Customization customization = null;
         if (site != null)
         {
View Full Code Here

         return PortletPreferences.class;
      }

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

         super(siteQuery);
      }

      public LazyPageList<PortalData> run(final POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();
         String ownerType = q.getOwnerType();
         ObjectType<Site> siteType = ownerType == null ? ObjectType.PORTAL_SITE : Mapper.parseSiteType(ownerType);
         final Collection<? extends Site> portals = workspace.getSites(siteType);
         final Iterator<? extends Site> iterator = portals.iterator();
         ListAccess<PortalData> la = new ListAccess<PortalData>()
         {
            public PortalData[] load(int index, int length) throws Exception, IllegalArgumentException
            {
View Full Code Here

      {
         ownerTypeChunk = "%";
      }

      //
      Workspace workspace = getWorkspace();
      String workspaceChunk = model.pathOf(workspace);

      //
      String statement;
      if (siteType != null)
View Full Code Here

         super(siteQuery);
      }

      public LazyPageList<PortalKey> run(final POMSession session) throws Exception
      {
         Workspace workspace = session.getWorkspace();
         final Collection<? extends Site> portals = workspace.getSites(ObjectType.PORTAL_SITE);
         ListAccess<PortalKey> la = new ListAccess<PortalKey>()
         {
            public PortalKey[] load(int index, int length) throws Exception, IllegalArgumentException
            {
               Iterator<? extends Site> iterator = portals.iterator();
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.