Package org.apache.jackrabbit.test

Examples of org.apache.jackrabbit.test.NotExecutableException


     */
    private void checkMixReferenceable() throws RepositoryException, NotExecutableException {
        try {
            superuser.getWorkspace().getNodeTypeManager().getNodeType(mixReferenceable);
        } catch (NoSuchNodeTypeException e) {
            throw new NotExecutableException("Repository does not support mix:referenceable");
        }
    }
View Full Code Here


                    assertEquals("Multivalue property has values with different types.",
                            type, vals[i].getType());
                }
            }
        } else {
            throw new NotExecutableException();
        }
    }
View Full Code Here

                        "should throw a ValueFormatException.");
            } catch (ValueFormatException vfe) {
                // ok
            }
        } else {
            throw new NotExecutableException();
        }
    }
View Full Code Here

     */
    public void testGetValues() throws RepositoryException, NotExecutableException {
        Property singleProp = PropertyUtil.searchProp(session, testRootNode, PropertyType.STRING);

        if (singleProp == null) {
            throw new NotExecutableException("No single valued String property found.");
        }

        try {
            singleProp.getValues();
            fail("Property.getValues() called on a single property " +
View Full Code Here

    public void testGetValueCopyStoredValues()
        throws NotExecutableException, RepositoryException {

        Property prop = PropertyUtil.searchMultivalProp(testRootNode, PropertyType.STRING);
        if (prop == null) {
            throw new NotExecutableException("No testable property found.");
        }

        // acquire the values of the property and change the zeroth value
        Value[] values = prop.getValues();
        if (values.length == 0) {
            throw new NotExecutableException("No testable property found.");
        }
        values[0] = null;

        // re-acquire the values and check if nulled value still exists
        Value[] values2 = prop.getValues();
View Full Code Here

     * @throws NotExecutableException
     */
    public void testGetNode() throws RepositoryException, NotExecutableException {
        Property prop = PropertyUtil.searchMultivalProp(testRootNode);
        if (prop == null) {
            throw new NotExecutableException("Test Property.getNode is throwing a "
                    + "ValueFormaException not executable in case of a multivalued property.");
        }
        else {
            try {
                prop.getNode();
View Full Code Here

     */
    private void checkMixReferenceable() throws RepositoryException, NotExecutableException {
        try {
            superuser.getWorkspace().getNodeTypeManager().getNodeType(mixReferenceable);
        } catch (NoSuchNodeTypeException e) {
            throw new NotExecutableException("Repository does not support mix:referenceable");
        }
    }
View Full Code Here

        // impersonate to read-only user
        Session session;
        try {
            session = superuser.impersonate(helper.getReadOnlyCredentials());
        } catch (LoginException e) {
            throw new NotExecutableException("impersonate threw LoginException");
        }

        // get a path to test the permissions on
        String thePath = "";
        NodeIterator ni = session.getRootNode().getNodes();
View Full Code Here

        Node n2 = null;
        try {
            n1 = createReferenceable(nodeName1, testNodeType);
            n2 = createReferenceable(nodeName2, testNodeType);
        } catch (RepositoryException e) {
            throw new NotExecutableException("Repository does not support mix:referenceable");
        }
        testRootNode.save();
        EventResult listener = new EventResult(log);
        obsMgr.addEventListener(listener,
                Event.PROPERTY_ADDED,
View Full Code Here

     * and a {@link Event#NODE_ADDED} event.
     */
    public void testNodeReorder()
            throws RepositoryException, NotExecutableException {
        if (!testRootNode.getDefinition().getDeclaringNodeType().hasOrderableChildNodes()) {
            throw new NotExecutableException("Node at '" + testRoot + "' does not support orderable child nodes.");
        }

        /**
         * Initial tree:
         *  + testroot
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.test.NotExecutableException

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.