Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.Machine


                    User user = identity.getUser();
                    if (user != null) {
                        value = user.getEmail();
                    }
                } else if (name.equals(IP_ADDRESS)) {
                    Machine machine = identity.getMachine();
                    if (machine != null) {
                        value = machine.getIp();
                    }
                } else if (name.equals(ROLE_IDS)) {
                    try {
                        Role[] roles = PolicyAuthorizer.getRoles(request);
                        StringBuffer roleIds = new StringBuffer();
View Full Code Here


                }
            }

            getLogger().info("Remote Address to use: [" + remoteAddress + "]");

            Machine machine = new Machine(remoteAddress);
            IPRange[] ranges = accreditableManager.getIPRangeManager().getIPRanges();
            for (int i = 0; i < ranges.length; i++) {
                if (ranges[i].contains(machine)) {
                    machine.addIPRange(ranges[i]);
                }
            }

            identity.addIdentifiable(machine);
            session.setAttribute(Identity.class.getName(), identity);
View Full Code Here

    }
    IPRange ipr = new FileIPRange();
    try {
      ipr.setNetworkAddress(args[0]);
      ipr.setSubnetMask(args[1]);
      if (ipr.contains(new Machine(args[2]))) {
        System.out.println("true");
      } else {
        System.out.println("false");
      }
    } catch (Exception e) {
View Full Code Here

        User user = identity.getUser();
        if (user != null) {
            userId = user.getId();
        }

        Machine machine = identity.getMachine();
        if (machine != null) {
            ipAddress = machine.getIp();
        }

        Role[] roles = PolicyAuthorizer.getRoles(request);
        String[] roleIds = new String[roles.length];
        for (int i = 0; i < roles.length; i++) {
View Full Code Here

        if (user != null) {
            userId = user.getId();
        }
       
        String machineIp = null;
        Machine machine = identity.getMachine();
        if (machine != null) {
            machineIp = machine.getIp();
        }
       
        String[] roleIds = new String[roles.length];
        for (int i = 0; i < roles.length; i++) {
            roleIds[i] = roles[i].getId();
View Full Code Here

      userId = user.getId();
    }
    parameters.put(USER_ID, userId);

    String machineIp = "";
    Machine machine = identity.getMachine();
    if (machine != null) {
      machineIp = machine.getIp();
    }
    parameters.put(MACHINE, machineIp);
  }
View Full Code Here

            userId = user.getId();
        }
        parameters.put(USER_ID, userId);

        String machineIp = "";
        Machine machine = identity.getMachine();
        if (machine != null) {
            machineIp = machine.getIp();
        }
        parameters.put(MACHINE, machineIp);
    }
View Full Code Here

                    User user = identity.getUser();
                    if (user != null) {
                        userId = user.getId();
                        objects.put(UsecaseCronJob.USER_ID, userId);
                    }
                    Machine machine = identity.getMachine();
                    if (machine != null) {
                        objects.put(UsecaseCronJob.MACHINE_IP, machine.getIp());
                    }
                }
            }

            String role = CronJob.class.getName() + "/usecase";
View Full Code Here

        User user = identity.getUser();
        if (user != null) {
            userId = user.getId();
        }

        Machine machine = identity.getMachine();
        if (machine != null) {
            ipAddress = machine.getIp();
        }

        Role[] roles = PolicyAuthorizer.getRoles(request);
        String[] roleIds = new String[roles.length];
        for (int i = 0; i < roles.length; i++) {
View Full Code Here

                    User user = identity.getUser();
                    if (user != null) {
                        userId = user.getId();
                        objects.put(UsecaseCronJob.USER_ID, userId);
                    }
                    Machine machine = identity.getMachine();
                    if (machine != null) {
                        objects.put(UsecaseCronJob.MACHINE_IP, machine.getIp());
                    }
                }
            }

            String role = CronJob.class.getName() + "/usecase";
View Full Code Here

TOP

Related Classes of org.apache.lenya.ac.Machine

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.