Package org.exoplatform.services.ext.action

Examples of org.exoplatform.services.ext.action.InvocationContext


      random = new Random();
   }

   public void testDocImportUnExistingPropertyDefinition() throws Exception
   {
      InvocationContext context = new InvocationContext();
      try
      {

         context.put(ContentImporter.RESPECT_PROPERTY_DEFINITIONS_CONSTRAINTS, true);
         ((ExtendedSession)session)
            .importXML(root.getPath(), new ByteArrayInputStream(docView2.getBytes()), 0, context);
         session.save();
         fail();
      }
      catch (RepositoryException e)
      {
         // ok
      }
      try
      {
         context.put(ContentImporter.RESPECT_PROPERTY_DEFINITIONS_CONSTRAINTS, false);
         ((ExtendedSession)session)
            .importXML(root.getPath(), new ByteArrayInputStream(docView2.getBytes()), 0, context);
         session.save();
      }
      catch (RepositoryException e)
View Full Code Here


         conditions.put(SessionEventMatcher.EVENTTYPE_KEY, ExtendedEvent.ADD_MIXIN);
         conditions.put(SessionEventMatcher.PATH_KEY, node.getInternalPath());
         conditions.put(SessionEventMatcher.NODETYPES_KEY, new InternalQName[]
         {mixinType});

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, node);
         ctx.put(InvocationContext.EVENT, ExtendedEvent.ADD_MIXIN);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

         Condition conditions = new Condition();
         conditions.put(SessionEventMatcher.EVENTTYPE_KEY, ExtendedEvent.NODE_ADDED);
         conditions.put(SessionEventMatcher.PATH_KEY, node.getInternalPath());
         conditions.put(SessionEventMatcher.NODETYPES_KEY, readNodeTypeNames((NodeData) node.getData()));

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, node);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         ctx.put(InvocationContext.EVENT, ExtendedEvent.NODE_ADDED);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

         Condition conditions = new Condition();
         conditions.put(SessionEventMatcher.EVENTTYPE_KEY, ExtendedEvent.CHECKIN);
         conditions.put(SessionEventMatcher.PATH_KEY, node.getInternalPath());
         conditions.put(SessionEventMatcher.NODETYPES_KEY, readNodeTypeNames((NodeData) node.getData()));

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, node);
         ctx.put(InvocationContext.EVENT, ExtendedEvent.CHECKIN);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

         Condition conditions = new Condition();
         conditions.put(SessionEventMatcher.EVENTTYPE_KEY, ExtendedEvent.CHECKOUT);
         conditions.put(SessionEventMatcher.PATH_KEY, node.getInternalPath());
         conditions.put(SessionEventMatcher.NODETYPES_KEY, readNodeTypeNames((NodeData) node.getData()));

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, node);
         ctx.put(InvocationContext.EVENT, ExtendedEvent.CHECKOUT);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

         Condition conditions = new Condition();
         conditions.put(SessionEventMatcher.EVENTTYPE_KEY, ExtendedEvent.LOCK);
         conditions.put(SessionEventMatcher.PATH_KEY, node.getInternalPath());
         conditions.put(SessionEventMatcher.NODETYPES_KEY, readNodeTypeNames((NodeData) node.getData()));

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, node);
         ctx.put(InvocationContext.EVENT, ExtendedEvent.LOCK);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

         else
         {
            conditions.put(SessionEventMatcher.NODETYPES_KEY, readNodeTypeNames(item.parentData()));
         }

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, item);
         ctx.put(InvocationContext.EVENT, ExtendedEvent.READ);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

         Condition conditions = new Condition();
         conditions.put(SessionEventMatcher.EVENTTYPE_KEY, event);
         conditions.put(SessionEventMatcher.PATH_KEY, property.getInternalPath());
         conditions.put(SessionEventMatcher.NODETYPES_KEY, readNodeTypeNames(property.parentData()));

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, property);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         ctx.put(InvocationContext.EVENT, event);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

         Condition conditions = new Condition();
         conditions.put(SessionEventMatcher.EVENTTYPE_KEY, ExtendedEvent.UNLOCK);
         conditions.put(SessionEventMatcher.PATH_KEY, node.getInternalPath());
         conditions.put(SessionEventMatcher.NODETYPES_KEY, readNodeTypeNames((NodeData) node.getData()));

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, node);
         ctx.put(InvocationContext.EVENT, ExtendedEvent.UNLOCK);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

         else
         {
            conditions.put(SessionEventMatcher.NODETYPES_KEY, readNodeTypeNames(item.parentData()));
         }

         InvocationContext ctx = new InvocationContext();
         ctx.put(InvocationContext.CURRENT_ITEM, item);
         ctx.put(InvocationContext.EXO_CONTAINER, container);
         ctx.put(InvocationContext.EVENT, event);
         launch(conditions, ctx);
      }
      finally
      {
         activeItem = null;
View Full Code Here

TOP

Related Classes of org.exoplatform.services.ext.action.InvocationContext

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.