Package org.jitterbit.integration.server.accesscontrol

Examples of org.jitterbit.integration.server.accesscontrol.ServerAccessException


        boolean success = false;
        try {
            UsersTab usersTab = new UsersTab(conn);
            User user = usersTab.getUser(login, md5Pwd);
            if (user == null) {
                throw new ServerAccessException("Invalid user name and/or password.");
            }
            ExternalApiSupport wss = new ExternalApiSupport(conn, user, md5Pwd);
            success = true;
            return wss;
        } catch (SQLException ex) {
            throw new ServerAccessException("Failed to validate the connecting user.", ex);
        } finally {
            if (!success) {
                KongaDbUtils.close(conn);
            }
        }
View Full Code Here


    private static Connection openConnectionToBackend() throws ServerAccessException {
        try {
            return ServerDbInfo.getTranDbConnectionInfo().getConnection();
        } catch (SQLException ex) {
            throw new ServerAccessException("Failed to connect to the server database.", ex);
        }
    }
View Full Code Here

        return admin || getAccessController().hasPermission(user, itemId, p);
    }

    public void verifyPermission(IntegrationEntityId itemId, Permission p) throws ServerAccessException {
        if (!hasPermission(itemId, p)) {
            throw new ServerAccessException("The user " + user.getName() + " does not have " + p + " permission to the"
                            + itemId.getEntityType());
        }
    }
View Full Code Here

    private void verifyAccess(IntegrationEntityId entityId) throws ServerAccessException {
        if (jitterbitUser == null || accessController == null) {
            return;
        }
        if (!accessController.hasPermission(jitterbitUser, entityId, Permission.READ)) {
            throw new ServerAccessException("The Jitterbit user " + jitterbitUser.getName()
                            + " does not have sufficient permissions to access this " + entityId.getEntityType() + ".");
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.server.accesscontrol.ServerAccessException

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.