Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.NameFactory


            idFactory = (IdFactory) param;
        } else {
            idFactory = IdFactoryImpl.getInstance();
        }

        NameFactory nameFactory;
        param = parameters.get(PARAM_NAME_FACTORY);
        if (param != null && param instanceof NameFactory) {
            nameFactory = (NameFactory) param;
        } else {
            nameFactory = NameFactoryImpl.getInstance();
View Full Code Here


                if (propertyDef.getRequiredType() == PropertyType.REFERENCE
                        || propertyDef.getRequiredType() == PropertyType.WEAKREFERENCE) {
                    QValueConstraint[] ca = propertyDef.getValueConstraints();
                    if (ca != null) {
                        for (QValueConstraint aCa : ca) {
                            NameFactory factory = NameFactoryImpl.getInstance();
                            Name ntName = factory.create(aCa.getString());
                            if (!name.equals(ntName)) {
                                deps.add(ntName);
                            }
                        }
                    }
View Full Code Here

                if (propertyDef.getRequiredType() == PropertyType.REFERENCE
                        || propertyDef.getRequiredType() == PropertyType.WEAKREFERENCE) {
                    QValueConstraint[] ca = propertyDef.getValueConstraints();
                    if (ca != null) {
                        for (QValueConstraint aCa : ca) {
                            NameFactory factory = NameFactoryImpl.getInstance();
                            Name ntName = factory.create(aCa.getString());
                            if (!name.equals(ntName)) {
                                deps.add(ntName);
                            }
                        }
                    }
View Full Code Here

                if (propertyDef.getRequiredType() == PropertyType.REFERENCE
                        || propertyDef.getRequiredType() == PropertyType.WEAKREFERENCE) {
                    QValueConstraint[] ca = propertyDef.getValueConstraints();
                    if (ca != null) {
                        for (QValueConstraint aCa : ca) {
                            NameFactory factory = NameFactoryImpl.getInstance();
                            Name ntName = factory.create(aCa.getString());
                            if (!name.equals(ntName)) {
                                deps.add(ntName);
                            }
                        }
                    }
View Full Code Here

            // a future attempt to put the node under version control again
            // (see JCR-3115)
           
            log.info("trying to rename version history of node " + node.getId());

            NameFactory nf = NameFactoryImpl.getInstance();
           
            // Name of VHR in parent folder is ID of versionable node
            Name vhrname = nf.create(Name.NS_DEFAULT_URI, node.getId().toString());

            try {
                NodeState vhrState = versionManager.getPersistenceManager().load(vhid);
                NodeState vhrParentState = versionManager.getPersistenceManager().load(vhrState.getParentId());
               
                if (vhrParentState.hasChildNodeEntry(vhrname)) {
                    NodeState modifiedParent = (NodeState) vworkspaceChanges.get(vhrState.getParentId());
                    if (modifiedParent == null) {
                        modifiedParent = new NodeState(vhrParentState, NodeState.STATUS_EXISTING_MODIFIED, true);
                    }
                   
                    Calendar now = Calendar.getInstance();
                    String appendme = " (disconnected by RepositoryChecker on "
                            + ISO8601.format(now) + ")";
                    modifiedParent.renameChildNodeEntry(vhid,
                            nf.create(vhrname.getNamespaceURI(), vhrname.getLocalName() + appendme));

                    vworkspaceChanges.modified(modifiedParent);
                }
                else {
                    log.info("child node entry " + vhrname + " for version history not found inside parent folder.");
View Full Code Here

                if (propertyDefs[i].getRequiredType() == PropertyType.REFERENCE
                        || propertyDefs[i].getRequiredType() == PropertyType.WEAKREFERENCE) {
                    String[] ca = propertyDefs[i].getValueConstraints();
                    if (ca != null) {
                        for (int j = 0; j < ca.length; j++) {
                            NameFactory factory = NameFactoryImpl.getInstance();
                            Name ntName = factory.create(ca[j]);
                            if (!name.equals(ntName)) {
                                deps.add(ntName);
                            }
                        }
                    }
View Full Code Here

            if (lostNFoundId != null) {
                final NodePropBundle bundle = getBundle(nodeId);
                final NodePropBundle lfBundle = getBundle(lostNFoundId);

                final String nodeName = nodeId + "-" + System.currentTimeMillis();
                final NameFactory nameFactory = NameFactoryImpl.getInstance();
                lfBundle.addChildNodeEntry(nameFactory.create("", nodeName), nodeId);
                bundle.setParentId(lostNFoundId);

                saveBundle(bundle);
                saveBundle(lfBundle);
View Full Code Here

        }

        private Name createNodeName() {
            int n = (int) System.currentTimeMillis() + new Random().nextInt();
            final String localName = Integer.toHexString(n);
            final NameFactory nameFactory = NameFactoryImpl.getInstance();
            return nameFactory.create("{}" + localName);
        }
View Full Code Here

                // REFERENCE value constraints
                if (propertyDefs[i].getRequiredType() == PropertyType.REFERENCE) {
                    String[] ca = propertyDefs[i].getValueConstraints();
                    if (ca != null) {
                        for (int j = 0; j < ca.length; j++) {
                            NameFactory factory = NameFactoryImpl.getInstance();
                            Name ntName = factory.create(ca[j]);
                            if (!name.equals(ntName)) {
                                deps.add(ntName);
                            }
                        }
                    }
View Full Code Here

                if (propertyDef.getRequiredType() == PropertyType.REFERENCE
                        || propertyDef.getRequiredType() == PropertyType.WEAKREFERENCE) {
                    QValueConstraint[] ca = propertyDef.getValueConstraints();
                    if (ca != null) {
                        for (QValueConstraint aCa : ca) {
                            NameFactory factory = NameFactoryImpl.getInstance();
                            Name ntName = factory.create(aCa.getString());
                            if (!name.equals(ntName)) {
                                deps.add(ntName);
                            }
                        }
                    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.NameFactory

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.