Examples of PropertyDelegate


Examples of com.blogspot.mydailyjava.dp.delegation.PropertyDelegate

        this.delegationFactory = delegationFactory;
        this.locale = locale;
    }

    public PropertyDelegate resolve(Field field, StringBuilder stringBuilder) {
        PropertyDelegate propertyDelegate = makePropertyDelegate(field);
        stringBuilder.append("(");
        stringBuilder.append(uncaptureGroups(makePattern(field, propertyDelegate)));
        stringBuilder.append(")");
        if (isOptional(field)) {
            stringBuilder.append("?");
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.PropertyDelegate

        List<CoreValue> cvs = ValueConverter.toCoreValues(values, sessionDelegate);
        sessionDelegate.getNode(userNode).setProperty(oakName, cvs);
    }

    void removeInternalProperty(Node userNode, String oakName) throws RepositoryException {
        PropertyDelegate pd = sessionDelegate.getNode(userNode).getProperty(oakName);
        if (pd == null) {
            throw new PathNotFoundException("Missing authorizable property " + oakName);
        } else {
            pd.remove();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.PropertyDelegate

        List<CoreValue> cvs = ValueConverter.toCoreValues(values, sessionDelegate);
        sessionDelegate.getNode(userNode).setProperty(oakName, cvs);
    }

    void removeInternalProperty(Node userNode, String oakName) throws RepositoryException {
        PropertyDelegate pd = sessionDelegate.getNode(userNode).getProperty(oakName);
        if (pd == null) {
            throw new PathNotFoundException("Missing authorizable property " + oakName);
        } else {
            pd.remove();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.delegate.PropertyDelegate

                return null;
            }
            return perform(new ReadOperation<Property>() {
                @Override
                public Property perform() throws RepositoryException {
                    PropertyDelegate pd = sd.getProperty(oakPath);
                    if (pd != null) {
                        return new PropertyImpl(pd, sessionContext);
                    } else {
                        return null;
                    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.delegate.PropertyDelegate

    }

    public static NodeImpl<? extends NodeDelegate> createNode(
                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.delegate.PropertyDelegate

    public Property getProperty(String relPath) throws RepositoryException {
        final String oakPath = getOakPathOrThrowNotFound(relPath);
        return perform(new NodeOperation<PropertyImpl>(dlg) {
            @Override
            public PropertyImpl perform() throws RepositoryException {
                PropertyDelegate pd = node.getPropertyOrNull(oakPath);
                if (pd == null) {
                    throw new PathNotFoundException(
                            oakPath + " not found on " + node.getPath());
                } else {
                    return new PropertyImpl(pd, sessionContext);
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.delegate.PropertyDelegate

                Iterable<Property> properties = Iterables.transform(
                        propertyOakPaths,
                        new Function<String, Property>() {
                            @Override
                            public Property apply(String oakPath) {
                                PropertyDelegate pd = sessionDelegate.getProperty(oakPath);
                                return pd == null ? null : new PropertyImpl(pd, sessionContext);
                            }
                        }
                );
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.delegate.PropertyDelegate

            throws RepositoryException {
        final String oakName = getOakName(checkNotNull(jcrName));
        return perform(new ItemWriteOperation<Property>() {
            @Override
            public Property perform() throws RepositoryException {
                PropertyDelegate property = dlg.getPropertyOrNull(oakName);
                if (property != null) {
                    property.remove();
                } else {
                    // Return an instance which throws on access; see OAK-395
                    property = dlg.getProperty(oakName);
                }
                return new PropertyImpl(property, sessionContext);
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.delegate.PropertyDelegate

                // check for NODE_TYPE_MANAGEMENT permission here as we cannot
                // distinguish between a combination of removeMixin and addMixin
                // and Node#remove plus subsequent addNode when it comes to
                // autocreated properties like jcr:create, jcr:uuid and so forth.
                PropertyDelegate mixinProp = dlg.getPropertyOrNull(JCR_MIXINTYPES);
                if (mixinProp != null) {
                    sessionContext.getAccessManager().checkPermissions(dlg.getTree(), mixinProp.getPropertyState(), Permissions.NODE_TYPE_MANAGEMENT);
                }
            }
            @Override
            public Void perform() throws RepositoryException {
                dlg.setMixins(oakTypeNames);
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.delegate.PropertyDelegate

    }

    public static NodeImpl<? extends NodeDelegate> createNode(
                NodeDelegate delegate, SessionContext context)
                throws RepositoryException {
        PropertyDelegate pd = delegate.getPropertyOrNull(JCR_PRIMARYTYPE);
        String type = pd != null ? pd.getString() : null;
        if (JcrConstants.NT_VERSION.equals(type)) {
            VersionManagerDelegate vmd =
                    VersionManagerDelegate.create(context.getSessionDelegate());
            return new VersionImpl(vmd.createVersion(delegate), context);
        } else if (JcrConstants.NT_VERSIONHISTORY.equals(type)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.