Examples of swapIpRestrictions()


Examples of com.adito.security.SystemDatabase.swapIpRestrictions()

        IpRestriction restriction1 = database.getIpRestriction(id);
        String ipAddress = restriction1.getAddress();
        String ipPermission = restriction1.getAllowed() ? "Allowed" : "Denied";
        try {
            List<IpRestriction> restrictions = Arrays.asList(database.getIpRestrictions());
            database.swapIpRestrictions(restriction1, restrictions.get(restrictions.indexOf(restriction1) + 1));
            fireCoreEvent(request, CoreEventConstants.IP_RESTRICTION_MOVE_DOWN, ipAddress, ipPermission, CoreEvent.STATE_SUCCESSFUL);
        } catch (Exception e) {
            fireCoreEvent(request, CoreEventConstants.IP_RESTRICTION_MOVE_DOWN, ipAddress, ipPermission, CoreEvent.STATE_UNSUCCESSFUL);
            throw e;
        }       
View Full Code Here

Examples of com.adito.security.SystemDatabase.swapIpRestrictions()

        IpRestriction restriction1 = database.getIpRestriction(id);
        String ipAddress = restriction1.getAddress();
        String ipPermission = restriction1.getAllowed() ? "Allowed" : "Denied";
        try {
            List<IpRestriction> restrictions = Arrays.asList(database.getIpRestrictions());
            database.swapIpRestrictions(restriction1, restrictions.get(restrictions.indexOf(restriction1) - 1));
            fireCoreEvent(request, CoreEventConstants.IP_RESTRICTION_MOVE_UP, ipAddress, ipPermission, CoreEvent.STATE_SUCCESSFUL);
        } catch (Exception e) {
            fireCoreEvent(request, CoreEventConstants.IP_RESTRICTION_MOVE_UP, ipAddress, ipPermission, CoreEvent.STATE_UNSUCCESSFUL);
            throw e;
        }       
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.