Package org.exist.memtree

Examples of org.exist.memtree.MemTreeBuilder.addAttribute()


    private org.exist.memtree.DocumentImpl permissionsToXml(final Permission permission) {
        final MemTreeBuilder builder = context.getDocumentBuilder();
        builder.startDocument();

        builder.startElement(new QName("permission", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
        builder.addAttribute(new QName("owner"), permission.getOwner().getName());
        builder.addAttribute(new QName("group"), permission.getGroup().getName());
        builder.addAttribute(new QName("mode"), permission.toString());

        if(permission instanceof SimpleACLPermission) {
            final SimpleACLPermission aclPermission = (SimpleACLPermission)permission;
View Full Code Here


        final MemTreeBuilder builder = context.getDocumentBuilder();
        builder.startDocument();

        builder.startElement(new QName("permission", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
        builder.addAttribute(new QName("owner"), permission.getOwner().getName());
        builder.addAttribute(new QName("group"), permission.getGroup().getName());
        builder.addAttribute(new QName("mode"), permission.toString());

        if(permission instanceof SimpleACLPermission) {
            final SimpleACLPermission aclPermission = (SimpleACLPermission)permission;
            builder.startElement(new QName("acl", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
View Full Code Here

        builder.startDocument();

        builder.startElement(new QName("permission", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
        builder.addAttribute(new QName("owner"), permission.getOwner().getName());
        builder.addAttribute(new QName("group"), permission.getGroup().getName());
        builder.addAttribute(new QName("mode"), permission.toString());

        if(permission instanceof SimpleACLPermission) {
            final SimpleACLPermission aclPermission = (SimpleACLPermission)permission;
            builder.startElement(new QName("acl", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
            builder.addAttribute(new QName("entries"), String.valueOf(aclPermission.getACECount()));
View Full Code Here

        builder.addAttribute(new QName("mode"), permission.toString());

        if(permission instanceof SimpleACLPermission) {
            final SimpleACLPermission aclPermission = (SimpleACLPermission)permission;
            builder.startElement(new QName("acl", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
            builder.addAttribute(new QName("entries"), String.valueOf(aclPermission.getACECount()));

            for(int i = 0; i < aclPermission.getACECount(); i++) {
                builder.startElement(new QName("ace", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
                builder.addAttribute(new QName("index"), String.valueOf(i));
                builder.addAttribute(new QName("target"), aclPermission.getACETarget(i).name());
View Full Code Here

            builder.startElement(new QName("acl", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
            builder.addAttribute(new QName("entries"), String.valueOf(aclPermission.getACECount()));

            for(int i = 0; i < aclPermission.getACECount(); i++) {
                builder.startElement(new QName("ace", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
                builder.addAttribute(new QName("index"), String.valueOf(i));
                builder.addAttribute(new QName("target"), aclPermission.getACETarget(i).name());
                builder.addAttribute(new QName("who"), aclPermission.getACEWho(i));
                builder.addAttribute(new QName("access_type"), aclPermission.getACEAccessType(i).name());
                builder.addAttribute(new QName("mode"), aclPermission.getACEModeString(i));
                builder.endElement();
View Full Code Here

            builder.addAttribute(new QName("entries"), String.valueOf(aclPermission.getACECount()));

            for(int i = 0; i < aclPermission.getACECount(); i++) {
                builder.startElement(new QName("ace", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
                builder.addAttribute(new QName("index"), String.valueOf(i));
                builder.addAttribute(new QName("target"), aclPermission.getACETarget(i).name());
                builder.addAttribute(new QName("who"), aclPermission.getACEWho(i));
                builder.addAttribute(new QName("access_type"), aclPermission.getACEAccessType(i).name());
                builder.addAttribute(new QName("mode"), aclPermission.getACEModeString(i));
                builder.endElement();
            }
View Full Code Here

            for(int i = 0; i < aclPermission.getACECount(); i++) {
                builder.startElement(new QName("ace", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
                builder.addAttribute(new QName("index"), String.valueOf(i));
                builder.addAttribute(new QName("target"), aclPermission.getACETarget(i).name());
                builder.addAttribute(new QName("who"), aclPermission.getACEWho(i));
                builder.addAttribute(new QName("access_type"), aclPermission.getACEAccessType(i).name());
                builder.addAttribute(new QName("mode"), aclPermission.getACEModeString(i));
                builder.endElement();
            }
View Full Code Here

            for(int i = 0; i < aclPermission.getACECount(); i++) {
                builder.startElement(new QName("ace", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
                builder.addAttribute(new QName("index"), String.valueOf(i));
                builder.addAttribute(new QName("target"), aclPermission.getACETarget(i).name());
                builder.addAttribute(new QName("who"), aclPermission.getACEWho(i));
                builder.addAttribute(new QName("access_type"), aclPermission.getACEAccessType(i).name());
                builder.addAttribute(new QName("mode"), aclPermission.getACEModeString(i));
                builder.endElement();
            }

            builder.endElement();
View Full Code Here

                builder.startElement(new QName("ace", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
                builder.addAttribute(new QName("index"), String.valueOf(i));
                builder.addAttribute(new QName("target"), aclPermission.getACETarget(i).name());
                builder.addAttribute(new QName("who"), aclPermission.getACEWho(i));
                builder.addAttribute(new QName("access_type"), aclPermission.getACEAccessType(i).name());
                builder.addAttribute(new QName("mode"), aclPermission.getACEModeString(i));
                builder.endElement();
            }

            builder.endElement();
        }
View Full Code Here

  private Sequence response(XQueryContext pContext, String error, ErrorCode code, int line, int column) {
    context.pushDocumentContext();
    final MemTreeBuilder builder = context.getDocumentBuilder();
   
    builder.startElement(QNAME_INFO, null);
    builder.addAttribute(QNAME_RESULT_ATTR, error == null ? "pass" : "fail");
   
    if (error != null) {
      builder.startElement(ERROR_INFO, null);
      if (code != null)
        {builder.addAttribute(QNAME_ERRCODE_ATTR, code.toString());}
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.