Package org.apache.jackrabbit.jcr2spi.hierarchy

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry


     * @throws RepositoryException
     */
    private Version getVersionByLabel(Name qLabel) throws VersionException, RepositoryException {
         refreshEntry(labelNodeEntry);
        // retrieve reference property value -> and retrieve referenced node
        PropertyEntry pEntry = labelNodeEntry.getPropertyEntry(qLabel, true);
        if (pEntry == null) {
            throw new VersionException("Version with label '" + qLabel + "' does not exist.");
        }
        Node version = ((Property) getItemManager().getItem(pEntry)).getNode();
        return (Version) version;
View Full Code Here


        PropertyState propState = null;
        QPropertyDefinition def = null;

        NodeEntry parentEntry = (NodeEntry) parentState.getHierarchyEntry();
        PropertyEntry pEntry = parentEntry.getPropertyEntry(propName);
        if (pEntry != null) {
            // a property with that name already exists...
            try {
                PropertyState existing = pEntry.getPropertyState();
                def = existing.getDefinition();
                if (def.isProtected()) {
                    // skip protected property
                    log.debug("skipping protected property " + LogUtil.safeGetJCRPath(existing, session.getPathResolver()));
                    return;
View Full Code Here

        assert status == STATUS_PENDING;
        status = STATUS_PERSISTED;
        // non-recursive invalidation BUT including all properties
        Iterator<PropertyEntry> propEntries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
        while (propEntries.hasNext()) {
            PropertyEntry pe = propEntries.next();
            pe.invalidate(false);
        }
        nodeState.getHierarchyEntry().invalidate(false);
    }
View Full Code Here

        }
        // non-recursive invalidation (but including all properties)
        NodeEntry nodeEntry = (NodeEntry) nodeState.getHierarchyEntry();
        Iterator<PropertyEntry> entries = nodeEntry.getPropertyEntries();
        while (entries.hasNext()) {
            PropertyEntry pe = entries.next();
            pe.invalidate(false);
        }
        nodeEntry.invalidate(false);
    }
View Full Code Here

        status = STATUS_PERSISTED;
        // Invalidate the versionable node as well (version related properties)
        if (versionableEntry != null) {
            Iterator<PropertyEntry> propEntries = versionableEntry.getPropertyEntries();
            while (propEntries.hasNext()) {
                PropertyEntry pe = propEntries.next();
                pe.invalidate(false);
            }
            versionableEntry.invalidate(false);
        }

        // invalidate the versionhistory entry and all its children
View Full Code Here

         // removed as with JSR 283 having same-named node and property can be
         // allowed. thus delegate the corresponding validation to the underlying
         // SPI implementation.

        // check for name collisions with an existing property
        PropertyEntry pe = parentEntry.getPropertyEntry(propertyName);
        if (pe != null) {
            try {
                pe.getPropertyState();
                throw new ItemExistsException("Property '" + pe.getName() + "' already exists.");
            } catch (ItemNotFoundException e) {
                // apparently conflicting entry does not exist any more
                // ignore and return
            }
        }
View Full Code Here

    /**
     * @see Node#getProperty(String)
     */
    public Property getProperty(String relPath) throws PathNotFoundException, RepositoryException {
        checkStatus();
        PropertyEntry entry = resolveRelativePropertyPath(relPath);
        if (entry == null) {
            throw new PathNotFoundException(relPath);
        }
        try {
            return (Property) getItemManager().getItem(entry);
View Full Code Here

    /**
     * @see Node#hasProperty(String)
     */
    public boolean hasProperty(String relPath) throws RepositoryException {
        checkStatus();
        PropertyEntry childEntry = resolveRelativePropertyPath(relPath);
        return (childEntry != null) && getItemManager().itemExists(childEntry);
    }
View Full Code Here

        if (getNodeState().getStatus() == Status.EXISTING) {
            // jcr:mixinTypes must correspond to the mixins present on the nodestate.
            mixinValue = getNodeState().getMixinTypeNames();
        } else {
            try {
                PropertyEntry pe = getNodeEntry().getPropertyEntry(NameConstants.JCR_MIXINTYPES);
                if (pe != null) {
                    // prop entry exists (and ev. has been transiently mod.)
                    // -> retrieve mixin types from prop
                    mixinValue = StateUtility.getMixinNames(pe.getPropertyState());
                } else {
                    // prop entry has not been loaded yet -> not modified
                    mixinValue = getNodeState().getMixinTypeNames();
                }
            } catch (RepositoryException e) {
View Full Code Here

     */
    // TODO: protected due to usage within VersionImpl, VersionHistoryImpl (check for alternatives)
    protected Property getProperty(Name qName) throws PathNotFoundException, RepositoryException {
        checkStatus();
        try {
            PropertyEntry pEntry = getNodeEntry().getPropertyEntry(qName, true);
            if (pEntry == null) {
                throw new PathNotFoundException(LogUtil.saveGetJCRName(qName, session.getNameResolver()));
            }
            return (Property) getItemManager().getItem(pEntry);
        } catch (AccessDeniedException e) {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntry

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.