Package org.apache.jackrabbit.spi.commons.nodetype

Examples of org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefDiff$QNodeDefinitionId


            /**
             * build diff of current and new definition and determine type of change
             */
            QNodeTypeDefinition ntdOld = registeredNTDefs.get(name);
            NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntdOld, ntd);
            if (!diff.isModified()) {
                // the definition has not been modified, there's nothing to do here...
                return getEffectiveNodeType(name);
            }

            if (!diff.isTrivial()) {

                // TODO Implement checkForConflictingContent()
                // make sure existing content would not conflict
                // with new node type definition
                //checkForConflictingContent(ntd);
                //
                // unregister old node type definition
                //internalUnregister(name);
                // register new definition
                //EffectiveNodeType entNew = internalRegister(ntd);
                //
                // persist modified node type definitions
                //customNTDefs.remove(name);
                //customNTDefs.add(ntd);
                //persistCustomNodeTypeDefs(customNTDefs);
                //
                // notify listeners
                //notifyReRegistered(name);
                //return entNew;

                String message =
                    "The following node type change contains non-trivial changes."
                    + "Up until now only trivial changes are supported."
                    + " (see javadoc for "
                    + NodeTypeDefDiff.class.getName()
                    + "):\n" + diff.toString();
                throw new RepositoryException(message);
            }

            /**
             * the change is trivial and has no effect on current content
View Full Code Here


            /**
             * build diff of current and new definition and determine type of change
             */
            QNodeTypeDefinition ntdOld = registeredNTDefs.get(name);
            NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntdOld, ntd);
            if (!diff.isModified()) {
                // the definition has not been modified, there's nothing to do here...
                return getEffectiveNodeType(name);
            }

            if (!diff.isTrivial()) {

                // TODO Implement checkForConflictingContent()
                // make sure existing content would not conflict
                // with new node type definition
                //checkForConflictingContent(ntd);
                //
                // unregister old node type definition
                //internalUnregister(name);
                // register new definition
                //EffectiveNodeType entNew = internalRegister(ntd);
                //
                // persist modified node type definitions
                //customNTDefs.remove(name);
                //customNTDefs.add(ntd);
                //persistCustomNodeTypeDefs(customNTDefs);
                //
                // notify listeners
                //notifyReRegistered(name);
                //return entNew;

                String message =
                    "The following node type change contains non-trivial changes."
                    + "Up until now only trivial changes are supported."
                    + " (see javadoc for "
                    + NodeTypeDefDiff.class.getName()
                    + "):\n" + diff.toString();
                throw new RepositoryException(message);
            }

            /**
             * the change is trivial and has no effect on current content
View Full Code Here

            /**
             * build diff of current and new definition and determine type of change
             */
            QNodeTypeDefinition ntdOld = registeredNTDefs.get(name);
            NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntdOld, ntd);
            if (!diff.isModified()) {
                // the definition has not been modified, there's nothing to do here...
                return getEffectiveNodeType(name);
            }

            if (!diff.isTrivial()) {

                // TODO Implement checkForConflictingContent()
                // make sure existing content would not conflict
                // with new node type definition
                //checkForConflictingContent(ntd);
                //
                // unregister old node type definition
                //internalUnregister(name);
                // register new definition
                //EffectiveNodeType entNew = internalRegister(ntd);
                //
                // persist modified node type definitions
                //customNTDefs.remove(name);
                //customNTDefs.add(ntd);
                //persistCustomNodeTypeDefs(customNTDefs);
                //
                // notify listeners
                //notifyReRegistered(name);
                //return entNew;

                String message =
                    "The following node type change contains non-trivial changes."
                    + "Up until now only trivial changes are supported."
                    + " (see javadoc for "
                    + NodeTypeDefDiff.class.getName()
                    + "):\n" + diff.toString();
                throw new RepositoryException(message);
            }

            /**
             * the change is trivial and has no effect on current content
View Full Code Here

        } else {
            for(int k = 0; k < ntdList1.size(); k++) {
                QNodeTypeDefinition ntd1 = (QNodeTypeDefinition) ntdList1.get(k);
                QNodeTypeDefinition ntd2 = (QNodeTypeDefinition) ntdList2.get(k);

                NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntd1, ntd2);
                if (diff.isModified() && !diff.isTrivial()){
                    fail("Exported node type definition was not successfully read back in. "
                            + ntd2.getName() + "differs from original");
                }
            }
        }
View Full Code Here

        } else {
            for(int k = 0; k < ntdList1.size(); k++) {
                QNodeTypeDefinition ntd1 = ntdList1.get(k);
                QNodeTypeDefinition ntd2 = ntdList2.get(k);

                NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntd1, ntd2);
                if (diff.isModified() && !diff.isTrivial()){
                    fail("Exported node type definition was not successfully read back in. "
                            + ntd2.getName() + "differs from original");
                }
            }
        }
View Full Code Here

        } else {
            for(int k = 0; k < ntdList1.size(); k++) {
                QNodeTypeDefinition ntd1 = ntdList1.get(k);
                QNodeTypeDefinition ntd2 = ntdList2.get(k);

                NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntd1, ntd2);
                if (diff.isModified() && !diff.isTrivial()){
                    fail("Exported node type definition was not successfully read back in. "
                            + ntd2.getName() + "differs from original");
                }
            }
        }
View Full Code Here

            /**
             * build diff of current and new definition and determine type of change
             */
            QNodeTypeDefinition ntdOld = registeredNTDefs.get(name);
            NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntdOld, ntd);
            if (!diff.isModified()) {
                // the definition has not been modified, there's nothing to do here...
                return getEffectiveNodeType(name);
            }

            // make sure existing content would not conflict
View Full Code Here

            /**
             * build diff of current and new definition and determine type of change
             */
            QNodeTypeDefinition ntdOld = registeredNTDefs.get(name);
            NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntdOld, ntd);
            if (!diff.isModified()) {
                // the definition has not been modified, there's nothing to do here...
                return getEffectiveNodeType(name);
            }

            if (!diff.isTrivial()) {

                // TODO Implement checkForConflictingContent()
                // make sure existing content would not conflict
                // with new node type definition
                //checkForConflictingContent(ntd);
                //
                // unregister old node type definition
                //internalUnregister(name);
                // register new definition
                //EffectiveNodeType entNew = internalRegister(ntd);
                //
                // persist modified node type definitions
                //customNTDefs.remove(name);
                //customNTDefs.add(ntd);
                //persistCustomNodeTypeDefs(customNTDefs);
                //
                // notify listeners
                //notifyReRegistered(name);
                //return entNew;

                String message =
                    "The following node type change contains non-trivial changes."
                    + "Up until now only trivial changes are supported."
                    + " (see javadoc for "
                    + NodeTypeDefDiff.class.getName()
                    + "):\n" + diff.toString();
                throw new RepositoryException(message);
            }

            /**
             * the change is trivial and has no effect on current content
View Full Code Here

            /**
             * build diff of current and new definition and determine type of change
             */
            QNodeTypeDefinition ntdOld = registeredNTDefs.get(name);
            NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntdOld, ntd);
            if (!diff.isModified()) {
                // the definition has not been modified, there's nothing to do here...
                return getEffectiveNodeType(name);
            }

            // make sure existing content would not conflict
View Full Code Here

        } else {
            for(int k = 0; k < ntdList1.size(); k++) {
                QNodeTypeDefinition ntd1 = (QNodeTypeDefinition) ntdList1.get(k);
                QNodeTypeDefinition ntd2 = (QNodeTypeDefinition) ntdList2.get(k);

                NodeTypeDefDiff diff = NodeTypeDefDiff.create(ntd1, ntd2);
                if (diff.isModified() && !diff.isTrivial()){
                    fail("Exported node type definition was not successfully read back in. "
                            + ntd2.getName() + "differs from original");
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefDiff$QNodeDefinitionId

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.