Package com.gcrm.domain

Examples of com.gcrm.domain.User


        if (currencyID != null) {
            currency = currencyService
                    .getEntityById(Currency.class, currencyID);
        }
        campaign.setCurrency(currency);
        User assignedTo = null;
        if (this.getAssignedToID() != null) {
            assignedTo = userService.getEntityById(User.class,
                    this.getAssignedToID());
        }
        campaign.setAssigned_to(assignedTo);
        User owner = null;
        if (this.getOwnerID() != null) {
            owner = userService.getEntityById(User.class, this.getOwnerID());
        }
        campaign.setOwner(owner);
        SimpleDateFormat dateFormat = new SimpleDateFormat(
View Full Code Here


        if (originalCaseInstance != null) {
            ActionContext context = ActionContext.getContext();
            Map<String, Object> session = context.getSession();
            String entityName = CaseInstance.class.getSimpleName();
            Integer recordID = caseInstance.getId();
            User loginUser = (User) session
                    .get(AuthenticationSuccessListener.LOGIN_USER);
            changeLogs = new ArrayList<ChangeLog>();

            String oldSubject = CommonUtil.fromNullToEmpty(originalCaseInstance
                    .getSubject());
            String newSubject = CommonUtil.fromNullToEmpty(caseInstance
                    .getSubject());
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.subject.label", oldSubject, newSubject, loginUser);

            String oldPriority = getOptionValue(originalCaseInstance
                    .getPriority());
            String newPriority = getOptionValue(caseInstance.getPriority());
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.priority.label", oldPriority, newPriority,
                    loginUser);

            String oldStatus = getOptionValue(originalCaseInstance.getStatus());
            String newStatus = getOptionValue(caseInstance.getStatus());
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.status.label", oldStatus, newStatus, loginUser);

            String oldAccountName = "";
            Account oldAccount = originalCaseInstance.getAccount();
            if (oldAccount != null) {
                oldAccountName = CommonUtil.fromNullToEmpty(oldAccount
                        .getName());
            }
            String newAccountName = "";
            Account newAccount = caseInstance.getAccount();
            if (newAccount != null) {
                newAccountName = CommonUtil.fromNullToEmpty(newAccount
                        .getName());
            }
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.account.label", oldAccountName, newAccountName,
                    loginUser);

            String oldType = getOptionValue(originalCaseInstance.getType());
            String newType = getOptionValue(caseInstance.getType());
            createChangeLog(changeLogs, entityName, recordID,
                    "case.type.label", oldType, newType, loginUser);

            String oldOrigin = getOptionValue(originalCaseInstance.getOrigin());
            String newOrigin = getOptionValue(caseInstance.getOrigin());
            createChangeLog(changeLogs, entityName, recordID,
                    "case.origin.label", oldOrigin, newOrigin, loginUser);

            String oldReason = getOptionValue(originalCaseInstance.getReason());
            String newReason = getOptionValue(caseInstance.getReason());
            createChangeLog(changeLogs, entityName, recordID,
                    "case.reason.label", oldReason, newReason, loginUser);

            String oldResolution = CommonUtil
                    .fromNullToEmpty(originalCaseInstance.getResolution());
            String newResolution = CommonUtil.fromNullToEmpty(caseInstance
                    .getResolution());
            createChangeLog(changeLogs, entityName, recordID,
                    "case.resolution.label", oldResolution, newResolution,
                    loginUser);

            String oldNotes = CommonUtil.fromNullToEmpty(originalCaseInstance
                    .getNotes());
            String newNotes = CommonUtil.fromNullToEmpty(caseInstance
                    .getNotes());
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.notes.label", oldNotes, newNotes, loginUser);

            String oldAssignedToName = "";
            User oldAssignedTo = originalCaseInstance.getAssigned_to();
            if (oldAssignedTo != null) {
                oldAssignedToName = oldAssignedTo.getName();
            }
            String newAssignedToName = "";
            User newAssignedTo = caseInstance.getAssigned_to();
            if (newAssignedTo != null) {
                newAssignedToName = newAssignedTo.getName();
            }
            createChangeLog(changeLogs, entityName, recordID,
                    "entity.assigned_to.label",
                    CommonUtil.fromNullToEmpty(oldAssignedToName),
                    CommonUtil.fromNullToEmpty(newAssignedToName), loginUser);
View Full Code Here

            Account account = caseInstance.getAccount();
            if (account != null) {
                accountID = account.getId();
                accountText = account.getName();
            }
            User assignedTo = caseInstance.getAssigned_to();
            if (assignedTo != null) {
                this.setAssignedToID(assignedTo.getId());
                this.setAssignedToText(assignedTo.getName());
            }
            this.getBaseInfo(caseInstance, CaseInstance.class.getSimpleName(),
                    Constant.CRM_NAMESPACE);
        } else {
            this.initBaseInfo();
View Full Code Here

        saveEntity();
        String[] fieldNames = this.massUpdate;
        if (fieldNames != null) {
            String[] selectIDArray = this.seleteIDs.split(",");
            Collection<CaseInstance> cases = new ArrayList<CaseInstance>();
            User loginUser = this.getLoginUser();
            User user = userService
                    .getEntityById(User.class, loginUser.getId());
            Collection<ChangeLog> allChangeLogs = new ArrayList<ChangeLog>();
            for (String IDString : selectIDArray) {
                int id = Integer.parseInt(IDString);
                CaseInstance newCaseInstance = this.baseService.getEntityById(
View Full Code Here

        if (accountID != null) {
            account = accountService.getEntityById(Account.class, accountID);
        }
        caseInstance.setAccount(account);

        User assignedTo = null;
        if (this.getAssignedToID() != null) {
            assignedTo = userService.getEntityById(User.class,
                    this.getAssignedToID());
        }
        caseInstance.setAssigned_to(assignedTo);

        User owner = null;
        if (this.getOwnerID() != null) {
            owner = userService.getEntityById(User.class, this.getOwnerID());
        }
        caseInstance.setOwner(owner);
View Full Code Here

        fieldTypeMap.put("start_date", Constant.DATA_TYPE_DATETIME);
        fieldTypeMap.put("end_date", Constant.DATA_TYPE_DATETIME);
        fieldTypeMap.put("created_on", Constant.DATA_TYPE_DATETIME);
        fieldTypeMap.put("updated_on", Constant.DATA_TYPE_DATETIME);

        User loginUser = UserUtil.getLoginUser();
        SearchCondition searchCondition = getSearchCondition(fieldTypeMap,
                loginUser.getScope_meeting(), loginUser);
        SearchResult<Meeting> result = baseService.getPaginationObjects(CLAZZ,
                searchCondition);
        Iterator<Meeting> meetings = result.getResult().iterator();
        long totalRecords = result.getTotalRecords();
        getListJson(meetings, totalRecords, searchCondition, true);
View Full Code Here

            if (endDate != null) {
                endDateString = dateTimeFormat.format(endDate);
            }
            String location = instance.getLocation();
            if (isList) {
                User user = instance.getAssigned_to();
                if (user != null) {
                    assignedTo = CommonUtil.fromNullToEmpty(user.getName());
                } else {
                    assignedTo = "";
                }
                User createdBy = instance.getCreated_by();
                String createdByName = "";
                if (createdBy != null) {
                    createdByName = CommonUtil.fromNullToEmpty(createdBy
                            .getName());
                }
                User updatedBy = instance.getUpdated_by();
                String updatedByName = "";
                if (updatedBy != null) {
                    updatedByName = CommonUtil.fromNullToEmpty(updatedBy
                            .getName());
                }
                Date createdOn = instance.getCreated_on();
                String createdOnName = "";
                if (createdOn != null) {
View Full Code Here

                    String assignedToID = row
                            .get(getText("entity.assigned_to_id.label"));
                    if (CommonUtil.isNullOrEmpty(assignedToID)) {
                        meeting.setAssigned_to(null);
                    } else {
                        User assignedTo = userService.getEntityById(User.class,
                                Integer.parseInt(assignedToID));
                        meeting.setAssigned_to(assignedTo);
                    }
                    baseService.makePersistent(meeting);
                    successfulNum++;
View Full Code Here

            Campaign campaign = contact.getCampaign();
            if (campaign != null) {
                campaignID = campaign.getId();
                campaignText = campaign.getName();
            }
            User assignedTo = contact.getAssigned_to();
            if (assignedTo != null) {
                this.setAssignedToID(assignedTo.getId());
                this.setAssignedToText(assignedTo.getName());
            }
            this.getBaseInfo(contact, Contact.class.getSimpleName(),
                    Constant.CRM_NAMESPACE);
        } else {
            this.initBaseInfo();
View Full Code Here

        saveEntity();
        String[] fieldNames = this.massUpdate;
        if (fieldNames != null) {
            String[] selectIDArray = this.seleteIDs.split(",");
            Collection<Contact> contacts = new ArrayList<Contact>();
            User loginUser = this.getLoginUser();
            User user = userService
                    .getEntityById(User.class, loginUser.getId());
            Collection<ChangeLog> allChangeLogs = new ArrayList<ChangeLog>();
            for (String IDString : selectIDArray) {
                int id = Integer.parseInt(IDString);
                Contact contactInstance = this.baseService.getEntityById(
View Full Code Here

TOP

Related Classes of com.gcrm.domain.User

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.