Package org.gatein.mop.api.workspace

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


        final 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)
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

        public void onUpdate(NodeContext<N> source, NodeState state) throws NavigationServiceException {
            Navigation sourceNav = session.findObjectById(ObjectType.NAVIGATION, source.data.id);

            //
            toEvict.add(sourceNav.getObjectId());
            Workspace workspace = sourceNav.getSite().getWorkspace();
            PageKey reference = state.getPageRef();
            if (reference != null) {
                ObjectType<? extends Site> siteType = Utils.objectType(reference.getSite().getType());
                Site site = workspace.getSite(siteType, reference.getSite().getName());
                org.gatein.mop.api.workspace.Page target = site.getRootPage().getChild("pages").getChild(reference.getName());
                PageLink link = sourceNav.linkTo(ObjectType.PAGE_LINK);
                link.setPage(target);
            } else {
                PageLink link = sourceNav.linkTo(ObjectType.PAGE_LINK);
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

    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

        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);
                    perform = (Status.WANT_REIMPORT == status);
                }
View Full Code Here

   }


   protected final  NavigationData loadNavigation(POMSession session, SiteKey key)
   {
      Workspace workspace = session.getWorkspace();
      ObjectType<Site> objectType = objectType(key.getType());
      Site site = workspace.getSite(objectType, key.getName());
      if (site != null)
      {
         Navigation defaultNavigation = site.getRootNavigation().getChild("default");
         if (defaultNavigation != null)
         {
View Full Code Here

   {
      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
View Full Code Here

      {
        
         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);
               perform = (Status.WANT_REIMPORT == status);
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.