Examples of writeDefinitions()


Examples of com.volantis.devrep.repository.accessors.EclipseDeviceRepository.writeDefinitions()

                policy.addContent(type);
                Element bool = new Element("boolean", root.getNamespace());
                type.addContent(bool);
                customCat.addContent(policy);

                accessor.writeDefinitions();
                accessor.saveRepositoryArchive();

                boolean savedNewDefinition = false;
                root = accessor.getDevicePolicyDefinitions().getRootElement();
                children = root.getChildren();
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter.writeDefinitions()

            }

            OutputStream out = customPrivilegesResource.getOutputStream();
            try {
                PrivilegeDefinitionWriter pdw = new PrivilegeDefinitionWriter("text/xml");
                pdw.writeDefinitions(out, jcrDefs.toArray(new PrivilegeDefinition[jcrDefs.size()]), nsMapping);
            } finally {
                out.close();
            }
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter.writeDefinitions()

            }

            OutputStream out = customPrivilegesResource.getOutputStream();
            try {
                PrivilegeDefinitionWriter pdw = new PrivilegeDefinitionWriter("text/xml");
                pdw.writeDefinitions(out, jcrDefs.toArray(new PrivilegeDefinition[jcrDefs.size()]), nsMapping);
            } finally {
                out.close();
            }
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter.writeDefinitions()

                nsMapping.put(nsResolver.getPrefix(n.getNamespaceURI()), n.getNamespaceURI());
            }

            StringWriter sw = new StringWriter();
            PrivilegeDefinitionWriter writer = new PrivilegeDefinitionWriter("text/xml");
            writer.writeDefinitions(sw, new PrivilegeDefinition[] {privilegeDefinition}, nsMapping);
            sw.close();

            writeString(sw.toString());

        } catch (IOException e) {
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter.writeDefinitions()

            }

            OutputStream out = customPrivilegesResource.getOutputStream();
            try {
                PrivilegeDefinitionWriter pdw = new PrivilegeDefinitionWriter("text/xml");
                pdw.writeDefinitions(out, jcrDefs.toArray(new PrivilegeDefinition[jcrDefs.size()]), nsMapping);
            } finally {
                out.close();
            }
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter.writeDefinitions()

            }

            OutputStream out = customPrivilegesResource.getOutputStream();
            try {
                PrivilegeDefinitionWriter pdw = new PrivilegeDefinitionWriter("text/xml");
                pdw.writeDefinitions(out, jcrDefs.toArray(new PrivilegeDefinition[jcrDefs.size()]), nsMapping);
            } finally {
                out.close();
            }
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter.writeDefinitions()

            defs.add(new PrivilegeDefinitionImpl(test4, true, Collections.singleton(test5)));
            defs.add(new PrivilegeDefinitionImpl(test5, false, Collections.singleton(test3)));
            defs.add(new PrivilegeDefinitionImpl(test3, false, Collections.singleton(test)));
            defs.add(new PrivilegeDefinitionImpl(test2, false, Collections.singleton(test4)));
            PrivilegeDefinitionWriter pdw = new PrivilegeDefinitionWriter("text/xml");
            pdw.writeDefinitions(out, defs.toArray(new PrivilegeDefinition[defs.size()]), Collections.<String, String>emptyMap());

            new PrivilegeRegistry(superuser.getWorkspace().getNamespaceRegistry(), fs);
            fail("Cyclic definitions must be detected upon registry startup.");
        } catch (RepositoryException e) {
            // success
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinitionWriter.writeDefinitions()

            // the equivalent definition to 'test'
            defs.add(new PrivilegeDefinitionImpl(test6, false, createNameSet(test2, test5)));

            PrivilegeDefinitionWriter pdw = new PrivilegeDefinitionWriter("text/xml");
            pdw.writeDefinitions(out, defs.toArray(new PrivilegeDefinition[defs.size()]), Collections.<String, String>emptyMap());

            new PrivilegeRegistry(superuser.getWorkspace().getNamespaceRegistry(), fs);
            fail("Equivalent definitions must be detected upon registry startup.");
        } catch (RepositoryException e) {
            // success
View Full Code Here

Examples of org.auraframework.service.ServerService.writeDefinitions()

        Set<DefDescriptor<?>> dependencies = context.getDefRegistry().getDependencies(uid);

        // prime def cache
        StringWriter output = new StringWriter();
        ss.writeDefinitions(dependencies, output);
        String text = output.toString();
        final String dupeCheck = "$A.clientService.initDefs(";
        if (text.indexOf(dupeCheck) != text.lastIndexOf(dupeCheck)) {
            fail("found duplicated code in: " + text);
        }
View Full Code Here

Examples of org.auraframework.service.ServerService.writeDefinitions()

            fail("found duplicated code in: " + text);
        }

        // now check that defs not re-written with unempty cache
        output = new StringWriter();
        ss.writeDefinitions(dependencies, output);
        text = output.toString();
        if (text.indexOf(dupeCheck) != text.lastIndexOf(dupeCheck)) {
            fail("found duplicated code in: " + text);
        }
    }
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.