Package org.exoplatform.services.jcr.impl.ext.action

Examples of org.exoplatform.services.jcr.impl.ext.action.SessionEventMatcher


      SessionActionCatalog catalog =
         (SessionActionCatalog)container.getComponentInstanceOfType(SessionActionCatalog.class);
      catalog.clear();

      // test by path
      SessionEventMatcher matcher =
         new SessionEventMatcher(ExtendedEvent.ADD_MIXIN, null, true, null, new InternalQName[]{
            Constants.MIX_REFERENCEABLE, Constants.EXO_OWNEABLE}, ntHolder);
      DummyAction dAction = new DummyAction();
      catalog.addAction(matcher, dAction);

      assertEquals(0, dAction.getActionExecuterCount());
View Full Code Here


      SessionActionCatalog catalog =
         (SessionActionCatalog)container.getComponentInstanceOfType(SessionActionCatalog.class);
      catalog.clear();

      // test by path
      SessionEventMatcher matcher =
         new SessionEventMatcher(ExtendedEvent.REMOVE_MIXIN, null, true, null,
            new InternalQName[]{Constants.EXO_OWNEABLE}, ntHolder);
      DummyAction dAction = new DummyAction();
      catalog.addAction(matcher, dAction);

      assertEquals(0, dAction.getActionExecuterCount());
View Full Code Here

      {
         Node node = prepareNode(root, "firsPath", "nt:folder", null);
         Node node2 = prepareNode(root, "firsPath", null, null);
         DummyAction daction = new DummyAction();
         // test by path
         SessionEventMatcher matcher =
            prepareActionCatalog(daction, actionInfo.getEventType(), null, true, new InternalQName[]{session
               .getLocationFactory().parseJCRName("nt:folder").getInternalName()}, null, null);

         assertEquals(0, daction.getActionExecuterCount());
         Context ctx = new ContextBase();
View Full Code Here

      {
         Node n1 = root.addNode("n1");
         Node node = prepareNode(root, "firsPath", "nt:folder", "nt:folder");
         DummyAction daction = new DummyAction();
         // test by path
         SessionEventMatcher matcher =
            prepareActionCatalog(daction, actionInfo.getEventType(), null, true, null, new InternalQName[]{session
               .getLocationFactory().parseJCRName("nt:folder").getInternalName()},

            null);
View Full Code Here

   {

      catalog.clear();

      // test by path
      SessionEventMatcher matcher = new SessionEventMatcher(event, paths, isDeep, workspaces, null, ntHolder);

      catalog.addAction(matcher, action);
      return matcher;
   }
View Full Code Here

   {
      NodeImpl node = (NodeImpl)root.addNode("test");
      NodeImpl node1 = (NodeImpl)root.addNode("test1");
      QPath[] paths = new QPath[]{node.getInternalPath(), node1.getInternalPath()};

      SessionEventMatcher matcher =
         new SessionEventMatcher(Event.NODE_ADDED, paths, true, null, new InternalQName[]{Constants.NT_BASE,
            Constants.NT_UNSTRUCTURED, Constants.NT_QUERY}, ntHolder);
   }
View Full Code Here

      SessionActionCatalog catalog =
         (SessionActionCatalog)container.getComponentInstanceOfType(SessionActionCatalog.class);
      catalog.clear();

      // test by path
      SessionEventMatcher matcher =
         new SessionEventMatcher(ExtendedEvent.LOCK, null, true, null, new InternalQName[]{Constants.NT_UNSTRUCTURED},
            ntHolder);
      DummyAction dAction = new DummyAction();
      catalog.addAction(matcher, dAction);

      assertEquals(0, dAction.getActionExecuterCount());
View Full Code Here

         (SessionActionCatalog)container.getComponentInstanceOfType(SessionActionCatalog.class);
      catalog.clear();
      NodeImpl node = (NodeImpl)root.addNode("test");

      // test by path
      SessionEventMatcher matcher =
         new SessionEventMatcher(Event.NODE_ADDED, new QPath[]{node.getInternalPath()}, true, null, null, ntHolder);
      catalog.addAction(matcher, new DummyAction());
      Condition cond = new Condition();

      cond = new Condition();
      cond.put(SessionEventMatcher.EVENTTYPE_KEY, Event.NODE_ADDED);
View Full Code Here

      // cond.put(SessionEventMatcher.PATH_KEY, node.getInternalPath());
      // cond.put(SessionEventMatcher.NODETYPE_KEY,
      // ((NodeTypeImpl)node.getPrimaryNodeType()).getQName());

      // test by event type
      SessionEventMatcher matcher = new SessionEventMatcher(Event.NODE_ADDED, null, true, null, null, ntHolder);
      catalog.addAction(matcher, new DummyAction());
      Condition cond = new Condition();
      cond.put(SessionEventMatcher.EVENTTYPE_KEY, Event.NODE_ADDED);
      assertEquals(1, catalog.getActions(cond).size());
      cond.put(SessionEventMatcher.EVENTTYPE_KEY, ExtendedEvent.ADD_MIXIN);
View Full Code Here

      SessionActionCatalog catalog =
         (SessionActionCatalog)container.getComponentInstanceOfType(SessionActionCatalog.class);
      catalog.clear();

      // test by path
      SessionEventMatcher matcher =
         new SessionEventMatcher(ExtendedEvent.ADD_MIXIN, null, true, null,
            new InternalQName[]{Constants.MIX_LOCKABLE}, ntHolder);
      catalog.addAction(matcher, new DummyAction());
      Condition cond = new Condition();
      cond.put(SessionEventMatcher.EVENTTYPE_KEY, ExtendedEvent.ADD_MIXIN);
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.ext.action.SessionEventMatcher

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.