Examples of addMixin()


Examples of javax.jcr.Node.addMixin()

        Node root = session.getRootNode();
        Node other = root.addNode("other");
        other.addMixin("mix:referenceable");
        Node src = root.addNode("src");
        Node test = src.addNode("test");
        test.addMixin("mix:referenceable");
        src.setProperty("test", test);
        src.setProperty("other", other);
        src.setProperty("multi", new Value[]{vf.createValue(test), vf.createValue(other)});
        session.save();
        session.getWorkspace().copy("/src", "/dest");
View Full Code Here

Examples of org.apache.jackrabbit.core.NodeImpl.addMixin()

     * @throws Exception
     */
    public void testImportACLOnly() throws Exception {
        try {
            NodeImpl target = (NodeImpl) testRootNode.addNode(nodeName1);
            target.addMixin("rep:AccessControllable");

            InputStream in = new ByteArrayInputStream(XML_POLICY_TREE_3.getBytes("UTF-8"));
            SessionImporter importer = new SessionImporter(target, sImpl,
                    ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW, new PseudoConfig());
            ImportHandler ih = new ImportHandler(importer, sImpl);
View Full Code Here

Examples of org.apache.tapestry.model.MutableEmbeddedComponentModel.addMixin()

                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        fred.addMixin("zip.zop.Zoom");
        fred.addMixin("foo.bar.Baz");

        assertEquals(fred.getMixinClassNames(), Arrays.asList("zip.zop.Zoom", "foo.bar.Baz"));

        verify();
View Full Code Here

Examples of org.apache.tapestry5.model.MutableEmbeddedComponentModel.addMixin()

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent("fred", "Fred", COMPONENT_CLASS_NAME, false,
                null);

        fred.addMixin("zip.zop.Zoom");
        fred.addMixin("foo.bar.Baz");

        assertEquals(fred.getMixinClassNames(), Arrays.asList("zip.zop.Zoom", "foo.bar.Baz"));

        verify();
View Full Code Here

Examples of org.brixcms.jcr.api.JcrNode.addMixin()

            root = (JcrNode) session.getItem(getRootPath());
        } else {
            root = session.getRootNode().addNode(ROOT_NODE_NAME, "nt:folder");
        }
        if (!root.isNodeType(BrixNode.JCR_TYPE_BRIX_NODE)) {
            root.addMixin(BrixNode.JCR_TYPE_BRIX_NODE);
        }

        for (Plugin p : getPlugins()) {
            p.initWorkspace(workspace, session);
        }
View Full Code Here

Examples of org.exoplatform.services.jcr.core.ExtendedNode.addMixin()

    *  Unit test for https://jira.exoplatform.org/browse/JCR-1832
    */
   public void testGetFileFromFolder() throws Exception
   {
      ExtendedNode folderA = (ExtendedNode)session.getRootNode().addNode("folderA", "nt:folder");
      folderA.addMixin("exo:privilegeable");
      folderA.setPermission("john", PermissionType.ALL);
      folderA.removePermission(IdentityConstants.ANY);
      session.save();
     
      assertEquals(4, folderA.getACL().getPermissionEntries().size());
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.NodeImpl.addMixin()

            return false;
         }

         if (!parent.isNodeType("dc:elementSet"))
         {
            parent.addMixin("dc:elementSet");
         }

         DocumentReaderService readerService =
            (DocumentReaderService)((ExoContainer)ctx.get("exocontainer"))
               .getComponentInstanceOfType(DocumentReaderService.class);
View Full Code Here

Examples of org.jahia.services.content.JCRNodeWrapper.addMixin()

        }

        if (parameters.containsKey(Constants.JCR_MIXINTYPES)) {
            for (Object o : ((ArrayList) parameters.get(Constants.JCR_MIXINTYPES))) {
                String mixin = (String) o;
                newNode.addMixin(mixin);
            }
        }
        Set<Map.Entry<String, List<String>>> set = parameters.entrySet();
        for (Map.Entry<String, List<String>> entry : set) {
            String key = entry.getKey();
View Full Code Here

Examples of org.jboss.aop.AspectAnnotationLoaderStrategy.InterfaceIntroductionInfo.addMixin()

         }
        
         //Parse the descriptor to get the returntype of the method.
         String classname = getReturnType(minfo);
        
         intro.addMixin(new InterfaceIntroductionMixinInfo(classname, interfaces, construction, isTransient));

         loaderStrategy.deployInterfaceIntroduction(this, intro);
      }
   }
View Full Code Here

Examples of org.jboss.aop.introduction.InterfaceIntroduction.addMixin()

               throw new IllegalArgumentException("MixinEntry with null interfaces");
            if (entry.getMixin() == null)
               throw new IllegalArgumentException("MixinEntry with null mixin");
            String[] intfaces = entry.getInterfaces().toArray(new String[entry.getInterfaces().size()]);
           
            introduction.addMixin(new InterfaceIntroduction.Mixin(entry.getMixin(), intfaces, entry.getConstruction(), entry.isTransient()));
         }
      }     
      manager.addInterfaceIntroduction(introduction);
   }
  
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.