Examples of PermissionModifier


Examples of org.exist.security.PermissionFactory.PermissionModifier

    @Override
    public boolean chgrp(final String resource, final String ownerGroup) throws EXistException, PermissionDeniedException, URISyntaxException {
        executeWithBroker(new BrokerOperation<Void>() {
            @Override
            public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
                PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
                    @Override
                    public void modify(Permission permission) throws PermissionDeniedException {
                        permission.setGroup(ownerGroup);
                    }
                });
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

    @Override
    public boolean chown(final String resource, final String owner) throws EXistException, PermissionDeniedException, URISyntaxException {
        executeWithBroker(new BrokerOperation<Void>() {
            @Override
            public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
                PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
                    @Override
                    public void modify(Permission permission) throws PermissionDeniedException {
                        permission.setOwner(owner);
                    }
                });
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

    @Override
    public boolean chown(final String resource, final String owner, final String ownerGroup) throws EXistException, PermissionDeniedException, URISyntaxException {
        executeWithBroker(new BrokerOperation<Void>() {
            @Override
            public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
                PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
                    @Override
                    public void modify(Permission permission) throws PermissionDeniedException {
                        permission.setOwner(owner);
                        permission.setGroup(ownerGroup);
                    }
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

    @Override
    public boolean setPermissions(final String resource, final int permissions) throws EXistException, PermissionDeniedException, URISyntaxException {
        executeWithBroker(new BrokerOperation<Void>() {
            @Override
            public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
                PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
                    @Override
                    public void modify(Permission permission) throws PermissionDeniedException {
                        permission.setMode(permissions);
                    }
                });
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

    @Override
    public boolean setPermissions(final String resource, final String permissions) throws EXistException, PermissionDeniedException, URISyntaxException {
         executeWithBroker(new BrokerOperation<Void>() {
            @Override
            public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
                PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
                    @Override
                    public void modify(Permission permission) throws PermissionDeniedException {
                        try {
                            permission.setMode(permissions);
                        } catch(final SyntaxException se) {
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

    @Override
    public boolean setPermissions(final String resource, final String owner, final String ownerGroup, final String permissions) throws EXistException, PermissionDeniedException, URISyntaxException {
         executeWithBroker(new BrokerOperation<Void>() {
            @Override
            public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
                PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
                    @Override
                    public void modify(Permission permission) throws PermissionDeniedException {
                        permission.setOwner(owner);
                        permission.setGroup(ownerGroup);
                        try {
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

    @Override
    public boolean setPermissions(final String resource, final String owner, final String ownerGroup, final int permissions) throws EXistException, PermissionDeniedException, URISyntaxException {
         executeWithBroker(new BrokerOperation<Void>() {
            @Override
            public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
                PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
                    @Override
                    public void modify(Permission permission) throws PermissionDeniedException {
                        permission.setOwner(owner);
                        permission.setGroup(ownerGroup);
                        permission.setMode(permissions);
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

    @Override
    public boolean setPermissions(final String resource, final String owner, final String group, final int mode, final List<ACEAider> aces) throws EXistException, PermissionDeniedException, URISyntaxException {
         executeWithBroker(new BrokerOperation<Void>() {
            @Override
            public Void withBroker(final DBBroker broker) throws EXistException, URISyntaxException, PermissionDeniedException {
                PermissionFactory.updatePermissions(broker, XmldbURI.xmldbUriFor(resource), new PermissionModifier(){
                    @Override
                    public void modify(Permission permission) throws PermissionDeniedException {
                        permission.setOwner(owner);
                        permission.setGroup(group);
                        permission.setMode(mode);
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

            throw new XPathException(this, "Permission to retrieve permissions is denied for user '" + context.getSubject().getName() + "' on '" + pathUri.toString() + "': " + pde.getMessage(), pde);
        }
    }

    private Sequence functionAddACE(final XmldbURI pathUri, final ACE_TARGET target, final String name, final ACE_ACCESS_TYPE access_type, final String mode) throws PermissionDeniedException {
        PermissionFactory.updatePermissions(context.getBroker(), pathUri, new PermissionModifier(){
            @Override
            public void modify(final Permission permission) throws PermissionDeniedException {
                if(permission instanceof SimpleACLPermission) {
                    //add the ace
                    final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
View Full Code Here

Examples of org.exist.security.PermissionFactory.PermissionModifier

        });
        return Sequence.EMPTY_SEQUENCE;
    }

    private Sequence functionInsertACE(final XmldbURI pathUri, final int index, final ACE_TARGET target, final String name, final ACE_ACCESS_TYPE access_type, final String mode) throws PermissionDeniedException {
        PermissionFactory.updatePermissions(context.getBroker(), pathUri, new PermissionModifier(){
            @Override
            public void modify(final Permission permission) throws PermissionDeniedException {
                if(permission instanceof SimpleACLPermission) {
                    //insert the ace
                    final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
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.