
org.apache.jackrabbit.test.api.SessionUUIDTest Maven / Gradle / Ivy
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jackrabbit.test.api; import org.apache.jackrabbit.test.AbstractJCRTest; import org.apache.jackrabbit.test.NotExecutableException; import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.ReferentialIntegrityException; import javax.jcr.Session; import javax.jcr.InvalidItemStateException; /** *
* * This should generate a {@link javax.jcr.ReferentialIntegrityException} upon save. *SessionUUIDTest
contains all tests for the {@link javax.jcr.Session} * class that require a UUID (and therefore are optional). * * @test * @sources SessionUUIDTest.java * @executeClass org.apache.jackrabbit.test.api.SessionUUIDTest * @keywords uuid */ public class SessionUUIDTest extends AbstractJCRTest { /** * Tries to remove a node that is a reference target using {@link Session#save()}.
*
Procedure: **
- Creates two nodes with same session
*- One has a referencing property pointing to the other node
*- Target node gets removed.
Prerequisites: *
-
*
javax.jcr.tck.SessionUUIDTest.nodetype
must allow a property of type {@link javax.jcr.PropertyType#REFERENCE}
* javax.jcr.tck.SessionUUIDTest.propertyname1
name of the property of type {@link javax.jcr.PropertyType#REFERENCE}
* javax.jcr.tck.SessionUUIDTest.nodetype2
must have the mixin typemix:referenceable
assigned.
*
* Procedure: *
-
*
- Creates node 1 and node 2 with session 1 *
- Gets reference to node 1 using session 2 *
- Session 1 moves node 1 under node 2, saves changes *
- Session 2 modifes node 1, saves *
InvalidItemStateException
if 'move' is reported
* to the second session as a sequence of remove and add events.
* Prerequisites: *
-
*
javax.jcr.tck.SessionUUIDTest.nodetype2
must have the mixin typemix:referenceable
assigned.
* javax.jcr.tck.SessionUUIDTest.testSaveMovedRefNode.propertyname1
* name of a property that can be modified innodetype2
for testing
*
© 2015 - 2025 Weber Informatics LLC | Privacy Policy