Example usage for com.liferay.portal.kernel.util ParamUtil getInteger

List of usage examples for com.liferay.portal.kernel.util ParamUtil getInteger

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util ParamUtil getInteger.

Prototype

public static int getInteger(ServiceContext serviceContext, String param) 

Source Link

Document

Returns the service context parameter value as an integer.

Usage

From source file:at.graz.meduni.liferay.portlet.bibbox.service.service.impl.BiobankPanelAssessmentLocalServiceImpl.java

License:Open Source License

/**
 * Convenience method to get a date from the request
 *
 *//*  w  w w .  ja v a2s  . c om*/
private static Date getDate(PortletRequest request, String param) {
    int day = ParamUtil.getInteger(request, param + "Day");
    int month = ParamUtil.getInteger(request, param + "Month");
    int year = ParamUtil.getInteger(request, param + "Year");
    return PortalUtil.getDate(month, day, year);
}

From source file:blade.servicebuilder.web.JSPPortlet.java

License:Apache License

protected void updateFoo(ActionRequest actionRequest) throws Exception {
    long fooId = ParamUtil.getLong(actionRequest, "fooId");

    String field1 = ParamUtil.getString(actionRequest, "field1");
    boolean field2 = ParamUtil.getBoolean(actionRequest, "field2");
    int field3 = ParamUtil.getInteger(actionRequest, "field3");
    String field5 = ParamUtil.getString(actionRequest, "field5");

    int dateMonth = ParamUtil.getInteger(actionRequest, "field4Month");
    int dateDay = ParamUtil.getInteger(actionRequest, "field4Day");
    int dateYear = ParamUtil.getInteger(actionRequest, "field4Year");
    int dateHour = ParamUtil.getInteger(actionRequest, "field4Hour");
    int dateMinute = ParamUtil.getInteger(actionRequest, "field4Minute");
    int dateAmPm = ParamUtil.getInteger(actionRequest, "field4AmPm");

    if (dateAmPm == Calendar.PM) {
        dateHour += 12;// w  ww  .jav a2  s.com
    }

    Date field4 = PortalUtil.getDate(dateMonth, dateDay, dateYear, dateHour, dateMinute, PortalException.class);

    if (fooId <= 0) {
        Foo foo = getFooLocalService().createFoo(0);

        foo.setField1(field1);
        foo.setField2(field2);
        foo.setField3(field3);
        foo.setField4(field4);
        foo.setField5(field5);
        foo.isNew();
        getFooLocalService().addFooWithoutId(foo);
    } else {
        Foo foo = getFooLocalService().fetchFoo(fooId);
        foo.setFooId(fooId);
        foo.setField1(field1);
        foo.setField2(field2);
        foo.setField3(field3);
        foo.setField4(field4);
        foo.setField5(field5);
        getFooLocalService().updateFoo(foo);
    }
}

From source file:ca.efendi.datafeeds.web.internal.portlet.DatafeedsAdminPortlet.java

License:Apache License

/**
 * @param request//from  w  w  w.j a v  a 2  s. c  o  m
 * @return
 */
public FtpSubscription ftpSubscriptionFromRequest(final ActionRequest request) {
    final ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(THEME_DISPLAY);
    long ftpSubscriptionId = ParamUtil.getLong(request, "ftpSubscriptionId");
    final FtpSubscription ftpSubscription = _ftpSubscriptionLocalService.createFtpSubscription(0);
    ftpSubscription.setFtpSubscriptionId(ParamUtil.getInteger(request, "ftpSubscriptionId"));
    _log.warn("ftpSubscriptionId:" + ftpSubscription.getFtpSubscriptionId());
    ftpSubscription.setCompanyId(themeDisplay.getCompanyId());
    ftpSubscription.setGroupId(themeDisplay.getScopeGroupId());
    ftpSubscription.setUserId(themeDisplay.getUser().getUserId());
    ftpSubscription.setUserName(themeDisplay.getUser().getFullName());
    final Date now = new Date();
    ftpSubscription.setCreateDate(now);
    ftpSubscription.setModifiedDate(now);
    // _log.warn("ftpSubscriptionId:" + ParamUtil.getInteger(request,
    // "ftpSubscriptionId"));
    ftpSubscription.setFtpHost(ParamUtil.getString(request, "ftpHost"));
    ftpSubscription.setFtpUser(ParamUtil.getString(request, "ftpUser"));
    ftpSubscription.setFtpPassword(ParamUtil.getString(request, "ftpPassword"));
    ftpSubscription.setFtpFolder(ParamUtil.getString(request, "ftpFolder"));
    ftpSubscription.setFtpDatafeedName(ParamUtil.getString(request, "ftpDatafeedName"));
    ftpSubscription.setFtpFile(ParamUtil.getString(request, "ftpFile"));
    ftpSubscription.setFtpDatafeedDescription(ParamUtil.getString(request, "ftpDatafeedDescription"));
    return ftpSubscription;
}

From source file:com.abubusoft.liferay.linkedin.CreateAccountAction.java

License:Open Source License

protected void addUser(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
    HttpServletRequest request = PortalUtil.getHttpServletRequest(actionRequest);
    HttpSession session = request.getSession();

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    Company company = themeDisplay.getCompany();

    long creatorUserId = 0;
    long facebookId = ParamUtil.getLong(actionRequest, "facebookId");
    boolean autoPassword = true;
    boolean autoScreenName = false;
    boolean male = ParamUtil.getBoolean(actionRequest, "male", true);
    boolean sendEmail = true;
    String linkedinId = ParamUtil.getString(actionRequest, "linkedinId");
    String emailAddress = ParamUtil.getString(actionRequest, "emailAddress");
    String screenName = ParamUtil.getString(actionRequest, "screenName");
    String firstName = ParamUtil.getString(actionRequest, "firstName");
    String lastName = ParamUtil.getString(actionRequest, "lastName");
    String middleName = ParamUtil.getString(actionRequest, "middleName");
    String password1 = StringPool.BLANK;
    String password2 = StringPool.BLANK;
    String jobTitle = ParamUtil.getString(actionRequest, "jobTitle");
    String openId = StringPool.BLANK;
    int birthdayMonth = ParamUtil.getInteger(actionRequest, "birthdayMonth");
    int birthdayDay = ParamUtil.getInteger(actionRequest, "birthdayDay");
    int birthdayYear = ParamUtil.getInteger(actionRequest, "birthdayYear");
    int prefixId = ParamUtil.getInteger(actionRequest, "prefixId");
    int suffixId = ParamUtil.getInteger(actionRequest, "suffixId");
    Locale locale = themeDisplay.getLocale();

    long[] groupIds = null;
    long[] organizationIds = null;
    long[] roleIds = null;
    long[] userGroupIds = null;

    if (GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LOGIN_CREATE_ACCOUNT_ALLOW_CUSTOM_PASSWORD))) {
        autoPassword = false;/* www . j ava 2  s.co m*/

        password1 = ParamUtil.getString(actionRequest, "password1");
        password2 = ParamUtil.getString(actionRequest, "password2");
    }

    ServiceContext serviceContext = new ServiceContext();

    User user = UserLocalServiceUtil.addUser(creatorUserId, company.getCompanyId(), autoPassword, password1,
            password2, autoScreenName, screenName, emailAddress, facebookId, openId, locale, firstName,
            middleName, lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
            groupIds, organizationIds, roleIds, userGroupIds, sendEmail, serviceContext);

    user = UserLocalServiceUtil.updateLastLogin(user.getUserId(), user.getLoginIP());

    user = UserLocalServiceUtil.updatePasswordReset(user.getUserId(), false);

    user = UserLocalServiceUtil.updateEmailAddressVerified(user.getUserId(), false);

    ExpandoValueLocalServiceUtil.addValue(company.getCompanyId(), User.class.getName(),
            ExpandoTableConstants.DEFAULT_TABLE_NAME, "linkedinId", user.getUserId(), linkedinId);

    session.setAttribute(LinkedinConstants.LINKEDIN_ID_LOGIN, new Long(user.getUserId()));

    session.removeAttribute(LinkedinConstants.LINKEDIN_LOGIN_PENDING);

    PortletURL portletURL = PortletURLFactoryUtil.create(request, PortletKeys.FAST_LOGIN,
            themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);

    portletURL.setWindowState(LiferayWindowState.POP_UP);
    portletURL.setParameter("struts_action", "/login/login_redirect");

    actionResponse.sendRedirect(portletURL.toString());
}

From source file:com.abubusoft.liferay.twitter.CreateAccountAction.java

License:Open Source License

protected void addUser(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
    HttpServletRequest request = PortalUtil.getHttpServletRequest(actionRequest);
    HttpSession session = request.getSession();

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    Company company = themeDisplay.getCompany();

    long creatorUserId = 0;
    long facebookId = ParamUtil.getLong(actionRequest, "facebookId");
    boolean autoPassword = true;
    boolean autoScreenName = false;
    boolean male = ParamUtil.getBoolean(actionRequest, "male", true);
    boolean sendEmail = true;
    String twitterId = ParamUtil.getString(actionRequest, "twitterId");
    String emailAddress = ParamUtil.getString(actionRequest, "emailAddress");
    String screenName = ParamUtil.getString(actionRequest, "screenName");
    String firstName = ParamUtil.getString(actionRequest, "firstName");
    String lastName = ParamUtil.getString(actionRequest, "lastName");
    String middleName = ParamUtil.getString(actionRequest, "middleName");
    String password1 = StringPool.BLANK;
    String password2 = StringPool.BLANK;
    String jobTitle = ParamUtil.getString(actionRequest, "jobTitle");
    String openId = StringPool.BLANK;
    int birthdayMonth = ParamUtil.getInteger(actionRequest, "birthdayMonth");
    int birthdayDay = ParamUtil.getInteger(actionRequest, "birthdayDay");
    int birthdayYear = ParamUtil.getInteger(actionRequest, "birthdayYear");
    int prefixId = ParamUtil.getInteger(actionRequest, "prefixId");
    int suffixId = ParamUtil.getInteger(actionRequest, "suffixId");
    Locale locale = themeDisplay.getLocale();

    long[] groupIds = null;
    long[] organizationIds = null;
    long[] roleIds = null;
    long[] userGroupIds = null;

    if (GetterUtil.getBoolean(PropsUtil.get(PropsKeys.LOGIN_CREATE_ACCOUNT_ALLOW_CUSTOM_PASSWORD))) {
        autoPassword = false;//from   w  ww .  j ava 2  s.com

        password1 = ParamUtil.getString(actionRequest, "password1");
        password2 = ParamUtil.getString(actionRequest, "password2");
    }

    ServiceContext serviceContext = new ServiceContext();

    User user = UserLocalServiceUtil.addUser(creatorUserId, company.getCompanyId(), autoPassword, password1,
            password2, autoScreenName, screenName, emailAddress, facebookId, openId, locale, firstName,
            middleName, lastName, prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
            groupIds, organizationIds, roleIds, userGroupIds, sendEmail, serviceContext);

    user = UserLocalServiceUtil.updateLastLogin(user.getUserId(), user.getLoginIP());

    user = UserLocalServiceUtil.updatePasswordReset(user.getUserId(), false);

    user = UserLocalServiceUtil.updateEmailAddressVerified(user.getUserId(), false);

    ExpandoValueLocalServiceUtil.addValue(company.getCompanyId(), User.class.getName(),
            ExpandoTableConstants.DEFAULT_TABLE_NAME, TwitterConstants.TWITTER_ID_COLUMN_NAME, user.getUserId(),
            twitterId);

    session.setAttribute(TwitterConstants.TWITTER_ID_LOGIN, new Long(user.getUserId()));

    session.removeAttribute(TwitterConstants.TWITTER_LOGIN_PENDING);

    PortletURL portletURL = PortletURLFactoryUtil.create(request, PortletKeys.FAST_LOGIN,
            themeDisplay.getPlid(), PortletRequest.RENDER_PHASE);

    portletURL.setWindowState(LiferayWindowState.POP_UP);
    portletURL.setParameter("struts_action", "/login/login_redirect");

    actionResponse.sendRedirect(portletURL.toString());
}

From source file:com.amf.registration.portlet.RegistrationPortlet.java

License:Open Source License

public void registrationUser(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {

    ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);

    String username = ParamUtil.getString(actionRequest, "username");
    String firstName = ParamUtil.getString(actionRequest, "first_name");
    String lastName = ParamUtil.getString(actionRequest, "last_name");
    String emailAddress = ParamUtil.getString(actionRequest, "email_address");
    boolean male = ParamUtil.getBoolean(actionRequest, "male", true);
    int birthdayMonth = ParamUtil.getInteger(actionRequest, "birthdayMonth");
    int birthdayDay = ParamUtil.getInteger(actionRequest, "birthdayDay");
    int birthdayYear = ParamUtil.getInteger(actionRequest, "birthdayYear");
    String password1 = ParamUtil.getString(actionRequest, "password1");
    String password2 = ParamUtil.getString(actionRequest, "password2");

    String homePhone = ParamUtil.getString(actionRequest, "home_phone");
    String mobilePhone = ParamUtil.getString(actionRequest, "mobile_phone");

    String address = ParamUtil.getString(actionRequest, "address");
    String address2 = ParamUtil.getString(actionRequest, "address2");
    String city = ParamUtil.getString(actionRequest, "city");
    long stateId = ParamUtil.getLong(actionRequest, "state");
    String zip = ParamUtil.getString(actionRequest, "zip");

    String securityQuestion = ParamUtil.getString(actionRequest, "security_question");
    String securityAnswer = ParamUtil.getString(actionRequest, "security_answer");

    boolean acceptedTou = ParamUtil.getBoolean(actionRequest, "accepted_tou");

    Country country = CountryServiceUtil.getCountryByName(CountryConstants.UNITED_STATES);

    List<ListType> addressTypes = ListTypeServiceUtil.getListTypes(ListTypeConstants.CONTACT_ADDRESS);

    int typeId = 0;

    for (ListType addressType : addressTypes) {
        if (addressType.getName().equals("personal")) {
            typeId = addressType.getListTypeId();

            break;
        }//from ww  w.j a va 2 s .c o m
    }

    ServiceContext serviceContext = ServiceContextFactory.getInstance(User.class.getName(), actionRequest);

    validate(firstName, lastName, emailAddress, username, birthdayMonth, birthdayDay, birthdayYear, password1,
            password2, homePhone, mobilePhone, address, address2, city, zip, securityQuestion, securityAnswer,
            acceptedTou);

    User user = UserLocalServiceUtil.addUser(0, themeDisplay.getCompanyId(), false, password1, password2, false,
            username, emailAddress, 0, null, LocaleUtil.getDefault(), firstName, null, lastName, 0, 0, male,
            birthdayMonth, birthdayDay, birthdayYear, null, null, null, null, null, false, serviceContext);

    UserLocalServiceUtil.updatePasswordReset(user.getUserId(), false);

    UserLocalServiceUtil.updateReminderQuery(user.getUserId(), securityQuestion, securityAnswer);

    UserLocalServiceUtil.updateAgreedToTermsOfUse(user.getUserId(), acceptedTou);

    List<ListType> phoneTypes = ListTypeServiceUtil.getListTypes(ListTypeConstants.CONTACT_PHONE);

    for (ListType phoneType : phoneTypes) {
        if (phoneType.getName().equals("personal") && Validator.isNotNull(homePhone)) {

            PhoneLocalServiceUtil.addPhone(user.getUserId(), Contact.class.getName(), user.getContactId(),
                    homePhone, null, phoneType.getListTypeId(), false);
        } else if (phoneType.getName().equals("mobile-phone") && Validator.isNotNull(mobilePhone)) {

            PhoneLocalServiceUtil.addPhone(user.getUserId(), Contact.class.getName(), user.getContactId(),
                    mobilePhone, null, phoneType.getListTypeId(), false);
        }
    }

    AddressLocalServiceUtil.addAddress(user.getUserId(), Contact.class.getName(), user.getContactId(), address,
            address2, StringPool.BLANK, city, zip, stateId, country.getCountryId(), typeId, false, true);

    EventMonitorLocalServiceUtil.addEvent(user.getCompanyId(), user.getUserId(), user.getScreenName(),
            EventTypeConstants.REGISTRATION, IpConstants.DEFAULT);
}

From source file:com.amf.registration.registration.portlet.AMFRegistrationPortlet.java

License:Open Source License

public void addUser(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {

    String firstName = ParamUtil.getString(actionRequest, "first_name");
    String lastName = ParamUtil.getString(actionRequest, "last_name");
    String emailAddress = ParamUtil.getString(actionRequest, "email_address");
    String userName = ParamUtil.getString(actionRequest, "username");
    boolean male = ParamUtil.getBoolean(actionRequest, "male");
    int birthdayMonth = ParamUtil.getInteger(actionRequest, "b_Month");
    int birthdayDay = ParamUtil.getInteger(actionRequest, "b_Day");
    int birthdayYear = ParamUtil.getInteger(actionRequest, "b_Year");
    String password1 = ParamUtil.getString(actionRequest, "password1");
    String password2 = ParamUtil.getString(actionRequest, "password2");
    String homePhone = ParamUtil.getString(actionRequest, "home_phone");
    String mobilePhone = ParamUtil.getString(actionRequest, "mobile_phone");
    String address1 = ParamUtil.getString(actionRequest, "address");
    String address2 = ParamUtil.getString(actionRequest, "address2");
    String city = ParamUtil.getString(actionRequest, "city");
    long stateId = ParamUtil.getLong(actionRequest, "state");
    String zip = ParamUtil.getString(actionRequest, "zip");

    String securityQuestion = ParamUtil.getString(actionRequest, "security_question");
    String securityAnswer = ParamUtil.getString(actionRequest, "security_answer");
    boolean termsOfUse = ParamUtil.getBoolean(actionRequest, "accepted_tou");

    ServiceContext serviceContext = ServiceContextFactory.getInstance(User.class.getName(), actionRequest);

    validate(firstName, lastName, emailAddress, userName, birthdayMonth, birthdayDay, birthdayYear, password1,
            homePhone, mobilePhone, address1, address2, city, zip, securityAnswer, termsOfUse);

    User user = UserLocalServiceUtil.addUserWithWorkflow(0, serviceContext.getCompanyId(), false, password1,
            password2, false, userName, emailAddress, 0, StringPool.BLANK, LocaleUtil.getDefault(), firstName,
            StringPool.BLANK, lastName, 0, 0, male, birthdayMonth, birthdayDay, birthdayYear, StringPool.BLANK,
            null, null, null, null, false, serviceContext);

    addPhones(homePhone, mobilePhone, user);

    addAddress(address1, address2, city, stateId, zip, user);

    UserLocalServiceUtil.updateReminderQuery(user.getUserId(), securityQuestion, securityAnswer);

    UserLocalServiceUtil.updateAgreedToTermsOfUse(user.getUserId(), termsOfUse);

    // Monitor/*w ww . ja va 2s  .  co  m*/

    MonitorEventLocalServiceUtil.addEvent(user.getUserId(), "0.0.0.0", MonitorEventTypes.REGISTRATION,
            serviceContext);
}

From source file:com.beorn.onlinepayment.portlet.AdminPortlet.java

License:Open Source License

public void editRulesPriority(ActionRequest actionRequest, ActionResponse actionResponse)
        throws PortletException, IOException {
    try {/*w  ww.j a va 2 s  .c  om*/
        ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
        PermissionChecker permissionChecker = themeDisplay.getPermissionChecker();

        long sellerId = ParamUtil.getLong(actionRequest, "sellerId");

        SellerPermission.check(permissionChecker, sellerId, ActionKeys.UPDATE);

        ServiceContext serviceContext = ServiceContextFactory.getInstance(Rule.class.getName(), actionRequest);

        for (Rule rule : RuleLocalServiceUtil.getSellerRules(sellerId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
                null)) {

            int priority = ParamUtil.getInteger(actionRequest, "rulePriority_" + rule.getRuleId());

            RuleLocalServiceUtil.updateRule(rule.getRuleId(), rule.getPaymentPluginConfigId(),
                    rule.getContent(), priority, serviceContext);
        }

        SessionMessages.add(actionRequest, "edit-rules-priority.success");

    } catch (Exception e) {
        _log.error(e);
        actionResponse.setRenderParameters(actionRequest.getParameterMap());
        SessionErrors.add(actionRequest, e.getClass().getName());
    }
}

From source file:com.commsen.liferay.examples.portlet.servicebuilder.JSPPortlet.java

License:Open Source License

@ProcessAction(name = Constants.ADD)
public void addPlayer(ActionRequest actionRequest, ActionResponse actionResponse)
        throws PortletException, IOException {
    String name = ParamUtil.getString(actionRequest, "name");
    boolean active = ParamUtil.getBoolean(actionRequest, "active");
    int score = ParamUtil.getInteger(actionRequest, "score");
    String description = ParamUtil.getString(actionRequest, "description");
    int year = ParamUtil.getInteger(actionRequest, "birthday_year");
    int month = ParamUtil.getInteger(actionRequest, "birthday_month");
    int day = ParamUtil.getInteger(actionRequest, "birthday_day");

    Calendar calendar = Calendar.getInstance();
    calendar.set(Calendar.YEAR, year);
    calendar.set(Calendar.MONTH, month);
    calendar.set(Calendar.DAY_OF_MONTH, day);

    try {//from  w ww .  java2  s .  c  o m
        PlayerLocalServiceUtil.addPlayer(name, active, score, calendar.getTime(), description);
    } catch (Exception e) {
        throw new PortletException("Failed to add player", e);
    }
}

From source file:com.crm.kernel.search.BaseDisplayTerms.java

License:Open Source License

protected void init(PortletRequest portletRequest, boolean dateRange) {
    // default search field
    type = ParamUtil.getString(portletRequest, TYPE);
    code = ParamUtil.getString(portletRequest, CODE);
    title = ParamUtil.getString(portletRequest, TITLE);

    orderType = ParamUtil.getString(portletRequest, ORDER_TYPE);
    actionType = ParamUtil.getString(portletRequest, ACTION_TYPE);
    workOrderType = ParamUtil.getString(portletRequest, WORK_ORDER_TYPE);
    installType = ParamUtil.getString(portletRequest, INSTALL_TYPE);
    deliveryType = ParamUtil.getString(portletRequest, DELIVERY_TYPE);
    addressType = ParamUtil.getString(portletRequest, ADDRESS_TYPE);
    paymentType = ParamUtil.getString(portletRequest, PAYMENT_TYPE);
    channel = ParamUtil.getString(portletRequest, CHANNEL);
    priority = ParamUtil.getString(portletRequest, PRIORITY);

    name = ParamUtil.getString(portletRequest, NAME);
    consumerType = ParamUtil.getString(portletRequest, CONSUMER_TYPE);
    idNo = ParamUtil.getString(portletRequest, ID_NO);
    territoryCode = ParamUtil.getString(portletRequest, TERRITORY_CODE);
    streetCode = ParamUtil.getString(portletRequest, STREET_CODE);
    territoryType = ParamUtil.getString(portletRequest, TERRITORY_TYPE);
    address = ParamUtil.getString(portletRequest, ADDRESS);
    telephone = ParamUtil.getString(portletRequest, TELEPHONE);
    emailAddress = ParamUtil.getString(portletRequest, EMAIL_ADDRESS);

    productId = ParamUtil.getLong(portletRequest, PRODUCT_ID);
    campaignId = ParamUtil.getLong(portletRequest, CAMPAIGN_ID);
    segmentId = ParamUtil.getLong(portletRequest, SEGMENT_ID);
    rankId = ParamUtil.getLong(portletRequest, RANK_ID);
    taskId = ParamUtil.getLong(portletRequest, TASK_ID);
    workflowId = ParamUtil.getLong(portletRequest, WORKFLOW_ID);
    feeId = ParamUtil.getLong(portletRequest, FEE_ID);
    bankId = ParamUtil.getLong(portletRequest, BANK_ID);
    provisioningId = ParamUtil.getLong(portletRequest, PROVISIONING_ID);
    commandId = ParamUtil.getLong(portletRequest, COMMAND_ID);

    isdn = ParamUtil.getString(portletRequest, ISDN);
    iccid = ParamUtil.getString(portletRequest, ICCID);
    imsi = ParamUtil.getString(portletRequest, IMSI);
    loginId = ParamUtil.getString(portletRequest, LOGIN_ID);

    customerId = ParamUtil.getLong(portletRequest, CUSTOMER_ID);
    subscriberId = ParamUtil.getLong(portletRequest, SUBSCRIBER_ID);
    erpCode = ParamUtil.getString(portletRequest, ERP_CODE);
    taxId = ParamUtil.getString(portletRequest, TAX_ID);
    bankAccount = ParamUtil.getString(portletRequest, BANK_ACCOUNT);
    customerType = ParamUtil.getString(portletRequest, CUSTOMER_TYPE);
    subscriberType = ParamUtil.getString(portletRequest, SUBSCRIBER_TYPE);
    productType = ParamUtil.getString(portletRequest, PRODUCT_TYPE);
    provisioningType = ParamUtil.getString(portletRequest, PROVISIONING_TYPE);

    // stock search field
    serialNo = ParamUtil.getString(portletRequest, SERIAL_NO);
    mac = ParamUtil.getString(portletRequest, MAC);

    // other search field
    fromQuantity = ParamUtil.getInteger(portletRequest, FROM_QUANTITY);
    toQuantity = ParamUtil.getInteger(portletRequest, TO_QUANTITY);
    fromAmount = ParamUtil.getInteger(portletRequest, FROM_AMOUNT);
    toAmount = ParamUtil.getInteger(portletRequest, TO_AMOUNT);
    fromScore = ParamUtil.getInteger(portletRequest, FROM_SCORE);
    toScore = ParamUtil.getInteger(portletRequest, TO_SCORE);

    reasonId = ParamUtil.getLong(portletRequest, REASON_ID);
    status = ParamUtil.getInteger(portletRequest, STATUS);

    // search date range
    if (dateRange) {
        dateType = ParamUtil.getString(portletRequest, DATE_TYPE);
        dateField = ParamUtil.getString(portletRequest, DATE_FIELD);

        try {//from   w ww.  j  a  v  a  2 s .c om
            startDate = DateTimeUtil.getDate(portletRequest, START_DATE);
            endDate = DateTimeUtil.getDate(portletRequest, END_DATE);
        } catch (Exception e) {
            Calendar calendar = Calendar.getInstance();

            startDate = calendar.getTime();
            endDate = calendar.getTime();
        } finally {

        }

        if ((startDate != null) && (endDate != null)) {
            if (DateTimeUtil.truncDate(startDate).compareTo(DateTimeUtil.truncDate(endDate)) == 0) {
                Calendar calendar = Calendar.getInstance();

                calendar.setTime(endDate);
                calendar.add(Calendar.DATE, 1);

                endDate = calendar.getTime();
            }
        }
    }
}