Package org.gatein.mop.api.workspace

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


      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


      {
         ownerTypeChunk = "%";
      }

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

      //
      String statement;
      try
View Full Code Here

      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

         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

         return key;
      }

      public LazyPageList<PortalKey> run(final POMSession session) throws Exception
      {
         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()));
         }
View Full Code Here

      }

      //
      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)
      {
         throw new NavigationServiceException(NavigationError.NAVIGATION_NO_SITE);
View Full Code Here

      }

      //
      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)
      {
         throw new NavigationServiceException(NavigationError.NAVIGATION_NO_SITE);
View Full Code Here

      {
         Navigation sourceNav = session.findObjectById(ObjectType.NAVIGATION, source.data.id);

         //
         toEvict.add(sourceNav.getObjectId());
         Workspace workspace = sourceNav.getSite().getWorkspace();
         String reference = state.getPageRef();
         if (reference != null)
         {
            String[] pageChunks = split("::", reference);
            ObjectType<? extends Site> siteType = Mapper.parseSiteType(pageChunks[0]);
            Site site = workspace.getSite(siteType, pageChunks[1]);
            org.gatein.mop.api.workspace.Page target = site.getRootPage().getChild("pages").getChild(pageChunks[2]);
            PageLink link = sourceNav.linkTo(ObjectType.PAGE_LINK);
            link.setPage(target);
         }
         else
View Full Code Here

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

        //
        Workspace workspace = session.getWorkspace();

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

        //
        if (customization == null) {
            workspace.getCustomizationContext().customize(definitionName, contentType, contentId, null);
        } else if (customization.getContentId().equals(contentId)) {
            // Do nothing here
        } else {
            throw new IllegalArgumentException("Cannot create a content with a content id " + contentId
                    + " with an existing different content id " + customization.getContentId());
View Full Code Here

    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

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.