Package org.exoplatform.services.jcr.impl.core

Examples of org.exoplatform.services.jcr.impl.core.NodeImpl


   public boolean execute(Context ctx) throws Exception
   {

      PropertyImpl property = (PropertyImpl)ctx.get("currentItem");
      NodeImpl parent = (NodeImpl)property.getParent();
      if (!parent.isNodeType("nt:resource"))
      {
         throw new Exception("incoming node is not nt:resource type");
      }

      InputStream data = null;
      String mimeType;

      try
      {
         if (property.getInternalName().equals(Constants.JCR_DATA))
         {
            data = ((PropertyData)property.getData()).getValues().get(0).getAsStream();
            try
            {
               mimeType = parent.getProperty("jcr:mimeType").getString();
            }
            catch (PathNotFoundException e)
            {
               return false;
            }
         }
         else if (property.getInternalName().equals(Constants.JCR_MIMETYPE))
         {
            mimeType = property.getString();
            try
            {
               PropertyImpl propertyImpl = (PropertyImpl)parent.getProperty("jcr:data");
               data = ((PropertyData)propertyImpl.getData()).getValues().get(0).getAsStream();
            }
            catch (PathNotFoundException e)
            {
               return false;
            }
         }
         else
         {
            return false;
         }

         // remove old "dc:elementSet" properties
         if (parent.isNodeType("dc:elementSet"))
         {
            parent.removeMixin("dc:elementSet");
         }

         parent.addMixin("dc:elementSet");

         DocumentReaderService readerService =
            (DocumentReaderService)((ExoContainer)ctx.get("exocontainer"))
               .getComponentInstanceOfType(DocumentReaderService.class);
         if (readerService == null)
            throw new NullPointerException("No DocumentReaderService configured for current container");

         Properties props = new Properties();
         try
         {
            props = readerService.getDocumentReader(mimeType).getProperties(data);
         }
         catch (HandlerNotFoundException e)
         {
            log.debug(e.getMessage());
         }

         Iterator entries = props.entrySet().iterator();
         while (entries.hasNext())
         {
            Entry entry = (Entry)entries.next();
            QName qname = (QName)entry.getKey();
            JCRName jcrName =
               property.getSession().getLocationFactory().createJCRName(
                  new InternalQName(qname.getNamespace(), qname.getName()));

            PropertyDefinitionDatas pds =
               parent.getSession().getWorkspace().getNodeTypesHolder().getPropertyDefinitions(
                  jcrName.getInternalName(), ((NodeData)parent.getData()).getPrimaryTypeName(),
                  ((NodeData)parent.getData()).getMixinTypeNames());
            if (pds.getDefinition(true) != null)
            {
               Value[] values = {createValue(entry.getValue(), property.getSession().getValueFactory())};
               parent.setProperty(jcrName.getAsString(), values);
            }
            else
            {
               parent.setProperty(jcrName.getAsString(), createValue(entry.getValue(), property.getSession()
                  .getValueFactory()));
            }
         }

         return false;
View Full Code Here


         throw new PathNotFoundException("Audit history not found for " + node.getPath());
   }

   private void checkIfAuditable(Item item) throws RepositoryException, UnsupportedOperationException
   {
      NodeImpl node = (item.isNode()) ? (NodeImpl)item : (NodeImpl)item.getParent();
      if (!node.isNodeType("exo:auditable"))
         throw new ConstraintViolationException("exo:auditable node expected at: " + node.getPath());
   }
View Full Code Here

   private static final Log log = ExoLogger.getLogger("exo.jcr.component.ext.DynamicTest");
  
   public void testDynamicSession() throws Exception
   {
      // Mary only node, Mary membership is '*:/platform/users', seems it's user
      NodeImpl maryNode = (NodeImpl) testRoot.addNode("mary_dynamic");
      maryNode.addMixin("exo:privilegeable");
      if (!session.getUserID().equals("mary"))
      {
         maryNode.setPermission("*:/platform/users", new String[] {PermissionType.READ});
         maryNode.setPermission("mary", PermissionType.ALL);
         maryNode.removePermission(session.getUserID());
      }
      maryNode.removePermission(SystemIdentity.ANY);
      testRoot.save();

      Session marySession =
                  repository.login(new CredentialsImpl("mary", "exo".toCharArray()), session.getWorkspace().getName());
      NodeImpl myNode = (NodeImpl) marySession.getItem(maryNode.getPath());
      NodeImpl test = (NodeImpl) myNode.addNode("test");
      test.setProperty("property", "any data");
      myNode.save();
      marySession.logout();

      //Dynamic session fail read
      List<AccessControlEntry> accessControlEntries = new ArrayList<AccessControlEntry>();
      accessControlEntries.add(new AccessControlEntry("*:/platform/administrators", "READ"));
      SessionProvider dynamicProvider = SessionProvider.createProvider(accessControlEntries);

      Session dynamicSession = null;
      try
      {
         dynamicSession = dynamicProvider.getSession(session.getWorkspace().getName(), repository);
         NodeImpl maryNodeDynamic = (NodeImpl) dynamicSession.getItem(maryNode.getPath());
         fail("Dynamic session with membership '*:/platform/users' should not read node with membership '*:/platform/users'");
      }
      catch (AccessDeniedException e)
      {
         //ok
      }

      //Dynamic session successful read
      accessControlEntries = new ArrayList<AccessControlEntry>();
      accessControlEntries.add(new AccessControlEntry("*:/platform/users", "READ"));
      dynamicProvider = SessionProvider.createProvider(accessControlEntries);

      //check get
      try
      {
         dynamicSession = dynamicProvider.getSession(session.getWorkspace().getName(), repository);
         NodeImpl maryNodeDynamic = (NodeImpl) dynamicSession.getItem(maryNode.getPath());
         //ok
      }
      catch (AccessDeniedException e)
      {

         e.printStackTrace();
         fail("Dynamic session with membership '*:/platform/users' should read node with membership '*:/platform/users'. Exception message :"
                  + e.getMessage());
      }

      //check add
      try
      {
         dynamicSession = dynamicProvider.getSession(session.getWorkspace().getName(), repository);
         NodeImpl maryNodeDynamic = (NodeImpl) dynamicSession.getItem(maryNode.getPath());

         maryNodeDynamic.addNode("test2");
         maryNodeDynamic.save();
         fail("Dynamic session with membership '*:/platform/users' should be not add child node with membership '*:/platform/users READ'");
      }
      catch (AccessDeniedException e)
      {
         //ok
      }

      //check remove
      try
      {
         dynamicSession = dynamicProvider.getSession(session.getWorkspace().getName(), repository);
         NodeImpl maryNodeDynamic = (NodeImpl) dynamicSession.getItem(maryNode.getPath());

         maryNodeDynamic.getNode("test").remove();
         maryNodeDynamic.save();
         fail("Dynamic session with membership '*:/platform/users' should be not remove child node with membership '*:/platform/users READ'");
      }
      catch (AccessDeniedException e)
      {
         //ok
View Full Code Here

   }

   public void testCreateSystemSessionProviderAfterDynamic() throws Exception
   {
      // System only node.
      NodeImpl systemNode = (NodeImpl) testRoot.addNode("system_dynamic");
      systemNode.addMixin("exo:privilegeable");

      systemNode.setPermission("*:/platform/users", new String[]
      {PermissionType.READ});
      systemNode.removePermission(session.getUserID());
      testRoot.save();


      //Dynamic session successful read
      List<AccessControlEntry> accessControlEntries = new ArrayList<AccessControlEntry>();
      accessControlEntries.add(new AccessControlEntry("*:/platform/users", "READ"));
      SessionProvider dynamicProvider  = SessionProvider.createProvider(accessControlEntries);

      Session dynamicSession = null;

      //check get
      try
      {
         dynamicSession = dynamicProvider.getSession(session.getWorkspace().getName(), repository);
         NodeImpl maryNodeDynamic = (NodeImpl) dynamicSession.getItem(systemNode.getPath());
         //ok
      }
      catch (AccessDeniedException e)
      {
         e.printStackTrace();
         fail("Dynamic session with membership '*:/platform/users' should read node with membership '*:/platform/users'. Exception message : "
                  + e.getMessage());
      }

      //System provider successful read
      SessionProvider systemProvider = SessionProvider.createSystemProvider();
      Session systemSession = null;
      try
      {
         systemSession = systemProvider.getSession(session.getWorkspace().getName(), repository);
         NodeImpl systemNodeOverSystemSession = (NodeImpl) systemSession.getItem(systemNode.getPath());
         //ok        
      }
      catch (AccessDeniedException e)
      {
         e.printStackTrace();
         fail("System session should read node with membership '*:/platform/users'. Exception message : "
                  + e.getMessage());
      }

      //check remove
      try
      {
         systemSession = systemProvider.getSession(session.getWorkspace().getName(), repository);
         NodeImpl systemNodeOverSystemSession = (NodeImpl) systemSession.getItem(systemNode.getPath());

         systemNodeOverSystemSession.remove();
         systemSession.save();
         //ok
      }
      catch (AccessDeniedException e)
      {
View Full Code Here

    */
   public void testSetACLForTwoUsersOnNonPrivilegeableResource() throws Exception
   {
     

      NodeImpl testNode = (NodeImpl)root.addNode(TEST_NODE_NAME, "nt:folder");
      session.save();

      MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
      headers.putSingle("Depth", "0");
      headers.putSingle(HttpHeaders.CONTENT_TYPE, "text/xml; charset=\"utf-8\"");
      EnvironmentContext ctx = new EnvironmentContext();

      Set<String> adminRoles = new HashSet<String>();
      adminRoles.add("administrators");

      DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()
      {
         public String getName()
         {
            return USER_ROOT;
         }
      }, adminRoles);

      ctx.put(SecurityContext.class, adminSecurityContext);

      RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      ResourceLauncher launcher = new ResourceLauncher(handler);

      String request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:principal>"
            + "<D:href>" + USER_ONE + "</D:href>" + "</D:principal>" + "<D:grant>"
            + "<D:privilege><D:write/></D:privilege>" + "</D:grant>" + "</D:ace>" + "<D:ace>" + "<D:principal>"
            + "<D:href>" + USER_TWO + "</D:href>" + "</D:principal>" + "<D:grant>" + "<D:write/>" + "</D:grant>"
            + "</D:ace>" + "</D:acl>";

      ContainerResponse response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI, headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.OK, response.getStatus());

      session.refresh(false);
      testNode = (NodeImpl)root.getNode(TEST_NODE_NAME);
      testNode.setPermission(USER_ROOT, new String[]{"read", "add_node", "set_property", "remove"});
      testNode.removePermission(IdentityConstants.ANY);
      session.save();

      checkPermissionSet(testNode, USER_ONE, PermissionType.ADD_NODE);
      checkPermissionSet(testNode, USER_ONE, PermissionType.SET_PROPERTY);
      checkPermissionSet(testNode, USER_ONE, PermissionType.REMOVE);

      checkPermissionSet(testNode, USER_TWO, PermissionType.ADD_NODE);
      checkPermissionSet(testNode, USER_TWO, PermissionType.SET_PROPERTY);
      checkPermissionSet(testNode, USER_TWO, PermissionType.REMOVE);

      testNode.remove();
      session.save();
   }
View Full Code Here

    * @throws Exception
    */
   public void testDenyPermissionOnPrivilegeableResource() throws Exception
   {

      NodeImpl testNode = (NodeImpl)root.addNode(TEST_NODE_NAME, "nt:folder");
      testNode.addMixin("mix:versionable");
      testNode.addMixin("exo:privilegeable");
      testNode.setPermission(USER_ROOT, new String[]{"read", "add_node", "set_property", "remove"});
      testNode.setPermission(USER_ONE, new String[]{"add_node", "set_property", "remove"});
      testNode.removePermission(IdentityConstants.ANY);
      session.save();

      MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
      headers.putSingle("Depth", "0");
      headers.putSingle(HttpHeaders.CONTENT_TYPE, "text/xml; charset=\"utf-8\"");
      EnvironmentContext ctx = new EnvironmentContext();

      Set<String> adminRoles = new HashSet<String>();
      adminRoles.add("administrators");

      DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()
      {
         public String getName()
         {
            return USER_ROOT;
         }
      }, adminRoles);

      ctx.put(SecurityContext.class, adminSecurityContext);

      RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      ResourceLauncher launcher = new ResourceLauncher(handler);

      String request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:principal>"
            + "<D:href>" + USER_ONE + "</D:href>" + "</D:principal>" + "<D:deny>" + "<D:privilege><D:write/></D:privilege>"
            + "</D:deny>" + "</D:ace>" + "</D:acl>";

      ContainerResponse response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI, headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.OK, response.getStatus());

      session.refresh(false);
      testNode = (NodeImpl)root.getNode(TEST_NODE_NAME);

      checkPermissionRemoved(testNode, USER_ONE, PermissionType.ADD_NODE);
      checkPermissionRemoved(testNode, USER_ONE, PermissionType.SET_PROPERTY);
      checkPermissionRemoved(testNode, USER_ONE, PermissionType.REMOVE);

      testNode.remove();
      session.save();
   }
View Full Code Here

    * @throws Exception
    */
   public void testDenyAndGrantInASingleACE() throws Exception
   {

      NodeImpl testNode = (NodeImpl)root.addNode(TEST_NODE_NAME, "nt:folder");
      testNode.addMixin("mix:versionable");
      testNode.addMixin("exo:privilegeable");
      testNode.setPermission(USER_ROOT, new String[]{"read", "add_node", "set_property", "remove"});
      testNode.removePermission(IdentityConstants.ANY);
      session.save();

      MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
      headers.putSingle("Depth", "0");
      headers.putSingle(HttpHeaders.CONTENT_TYPE, "text/xml; charset=\"utf-8\"");
      EnvironmentContext ctx = new EnvironmentContext();

      Set<String> adminRoles = new HashSet<String>();
      adminRoles.add("administrators");

      DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()
      {
         public String getName()
         {
            return USER_ROOT;
         }
      }, adminRoles);

      ctx.put(SecurityContext.class, adminSecurityContext);

      RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      ResourceLauncher launcher = new ResourceLauncher(handler);

      String request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:principal>"
            + "<D:href>" + USER_ONE + "</D:href>" + "</D:principal>" + "<D:deny>"
            + "<D:privilege><D:write/></D:privilege>" + "</D:deny>" + "<D:grant>"
            + "<D:privilege><D:write/></D:privilege>" + "</D:grant>" + "</D:ace>" + "</D:acl>";

      ContainerResponse response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI, headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.BAD_REQUEST, response.getStatus());

      testNode.remove();
      session.save();
   }
View Full Code Here

    * them to appear after receiving a response.
    * @throws Exception
    */
   public void testSetAllPermissionsForAllUsersOnPrivilegeableResource() throws Exception
   {
      NodeImpl testNode = (NodeImpl)root.addNode(TEST_NODE_NAME, "nt:folder");
      testNode.addMixin("exo:owneable");
      testNode.addMixin("exo:privilegeable");
      session.save();

      Map<String, String[]> defaultPermissions = new HashMap<String, String[]>();
      String[] initPermissions =
         new String[]{PermissionType.ADD_NODE, PermissionType.READ, PermissionType.SET_PROPERTY};
      defaultPermissions.put(USER_TWO, initPermissions);
      testNode.setPermissions(defaultPermissions);
      session.save();

      System.out.println("Node before: " + testNode);

      MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
      headers.putSingle("Depth", "0");
      headers.putSingle(HttpHeaders.CONTENT_TYPE, "text/xml; charset=\"utf-8\"");
      EnvironmentContext ctx = new EnvironmentContext();

      Set<String> adminRoles = new HashSet<String>();
      adminRoles.add("administrators");

      DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()
      {
         public String getName()
         {
            return USER_ROOT;
         }
      }, adminRoles);

      ctx.put(SecurityContext.class, adminSecurityContext);

      RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      ResourceLauncher launcher = new ResourceLauncher(handler);

      String request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:principal>"
            + "<D:all />" + "</D:principal>" + "<D:grant>" + "<D:privilege><D:all/></D:privilege>" + "</D:grant>"
            + "</D:ace>" + "</D:acl>";

      ContainerResponse response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI,
            headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.OK, response.getStatus());

      session.refresh(false);
      testNode = (NodeImpl)root.getNode(TEST_NODE_NAME);

      System.out.println("Node after: " + testNode);

      checkPermissionSet(testNode, IdentityConstants.ANY, PermissionType.ADD_NODE);
      checkPermissionSet(testNode, IdentityConstants.ANY, PermissionType.SET_PROPERTY);
      checkPermissionSet(testNode, IdentityConstants.ANY, PermissionType.REMOVE);
      checkPermissionSet(testNode, IdentityConstants.ANY, PermissionType.READ);

      testNode.remove();
      session.save();
   }
View Full Code Here

    * in ACL request body.
    * @throws Exception
    */
   public void testWrongGrantElementAceElementInAclBody() throws Exception
   {
      NodeImpl testNode = (NodeImpl)root.addNode(TEST_NODE_NAME, "nt:folder");
      testNode.addMixin("exo:owneable");
      testNode.addMixin("exo:privilegeable");
      testNode.setPermission(USER_ROOT, new String[]{"read", "add_node", "set_property", "remove"});
      testNode.removePermission(IdentityConstants.ANY);
      session.save();

      MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
      headers.putSingle("Depth", "0");
      headers.putSingle(HttpHeaders.CONTENT_TYPE, "text/xml; charset=\"utf-8\"");

      EnvironmentContext ctx = new EnvironmentContext();

      Set<String> adminRoles = new HashSet<String>();
      adminRoles.add("administrators");

      DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()
      {
         public String getName()
         {
            return USER_ROOT;
         }
      }, adminRoles);

      ctx.put(SecurityContext.class, adminSecurityContext);

      RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      ResourceLauncher launcher = new ResourceLauncher(handler);

      String request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:principal>"
            + "<D:all />" + "</D:principal>" + "<D:grant>" + "<D:privilege><D:read /><D:write /></D:privilege>"
            + "</D:grant>" + "</D:ace>" + "</D:acl>";

      ContainerResponse response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI, headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.BAD_REQUEST, response.getStatus());

      request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:principal>"
            + "<D:all />" + "</D:principal>" + "<D:grant></D:grant>" + "</D:ace>" + "</D:acl>";

      response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI, headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.BAD_REQUEST, response.getStatus());

      request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:principal>"
            + "<D:all />" + "</D:principal>" + "<D:grant><D:privilege></D:privilege></D:grant>" + "</D:ace>"
            + "</D:acl>";

      response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI, headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.BAD_REQUEST, response.getStatus());

      testNode.remove();
      session.save();
   }
View Full Code Here

    * in ACL request body.
    * @throws Exception
    */
   public void testWrongAceElementInAclBody() throws Exception
   {
      NodeImpl testNode = (NodeImpl)root.addNode(TEST_NODE_NAME, "nt:folder");
      session.save();
      testNode.addMixin("exo:owneable");
      testNode.addMixin("exo:privilegeable");
      session.save();


      MultivaluedMap<String, String> headers = new MultivaluedMapImpl();
      headers.putSingle("Depth", "0");
      headers.putSingle(HttpHeaders.CONTENT_TYPE, "text/xml; charset=\"utf-8\"");

      EnvironmentContext ctx = new EnvironmentContext();

      Set<String> adminRoles = new HashSet<String>();
      adminRoles.add("administrators");

      DummySecurityContext adminSecurityContext = new DummySecurityContext(new Principal()
      {
         public String getName()
         {
            return USER_ROOT;
         }
      }, adminRoles);

      ctx.put(SecurityContext.class, adminSecurityContext);

      RequestHandlerImpl handler = (RequestHandlerImpl)container.getComponentInstanceOfType(RequestHandlerImpl.class);
      ResourceLauncher launcher = new ResourceLauncher(handler);

      String request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "</D:ace>" + "</D:acl>";

      ContainerResponse response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI,
            headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.BAD_REQUEST, response.getStatus());
     
      request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:grant>" + "<D:privilege><D:read /><D:write /></D:privilege>"
            + "</D:grant>" + "</D:ace>" + "</D:acl>";
     
      response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI,
            headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.BAD_REQUEST, response.getStatus());
     
      request =
         "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<D:acl xmlns:D=\"DAV:\">" + "<D:ace>" + "<D:principal>"
         + "<D:all />" + "</D:principal>" + "</D:ace>" + "</D:acl>";
     
      response =
         launcher.service(WebDavConstants.WebDAVMethods.ACL, getPathWS() + testNode.getPath(), BASE_URI,
            headers,
            request.getBytes(), null, ctx);

      assertEquals(HTTPStatus.BAD_REQUEST, response.getStatus());

      testNode.remove();
      session.save();
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.core.NodeImpl

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.