Package org.exist.xmldb

Examples of org.exist.xmldb.UserManagementService.chmod()


                    throw new XPathException(this, "Needs a valid user name, not: " + user);
                }


                ums.chown(res, usr, group);
                ums.chmod(mode);

            } else {
                logger.error("Unable to locate resource " + args[1].getStringValue());

                throw new XPathException(this, "Unable to locate resource " + args[1].getStringValue());
View Full Code Here


        BinaryResource res = (BinaryResource)root.createResource(XQUERY_FILENAME, "BinaryResource");
        ((EXistResource) res).setMimeType("application/xquery");
        res.setContent(XQUERY);
        root.storeResource(res);
        UserManagementService ums = (UserManagementService)root.getService("UserManagementService", "1.0");
        ums.chmod(res, 0777);
    }

    @AfterClass
    public static void afterClass() throws XMLDBException {
        BinaryResource res = (BinaryResource)root.getResource(XQUERY_FILENAME);
View Full Code Here

  throws XPathException {
        try {
            final Resource res = collection.getResource(args[1].getStringValue());
            if (res != null) {
                final UserManagementService ums = (UserManagementService) collection.getService("UserManagementService", "1.0");
                ums.chmod(res, ((IntegerValue) args[2].convertTo(Type.INTEGER)).getInt());
            } else {
    logger.error("Unable to locate resource "+args[1].getStringValue());
                throw new XPathException(this, "Unable to locate resource "+args[1].getStringValue());
            }
        } catch (final XMLDBException xe) {
View Full Code Here

        BinaryResource res = (BinaryResource)root.createResource(XQUERY_FILENAME, "BinaryResource");
        ((EXistResource) res).setMimeType("application/xquery");
        res.setContent(XQUERY);
        root.storeResource(res);
        UserManagementService ums = (UserManagementService)root.getService("UserManagementService", "1.0");
        ums.chmod(res, 0777);
    }

    @AfterClass
    public static void afterClass() throws XMLDBException {
        BinaryResource res = (BinaryResource)root.getResource(XQUERY_FILENAME);
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.