Package com.adito.core

Examples of com.adito.core.CoreEvent.addAttribute()


                    MessageResources mrPermission = CoreUtil.getMessageResources(request.getSession(), permission.getPermission().getBundle());
                    String permissionName = mrPermission.getMessage("permission."+permission.getPermission().getId()+".title").trim();

                    MessageResources mrResourceType = CoreUtil.getMessageResources(request.getSession(), permission.getResourceType().getBundle());
                    String resourceTypeName = mrResourceType.getMessage("resourceType."+permission.getResourceType().getResourceTypeId()+".title").trim();
                    coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_TYPE_PERMISSION + Integer.toString(j), permissionName + " " + resourceTypeName);
                }
            }
            CoreServlet.getServlet().fireCoreEvent(coreEvent);
           
        } catch (Exception e) {
View Full Code Here


        return null;
    }

    private void fireCoreEvent(HttpServletRequest request, int eventID, String ipAddress, String ipPermission, int state) {
        CoreEvent coreEvent = new CoreEvent(this, eventID, null, getSessionInfo(request), state);
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_IP_RESTRICTION_ADDRESS, ipAddress);
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_IP_RESTRICTION_IS_AUTHORIZED, ipPermission);
        CoreServlet.getServlet().fireCoreEvent(coreEvent);
    }

    /**
 
View Full Code Here

    }

    private void fireCoreEvent(HttpServletRequest request, int eventID, String ipAddress, String ipPermission, int state) {
        CoreEvent coreEvent = new CoreEvent(this, eventID, null, getSessionInfo(request), state);
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_IP_RESTRICTION_ADDRESS, ipAddress);
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_IP_RESTRICTION_IS_AUTHORIZED, ipPermission);
        CoreServlet.getServlet().fireCoreEvent(coreEvent);
    }

    /**
     * Create a new restriction
View Full Code Here

                        .addAttribute(CoreAttributeConstants.EVENT_ATTR_FULL_NAME, user.getFullname())
                      .addAttribute(CoreAttributeConstants.EVENT_ATTR_ACCOUNT_EMAIL, user.getEmail());

                    if(roles.length != 0) {
                        for(int i = 0; i < roles.length; i++ ) {
                            coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_GROUP + Integer.toString(i+1), roles[i].getPrincipalName());
                        }
                    }
                    CoreServlet.getServlet().fireCoreEvent(coreEvent);
                } catch (GroupsRequiredForUserException e) {
                    saveError(request, "createAccount.error.groupsRequired");
View Full Code Here

                    .addAttribute(CoreAttributeConstants.EVENT_ATTR_FULL_NAME, account.getFullname())
                    .addAttribute(CoreAttributeConstants.EVENT_ATTR_ACCOUNT_EMAIL, account.getEmail());

                    if(roles.length != 0) {
                        for(int i = 0; i < roles.length; i++ ) {
                            coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_GROUP + Integer.toString(i+1), roles[i].getPrincipalName());
                        }
                    }
                    CoreServlet.getServlet().fireCoreEvent(coreEvent);
              } catch (GroupsRequiredForUserException e) {
                    saveError(request, "createAccount.error.groupsRequired");
View Full Code Here

            .addAttribute(CoreAttributeConstants.EVENT_ATTR_FULL_NAME, account.getFullname())
          .addAttribute(CoreAttributeConstants.EVENT_ATTR_ACCOUNT_EMAIL, account.getEmail());

        if(roles.length != 0) {
            for(int i = 0; i < roles.length; i++ ) {
                coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_GROUP + Integer.toString(i+1), roles[i].getPrincipalName());
            }
        }
        CoreServlet.getServlet().fireCoreEvent(coreEvent);
    }
View Full Code Here

   
    private void fireCoreEvent(HttpServletRequest request, IpRestrictionForm ipRestrictionForm, int state) {
        IpRestriction restriction = ipRestrictionForm.getRestriction();
        int eventType = ipRestrictionForm.isEditing() ? CoreEventConstants.EDIT_IP_RESTRICTION : CoreEventConstants.CREATE_IP_RESTRICTION;
        CoreEvent coreEvent = new CoreEvent(this, eventType, null, getSessionInfo(request), state);
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_IP_RESTRICTION_ADDRESS, restriction.getAddress());
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_IP_RESTRICTION_IS_AUTHORIZED, String.valueOf(restriction.getAllowed()));
        CoreServlet.getServlet().fireCoreEvent(coreEvent);

    }
   
View Full Code Here

    private void fireCoreEvent(HttpServletRequest request, IpRestrictionForm ipRestrictionForm, int state) {
        IpRestriction restriction = ipRestrictionForm.getRestriction();
        int eventType = ipRestrictionForm.isEditing() ? CoreEventConstants.EDIT_IP_RESTRICTION : CoreEventConstants.CREATE_IP_RESTRICTION;
        CoreEvent coreEvent = new CoreEvent(this, eventType, null, getSessionInfo(request), state);
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_IP_RESTRICTION_ADDRESS, restriction.getAddress());
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_IP_RESTRICTION_IS_AUTHORIZED, String.valueOf(restriction.getAllowed()));
        CoreServlet.getServlet().fireCoreEvent(coreEvent);

    }
   
    /*
 
View Full Code Here

        }
    }

    private void fireSuccessfulEvent(SessionInfo sessionInfo, int eventId, Role role, List<String> selectedUsers) {
        CoreEvent coreEvent = new CoreEvent(this, eventId, role, sessionInfo);
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_PRINCIPAL_ID, role.getPrincipalName());
        if (!selectedUsers.isEmpty()) {
            for (int index = 0; index < selectedUsers.size(); index++) {
                String username = selectedUsers.get(index);
                coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_ACCOUNT + Integer.valueOf(index), username);
            }
View Full Code Here

        CoreEvent coreEvent = new CoreEvent(this, eventId, role, sessionInfo);
        coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_PRINCIPAL_ID, role.getPrincipalName());
        if (!selectedUsers.isEmpty()) {
            for (int index = 0; index < selectedUsers.size(); index++) {
                String username = selectedUsers.get(index);
                coreEvent.addAttribute(CoreAttributeConstants.EVENT_ATTR_ACCOUNT + Integer.valueOf(index), username);
            }
        }
        CoreServlet.getServlet().fireCoreEvent(coreEvent);
    }
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.