Example usage for java.lang Boolean toString

List of usage examples for java.lang Boolean toString

Introduction

In this page you can find the example usage for java.lang Boolean toString.

Prototype

public String toString() 

Source Link

Document

Returns a String object representing this Boolean's value.

Usage

From source file:eu.optimis.sm.gui.server.ServiceManagerWebServiceImpl.java

public String redeployService(String sess_id, String serviceID, boolean keepData) {

    logger.info("undeployService: sess_id = " + sess_id);
    logger.info("undeployService: session_id = " + session_ids);
    String res = checkSession(sess_id);
    if (res != null)
        return res;

    String port; // = "optimis-spvm.atosorigin.es";
    String host; // = "8080";
    host = SM_URL;//from ww  w  . j  ava2  s.c om
    port = SM_PORT; //"8080";

    String redeployedReturnedValue = "null";
    Boolean redeployedReturnedValue0 = null;

    logger.info("Undeploying service:");
    logger.info("serviceId = " + serviceID + "; keepData=" + keepData);

    ServiceManagerClient smRESTClient = new ServiceManagerClient(host, port);
    try {
        redeployedReturnedValue0 = smRESTClient.redeploy(serviceID, keepData);
        redeployedReturnedValue = redeployedReturnedValue0.toString();
    } catch (Exception ex) {
        logger.info("Service not found!");
        logger.info(ex.toString());
        redeployedReturnedValue = redeployedReturnedValue + "; Caught exception: " + ex.toString();
    }
    redeployedReturnedValue = redeployedReturnedValue + " \n(keepData = " + keepData + ")";
    logger.info("undeployedReturnedValue = " + redeployedReturnedValue);

    return redeployedReturnedValue;
}

From source file:eu.optimis.sm.gui.server.ServiceManagerWebServiceImpl.java

public String undeployService(String sess_id, String serviceID, boolean keepData) {

    logger.info("undeployService: sess_id = " + sess_id);
    logger.info("undeployService: session_id = " + session_ids);

    String res = checkSession(sess_id);
    if (res != null)
        return res;

    String port; // = "optimis-spvm.atosorigin.es";
    String host; // = "8080";
    host = SM_URL;//from w  w  w .j ava 2s.  c om
    port = SM_PORT; //"8080";

    String undeployedReturnedValue = "null";
    Boolean undeployedReturnedValue0 = null;

    logger.info("Undeploying service:");
    logger.info("serviceId = " + serviceID + "; keepData=" + keepData);

    ServiceManagerClient smRESTClient = new ServiceManagerClient(host, port);
    try {
        undeployedReturnedValue0 = smRESTClient.undeploy(serviceID, keepData);
        undeployedReturnedValue = undeployedReturnedValue0.toString();
    } catch (Exception ex) {
        logger.info("Service not found!");
        logger.info(ex.toString());
        undeployedReturnedValue = undeployedReturnedValue + "; Caught exception: " + ex.toString();
    }
    undeployedReturnedValue = undeployedReturnedValue + " \n(keepData = " + keepData + ")";
    logger.info("undeployedReturnedValue = " + undeployedReturnedValue);

    return undeployedReturnedValue;
}

From source file:fr.gouv.culture.vitam.eml.PstExtract.java

private Element extractInfoAppointment(PSTAppointment appointment) {
    Element root = XmlDom.factory.createElement("appointment");

    String value = null;// w  w  w .j a  v a  2  s .  co  m

    value = appointment.getLocation();
    if (value != null && !value.isEmpty()) {
        root.add(XmlDom.factory.createElement("Location").addText(value));
    }
    Date date = appointment.getStartTime();
    if (date != null) {
        root.add(XmlDom.factory.createElement("StartTime").addText(date.toString()));
    }
    PSTTimeZone zone = appointment.getStartTimeZone();
    if (zone != null) {
        root.add(XmlDom.factory.createElement("StartTimeZone").addText(TZString(zone)));
    }
    date = appointment.getEndTime();
    if (date != null) {
        root.add(XmlDom.factory.createElement("EndTime").addText(date.toString()));
    }
    zone = appointment.getEndTimeZone();
    if (zone != null) {
        root.add(XmlDom.factory.createElement("EndTimeZone").addText(TZString(zone)));
    }
    zone = appointment.getRecurrenceTimeZone();
    if (zone != null) {
        root.add(XmlDom.factory.createElement("RecurrenceTimeZone").addText(TZString(zone)));
    }
    Integer ival = appointment.getDuration();
    root.add(XmlDom.factory.createElement("Duration").addText(ival.toString()));
    ival = appointment.getMeetingStatus();
    root.add(XmlDom.factory.createElement("MeetingStatus").addText(ival.toString()));
    ival = appointment.getResponseStatus();
    root.add(XmlDom.factory.createElement("ResponseStatus").addText(ival.toString()));
    Boolean bval = appointment.isRecurring();
    root.add(XmlDom.factory.createElement("isRecurring").addText(bval.toString()));
    date = appointment.getRecurrenceBase();
    if (date != null) {
        root.add(XmlDom.factory.createElement("RecurrenceBase").addText(date.toString()));
    }
    ival = appointment.getRecurrenceType();
    root.add(XmlDom.factory.createElement("RecurrenceType").addText(ival.toString()));
    value = appointment.getRecurrencePattern();
    if (value != null && !value.isEmpty()) {
        root.add(XmlDom.factory.createElement("RecurrencePattern").addText(value));
    }
    value = appointment.getAllAttendees();
    if (value != null && !value.isEmpty()) {
        root.add(XmlDom.factory.createElement("AllAttendees").addText(value));
    }
    value = appointment.getToAttendees();
    if (value != null && !value.isEmpty()) {
        root.add(XmlDom.factory.createElement("ToAttendees").addText(value));
    }
    value = appointment.getCCAttendees();
    if (value != null && !value.isEmpty()) {
        root.add(XmlDom.factory.createElement("CCAttendees").addText(value));
    }
    ival = appointment.getAppointmentSequence();
    root.add(XmlDom.factory.createElement("AppointmentSequence").addText(ival.toString()));

    // online meeting properties
    bval = appointment.isOnlineMeeting();
    if (bval) {
        root.add(XmlDom.factory.createElement("isOnlineMeeting").addText(bval.toString()));
        ival = appointment.getNetMeetingType();
        root.add(XmlDom.factory.createElement("NetMeetingType").addText(ival.toString()));
        value = appointment.getNetMeetingServer();
        if (value != null && !value.isEmpty()) {
            root.add(XmlDom.factory.createElement("NetMeetingServer").addText(value));
        }
        value = appointment.getNetMeetingOrganizerAlias();
        if (value != null && !value.isEmpty()) {
            root.add(XmlDom.factory.createElement("NetMeetingOrganizerAlias").addText(value));
        }
        bval = appointment.getNetMeetingAutostart();
        root.add(XmlDom.factory.createElement("NetMeetingAutostart").addText(bval.toString()));
        bval = appointment.getConferenceServerAllowExternal();
        root.add(XmlDom.factory.createElement("ConferenceServerAllowExternal").addText(bval.toString()));
        value = appointment.getNetMeetingDocumentPathName();
        if (value != null && !value.isEmpty()) {
            root.add(XmlDom.factory.createElement("NetMeetingDocumentPathName").addText(value));
        }
        value = appointment.getNetShowURL();
        if (value != null && !value.isEmpty()) {
            root.add(XmlDom.factory.createElement("NetShowURL").addText(value));
        }
        date = appointment.getAttendeeCriticalChange();
        if (date != null) {
            root.add(XmlDom.factory.createElement("AttendeeCriticalChange").addText(date.toString()));
        }
        date = appointment.getOwnerCriticalChange();
        if (date != null) {
            root.add(XmlDom.factory.createElement("OwnerCriticalChange").addText(date.toString()));
        }
        value = appointment.getConferenceServerPassword();
        if (value != null && !value.isEmpty()) {
            root.add(XmlDom.factory.createElement("ConferenceServerPassword").addText(value));
        }
        bval = appointment.getAppointmentCounterProposal();
        root.add(XmlDom.factory.createElement("AppointmentCounterProposal").addText(bval.toString()));
        bval = appointment.isSilent();
        root.add(XmlDom.factory.createElement("isSilent").addText(bval.toString()));
        value = appointment.getRequiredAttendees();
        if (value != null && !value.isEmpty()) {
            root.add(XmlDom.factory.createElement("RequiredAttendees").addText(value));
        }
    }
    return root;
}

From source file:org.openstack.burrow.backend.http.BaseHttp.java

/**
 * Generates a List of Name/Value Pairs for a DeleteMessages to be carried out
 * /*from ww w  .  j ava2 s.  com*/
 * @param request A DeleteMessages object
 * @return A List of Name/Value Pairs
 */
private List<NameValuePair> getQueryParameters(DeleteMessages request) {
    String marker = request.getMarker();
    Long limit = request.getLimit();
    Boolean matchHidden = request.getMatchHidden();
    String detail = request.getDetail();
    Long wait = request.getWait();
    if ((marker != null) || (limit != null) || (matchHidden != null) || (detail != null) || (wait != null)) {
        List<NameValuePair> params = new ArrayList<NameValuePair>(5);
        if (marker != null)
            params.add(new BasicNameValuePair("marker", marker));
        if (limit != null)
            params.add(new BasicNameValuePair("limit", limit.toString()));
        if (matchHidden != null)
            params.add(new BasicNameValuePair("match_hidden", matchHidden.toString()));
        if (detail != null)
            params.add(new BasicNameValuePair("detail", detail));
        if (wait != null)
            params.add(new BasicNameValuePair("wait", wait.toString()));
        return params;
    } else {
        return null;
    }
}

From source file:org.openstack.burrow.backend.http.BaseHttp.java

/**
 * Generates a List of Name/Value Pairs for a GetMessages to be carried out
 * //from  w  ww . ja  va2 s.  c  o m
 * @param request A GetMessages object
 * @return A List of Name/Value Pairs
 */
private List<NameValuePair> getQueryParameters(GetMessages request) {
    String marker = request.getMarker();
    Long limit = request.getLimit();
    Boolean matchHidden = request.getMatchHidden();
    String detail = request.getDetail();
    Long wait = request.getWait();
    if ((marker != null) || (limit != null) || (matchHidden != null) || (detail != null) || (wait != null)) {
        List<NameValuePair> params = new ArrayList<NameValuePair>(5);
        if (marker != null)
            params.add(new BasicNameValuePair("marker", marker));
        if (limit != null)
            params.add(new BasicNameValuePair("limit", limit.toString()));
        if (matchHidden != null)
            params.add(new BasicNameValuePair("match_hidden", matchHidden.toString()));
        if (detail != null)
            params.add(new BasicNameValuePair("detail", detail));
        if (wait != null)
            params.add(new BasicNameValuePair("wait", wait.toString()));
        return params;
    } else {
        return null;
    }
}

From source file:com.citrix.cpbm.portal.fragment.controllers.AbstractUsersController.java

/**
 * Validates for max custom spend alerts
 * /*from  w  w  w.  j a va 2 s  .  c o m*/
 * @param id
 * @return String
 */
@RequestMapping(value = "/subscribe/verify_max_subscriptions")
@ResponseBody
public String verifyMaxSubscription(
        @RequestParam(value = "projectMembershipId", required = false) final String id,
        @RequestParam(value = "tenantId", required = false) String tenantId) {
    logger.debug("In verifyMaxSubscription() method start and projectMembershipId is : " + id);
    Boolean result = notificationService.verifyMaxSubscription(id, tenantId, getCurrentUser());
    return result.toString();
}

From source file:erainformatica.tbjhelper.helpers.TelegramBot.java

private TelegramRequestResult<Message> sendMessageUniversal(Integer chat_id, String text, String parse_mode,
        Boolean disable_web_page_preview, Integer reply_to_message_id, Object reply_markup) {
    if (api_key == null || "".equals(api_key)) {
        return new TelegramRequestResult<>(false, "Token not valid", null);
    } else if (reply_markup != null
            && !reply_markup.getClass().getName().equals(ReplyKeyboardMarkup.class.getName())
            && !reply_markup.getClass().getName().equals(ReplyKeyboardHide.class.getName())
            && !reply_markup.getClass().getName().equals(ForceReply.class.getName())) {
        return new TelegramRequestResult<>(false, "reply_markup not valid", null);
    } else {/*from w w  w  . j a v  a2s  .  c  om*/
        Message msg = null;
        if (chat_id == null || text == null)
            return new TelegramRequestResult<>(false, "chat_id and text required", null);
        else {
            HashMap<String, String> params = new HashMap();
            params.put("chat_id", chat_id.toString());
            params.put("text", text);
            if (disable_web_page_preview != null)
                params.put("disable_web_page_preview", disable_web_page_preview.toString());
            if (parse_mode != null)
                params.put("parse_mode", parse_mode);
            if (reply_to_message_id != null)
                params.put("reply_to_message_id", reply_to_message_id.toString());
            if (reply_markup != null) {
                params.put("reply_markup", new JSONObject(reply_markup).toString());
            }
            String url = Utility.buildAPIUrl(this.api_key, TelegramBot.API_OPERATION_SEND_MESSAGE, params);
            TelegramRequestResult<JSONObject> result = JSONHelper.readJsonFromUrl(url);
            if (result.isRequestOk()) {
                JSONObject r = result.get();
                if (r.getBoolean("ok") == true) {
                    msg = (Message) Utility.castJsonToObject(r.getJSONObject("result").toString(),
                            TelegramBot.TYPE_MESSAGE);
                    if (msg != null)
                        return new TelegramRequestResult<>(true, null, msg);
                    else
                        return new TelegramRequestResult<>(false, "No result", null);
                } else {
                    return new TelegramRequestResult<>(false, result.get().getString("description"), null);
                }
            } else {
                return new TelegramRequestResult<>(false, result.getError(), null);
            }
        }
    }
}

From source file:it.cg.main.process.mapping.easyway.MapperProductAssetToPASS.java

/**
 * Metodo custom di quoteDtoToAsset/*  w w w.java  2 s.  c  o m*/
 * @param quote
 * @return
 */
public List<WsAssetInstance> quoteToWsAssetInstance(Quote quote) {
    List<WsAssetInstance> listAssetInstResponse = new ArrayList<WsAssetInstance>();
    WsAssetInstance assetInstanceResponse = new WsAssetInstance();
    MapperUtilityToPASS mapForOtherVehicle = new MapperUtilityToPASS();

    boolean isVehicleMopedMotorbike = isVehicleMopedMotorbike(quote.getContext().getRiskType());
    boolean isOtherVehicleEmpty = mapForOtherVehicle.isOtherVehicleEmpty(quote);

    logger.debug("quoteToWsAssetInstance isOtherVehicleEmpty:" + isOtherVehicleEmpty);

    //      factor 2Loyal and lastYears 3 and 6
    MapperHashmapUtilitiesToPASS mapUty = new MapperHashmapUtilitiesToPASS();

    String loyalCode = mapUty.get2Loyal(quote.getRatingInfo().getCompanyChangesDetails());
    WsFactor factorToAdd2Loyal = new WsFactor();
    factorToAdd2Loyal.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2LOYAL.value());
    factorToAdd2Loyal.setValue(loyalCode);
    assetInstanceResponse.getFactors().add(factorToAdd2Loyal);
    logger.debug("quoteToWsAssetInstance add factor : quote.getRatingInfo().getCompanyChangesDetails() = "
            + quote.getRatingInfo().getCompanyChangesDetails() + " --> (mapped) --> "
            + factorToAdd2Loyal.getCode() + " = " + factorToAdd2Loyal.getValue() + " ");

    String last3YearsCode = mapUty.getLast3Years(quote.getRatingInfo().getLast3YearsAggregatedClaims());
    WsFactor factorToAddLast3Years = new WsFactor();
    factorToAddLast3Years.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2SIN3.value());
    factorToAddLast3Years.setValue(last3YearsCode);
    assetInstanceResponse.getFactors().add(factorToAddLast3Years);
    logger.debug("quoteToWsAssetInstance add factor : quote.getRatingInfo().getLast3YearsAggregatedClaims() = "
            + quote.getRatingInfo().getLast3YearsAggregatedClaims() + " --> (mapped) --> "
            + factorToAddLast3Years.getCode() + " = " + factorToAddLast3Years.getValue() + "");

    String last6YearsCode = mapUty.getLast6Years(quote.getRatingInfo().getAggregatedClaims());
    WsFactor factorToAddLast6Years = new WsFactor();
    factorToAddLast6Years.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2SIN6.value());
    factorToAddLast6Years.setValue(last6YearsCode);
    assetInstanceResponse.getFactors().add(factorToAddLast6Years);
    logger.debug("quoteToWsAssetInstance add factor : quote.getRatingInfo().getAggregatedClaims() = "
            + quote.getRatingInfo().getAggregatedClaims() + " --> (mapped) --> "
            + factorToAddLast6Years.getCode() + " = " + factorToAddLast6Years.getValue() + " ");

    List<WsFactor> factAsset = new ArrayList<WsFactor>();
    WsFactor wsFactor = new WsFactor();

    if (quote.getNumberOfClaimsInLastYear() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_SXTOT.value());
        wsFactor.setValue(quote.getNumberOfClaimsInLastYear().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getNumberOfClaimsInLastYear()" + " = "
                + quote.getNumberOfClaimsInLastYear() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getUsualDriverOwnerRelationship() != null
            && quote.getUsualDriverOwnerRelationship().getWrapperCode() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2ROWMD.value());
        wsFactor.setValue(quote.getUsualDriverOwnerRelationship().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getUsualDriverOwnerRelationship()" + " = "
                + quote.getUsualDriverOwnerRelationship() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getVehicle() != null && quote.getVehicle().getPreviousVehicleAgeInMonth() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2MIMM.value());
        wsFactor.setValue(quote.getVehicle().getPreviousVehicleAgeInMonth().toString());
        logger.debug(
                "quoteToWsAssetInstance add factor : " + "quote.getVehicle().getPreviousVehicleAgeInMonth()"
                        + " = " + quote.getVehicle().getPreviousVehicleAgeInMonth() + " --> "
                        + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getBmalType() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2BERS.value());
        wsFactor.setValue(quote.getBmalType().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getBmalType()" + " = "
                + quote.getBmalType() + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getVehicle() != null && quote.getVehicle().getVehicleAge() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2ETAV.value());
        wsFactor.setValue(quote.getVehicle().getVehicleAge().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getVehicleAge()" + " = "
                + quote.getVehicle().getVehicleAge() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getVehicle() != null && quote.getVehicle().getHabitualUse() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2USOVE.value());
        wsFactor.setValue(quote.getVehicle().getHabitualUse().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getHabitualUse()" + " = "
                + quote.getVehicle().getHabitualUse() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getVehicle() != null && quote.getVehicle().getCarAgeAtPurchase() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2EVACQ.value());
        wsFactor.setValue(quote.getVehicle().getCarAgeAtPurchase().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getCarAgeAtPurchase()" + " = "
                + quote.getVehicle().getCarAgeAtPurchase() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getNumberOfVehiclesOwned() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2ANUCF.value());
        wsFactor.setValue(quote.getNumberOfVehiclesOwned().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getNumberOfVehiclesOwned()" + " = "
                + quote.getNumberOfVehiclesOwned() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getRatingInfo().getMajorClassA() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2PRIMC.value());
        wsFactor.setValue(quote.getRatingInfo().getMajorClassA());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getRatingInfo().getMajorClassA()" + " = "
                + quote.getRatingInfo().getMajorClassA() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getGoodDriverClass() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2BM.value());
        wsFactor.setValue(quote.getGoodDriverClass().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getGoodDriverClass()" + " = "
                + quote.getGoodDriverClass() + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (!isOtherVehicleEmpty) {
        if (quote.getOtherVehicle().getBmClass() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2CU.value());
            wsFactor.setValue(quote.getOtherVehicle().getBmClass());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getOtherVehicle().getBmClass()" + " = "
                    + quote.getOtherVehicle().getBmClass() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
            factAsset.add(wsFactor);
        }
    } else if (quote.getInnerClass() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2CU.value());
        wsFactor.setValue(quote.getInnerClass());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getInnerClass()" + " = "
                + quote.getInnerClass() + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getDriverNumber() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2NDRIV.value());
        wsFactor.setValue(quote.getDriverNumber().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getDriverNumber()" + " = "
                + quote.getDriverNumber() + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getFnb() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2RINNB.value());
        wsFactor.setValue(quote.getFnb().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getFnb()" + " = " + quote.getFnb()
                + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getClean5() != null || quote.getClaimsInLast5YearInner() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_3CLIN5.value());
        if (isVehicleMopedMotorbike) {
            String claimsInLast5YearsInner = quote.getClaimsInLast5YearInner() ? "false" : "true";
            wsFactor.setValue(claimsInLast5YearsInner);
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getClaimsInLast5YearInner()" + " = "
                    + quote.getClaimsInLast5YearInner() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
        } else {
            wsFactor.setValue(quote.getClean5().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getClean5()" + " = "
                    + quote.getClean5() + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        }
        factAsset.add(wsFactor);
    }

    if (quote.getClean1() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_3CLIN1.value());

        Boolean inverseClean1 = !quote.getClean1();
        wsFactor.setValue(inverseClean1.toString());

        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getClean1()" + " = " + quote.getClean1()
                + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getTechnicalData() != null
            && quote.getVehicle().getTechnicalData().getMakerId() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2CMAR.value());
        wsFactor.setValue(quote.getVehicle().getTechnicalData().getMakerId());
        logger.debug(
                "quoteToWsAssetInstance add factor : " + "quote.getVehicle().getTechnicalData().getMakerId()"
                        + " = " + quote.getVehicle().getTechnicalData().getMakerId() + " --> "
                        + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getTechnicalData() != null
            && quote.getVehicle().getTechnicalData().getType() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2RROAD.value());
        wsFactor.setValue(quote.getVehicle().getTechnicalData().getType().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getTechnicalData().getType()"
                + " = " + quote.getVehicle().getTechnicalData().getType() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getTechnicalData() != null
            && quote.getVehicle().getTechnicalData().getModelId() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2CMOD.value());
        wsFactor.setValue(quote.getVehicle().getTechnicalData().getModelId());
        logger.debug(
                "quoteToWsAssetInstance add factor : " + "quote.getVehicle().getTechnicalData().getModelId()"
                        + " = " + quote.getVehicle().getTechnicalData().getModelId() + " --> "
                        + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getTechnicalData() != null
            && quote.getVehicle().getTechnicalData().getKw() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2KW.value());
        wsFactor.setValue(quote.getVehicle().getTechnicalData().getKw().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getTechnicalData().getKw()"
                + " = " + quote.getVehicle().getTechnicalData().getKw() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getInsuredValue() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2VVAL.value());
        wsFactor.setValue(quote.getVehicle().getInsuredValue().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getInsuredValue()" + " = "
                + quote.getVehicle().getInsuredValue() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getLeasingType() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2TVINC.value());
        wsFactor.setValue(quote.getVehicle().getLeasingType().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getLeasingType()" + " = "
                + quote.getVehicle().getLeasingType() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getMatriculationYear() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2APIMM.value());
        wsFactor.setValue(quote.getVehicle().getMatriculationYear().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getMatriculationYear()"
                + " = " + quote.getVehicle().getMatriculationYear() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getAntitheftType() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2ANTIF.value());
        wsFactor.setValue(quote.getVehicle().getAntitheftType().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getAntitheftType()" + " = "
                + quote.getVehicle().getAntitheftType() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (quote.getVehicle() != null && quote.getVehicle().getTechnicalData() != null) {
        if (quote.getVehicle().getTechnicalData().getBodyType() != null
                && quote.getVehicle().getTechnicalData().getBodyType().getWrapperCode() != null) {
            wsFactor = new WsFactor();
            String factorCode = null;
            if (quote.getContext().getRiskType().equals(EnumRiskType.CAR)) {
                factorCode = ENUMInternalAssetInstanceFactors.FACTOR_2TICAR.value();
            } else if (quote.getContext().getRiskType().equals(EnumRiskType.MOPED)
                    || quote.getContext().getRiskType().equals(EnumRiskType.MOTORBIKE)) {
                factorCode = ENUMInternalAssetInstanceFactors.FACTOR_2BOMBK.value();
            }

            if (factorCode != null) {
                wsFactor.setCode(factorCode);
                wsFactor.setValue(
                        quote.getVehicle().getTechnicalData().getBodyType().getWrapperCode().toString());
                logger.debug("quoteToWsAssetInstance add factor : "
                        + "quote.getVehicle().getTechnicalData().getBodyType()" + " = "
                        + quote.getVehicle().getTechnicalData().getBodyType() + " --> " + wsFactor.getCode()
                        + " = " + wsFactor.getValue());
                factAsset.add(wsFactor);
            }
        }
        if (quote.getVehicle().getTechnicalData().getTheftAndFireRiskClass() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2MKMDL.value());
            wsFactor.setValue(quote.getVehicle().getTechnicalData().getTheftAndFireRiskClass().toString());
            logger.debug("quoteToWsAssetInstance add factor : "
                    + "quote.getVehicle().getTechnicalData().getTheftAndFireRiskClass()" + " = "
                    + quote.getVehicle().getTechnicalData().getTheftAndFireRiskClass() + " --> "
                    + wsFactor.getCode() + " = " + wsFactor.getValue());
            factAsset.add(wsFactor);
        }

        if (quote.getVehicle().getTechnicalData().getAirbagType() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2NAIRB.value());
            wsFactor.setValue(
                    quote.getVehicle().getTechnicalData().getAirbagType().getWrapperCode().toString());
            logger.debug("quoteToWsAssetInstance add factor : "
                    + "quote.getVehicle().getTechnicalData().getAirbagType()" + " = "
                    + quote.getVehicle().getTechnicalData().getAirbagType() + " --> " + wsFactor.getCode()
                    + " = " + wsFactor.getValue());
            factAsset.add(wsFactor);
        }
        if (quote.getVehicle().getShelterType() != null
                && quote.getVehicle().getShelterType().getWrapperCode() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2PARKN.value());
            wsFactor.setValue(quote.getVehicle().getShelterType().getWrapperCode().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getShelterType()" + " = "
                    + quote.getVehicle().getShelterType() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
            factAsset.add(wsFactor);
        }
        if (quote.getVehicle().getKmPerYear() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2KMAN.value());
            wsFactor.setValue(quote.getVehicle().getKmPerYear().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getVehicle().getKmPerYear()" + " = "
                    + quote.getVehicle().getKmPerYear() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
            factAsset.add(wsFactor);
        }
    }

    if (quote.getRatingInfo() != null) {
        if (quote.getRatingInfo().getPromocode() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2PROMC.value());
            wsFactor.setValue(quote.getRatingInfo().getPromocode().getWrapperCode().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getRatingInfo().getPromocode()" + " = "
                    + quote.getRatingInfo().getPromocode() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
            factAsset.add(wsFactor);
        }
        if (quote.getRatingInfo().getRegressionClass() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2REGRE.value());
            wsFactor.setValue(quote.getRatingInfo().getRegressionClass().getWrapperCode().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getRatingInfo().getRegressionClass()"
                    + " = " + quote.getRatingInfo().getRegressionClass() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
            factAsset.add(wsFactor);
        }
    }
    if (quote.getContext().getSection() != null && quote.getContext().getSection().getWrapperCode() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2TIPGU.value());
        wsFactor.setValue(quote.getContext().getSection().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getContext().getSection()" + " = "
                + quote.getContext().getSection() + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        factAsset.add(wsFactor);
    }

    if (!isOtherVehicleEmpty && (!quote.getContext().getRiskType().equals(EnumRiskType.CAR)
            || !quote.getContext().getRiskType().equals(EnumRiskType.MOTORBIKE)
            || !quote.getContext().getRiskType().equals(EnumRiskType.MOPED))) {
        logger.debug("quoteToWsAsset is othervehicle, risktype :" + quote.getContext().getRiskType());

        if (quote.getOtherVehicle().getTaxableHorsePower() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2CF.value());
            wsFactor.setValue(quote.getOtherVehicle().getTaxableHorsePower().toString());
            logger.debug(
                    "quoteToWsAssetInstance add factor : " + "quote.getOtherVehicle().getTaxableHorsePower()"
                            + " = " + quote.getOtherVehicle().getTaxableHorsePower() + " --> "
                            + wsFactor.getCode() + " = " + wsFactor.getValue());
            factAsset.add(wsFactor);
        }

        if (quote.getOtherVehicle().getCcCapacity() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2CC.value());
            wsFactor.setValue(quote.getOtherVehicle().getCcCapacity().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getOtherVehicle().getCcCapacity()"
                    + " = " + quote.getOtherVehicle().getCcCapacity() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
            factAsset.add(wsFactor);
        }

        if (quote.getOtherVehicle().getNumberOfCitizens() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2NUMAB.value());
            wsFactor.setValue(quote.getOtherVehicle().getNumberOfCitizens().toString());
            logger.debug(
                    "quoteToWsAssetInstance add factor : " + "quote.getOtherVehicle().getNumberOfCitizens()"
                            + " = " + quote.getOtherVehicle().getNumberOfCitizens() + " --> "
                            + wsFactor.getCode() + " = " + wsFactor.getValue());
            factAsset.add(wsFactor);
        }

        if (quote.getOtherVehicle().getWeight() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_3MASSA.value());
            wsFactor.setValue(quote.getOtherVehicle().getWeight().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getOtherVehicle().getWeight()" + " = "
                    + quote.getOtherVehicle().getWeight() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
            factAsset.add(wsFactor);
        }

        if (quote.getOtherVehicle().getNumberOfSeats() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2SEATS.value());
            wsFactor.setValue(quote.getOtherVehicle().getNumberOfSeats().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getOtherVehicle().getNumberOfSeats()"
                    + " = " + quote.getOtherVehicle().getNumberOfSeats() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
            factAsset.add(wsFactor);
        }
        if (quote.getOtherVehicle().getOwnBehalf() != null) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_3CONTO.value());
            if (quote.getOtherVehicle().getOwnBehalf()) {
                wsFactor.setValue("1");
                factAsset.add(wsFactor);
            } else {
                wsFactor.setValue("2");
                factAsset.add(wsFactor);
            }
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getOtherVehicle().getOwnBehalf()"
                    + " = " + quote.getOtherVehicle().getOwnBehalf() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
        }
        if (!StringUtils.isEmpty(quote.getOtherVehicle().getProvince())
                && (quote.getContext().getRiskType().equals(EnumRiskType.TAXI)
                        || quote.getContext().getRiskType().equals(EnumRiskType.TRUCK_MORE_THAN_60000KG)
                        || quote.getContext().getRiskType().equals(EnumRiskType.TRUCK_UPTO_60000KG)
                        || quote.getContext().getRiskType().equals(EnumRiskType.CAMPER) || quote.getContext()
                                .getRiskType().equals(EnumRiskType.MOTORCYCLE_FREIGHT_TRANSPORT))) {
            wsFactor = new WsFactor();
            wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2PVOW.value());

            String otherVehicleProvince = mapUty.getOtherVehicleProvince(quote.getOtherVehicle().getProvince());
            wsFactor.setValue(otherVehicleProvince);
            factAsset.add(wsFactor);
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getOtherVehicle().getProvince()"
                    + " = " + quote.getOtherVehicle().getProvince() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
        }
    } else {
        if (quote.getVehicle() != null && quote.getVehicle().getTechnicalData() != null) {
            if (quote.getVehicle().getTechnicalData().getTaxableHorsePower() != null) {
                wsFactor = new WsFactor();
                wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2CF.value());
                wsFactor.setValue(quote.getVehicle().getTechnicalData().getTaxableHorsePower().toString());
                logger.debug("quoteToWsAssetInstance add factor : "
                        + "quote.getVehicle().getTechnicalData().getTaxableHorsePower()" + " = "
                        + quote.getVehicle().getTechnicalData().getTaxableHorsePower() + " --> "
                        + wsFactor.getCode() + " = " + wsFactor.getValue());
                factAsset.add(wsFactor);
            }
            if (quote.getVehicle().getTechnicalData().getCcCapacity() != null) {
                wsFactor = new WsFactor();
                wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2CC.value());
                wsFactor.setValue(quote.getVehicle().getTechnicalData().getCcCapacity().toString());
                logger.debug("quoteToWsAssetInstance add factor : "
                        + "quote.getVehicle().getTechnicalData().getCcCapacity()" + " = "
                        + quote.getVehicle().getTechnicalData().getCcCapacity() + " --> " + wsFactor.getCode()
                        + " = " + wsFactor.getValue());
                factAsset.add(wsFactor);
            }
        }
    }
    if (quote.getOtherVehiclesInsuredWithUs() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR_2ALAUT.value());
        if (quote.getOtherVehiclesInsuredWithUs())
            wsFactor.setValue("true");
        else
            wsFactor.setValue("false");
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getOtherVehiclesInsuredWithUs()" + " = "
                + quote.getOtherVehiclesInsuredWithUs() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getVehicle() != null && quote.getVehicle().getTechnicalData() != null
            && quote.getVehicle().getTechnicalData().getAlimentation() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalAssetInstanceFactors.FACTOR__2ALIM.value());
        wsFactor.setValue(quote.getVehicle().getTechnicalData().getAlimentation().getWrapperCode().toString());
        logger.debug("quoteToWsAssetInstance add factor : "
                + "quote.getVehicle().getTechnicalData().getAlimentation()" + " = "
                + quote.getVehicle().getTechnicalData().getAlimentation() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getPreviousFlagClaimsInLastYear() != null) {
        wsFactor = new WsFactor();
        wsFactor.setCode(ENUMInternalWsProductFactors.FACTOR_3FRC1.value());
        if (quote.getPreviousFlagClaimsInLastYear() == true) {
            wsFactor.setValue("false");
        } else {
            wsFactor.setValue("true");
        }
        logger.debug("quoteToWsAssetInstance add factor : " + "quote.getPreviousFlagClaimsInLastYear()" + " = "
                + quote.getPreviousFlagClaimsInLastYear() + " --> " + wsFactor.getCode() + " = "
                + wsFactor.getValue());
        factAsset.add(wsFactor);
    }
    if (quote.getPreviousCleanIn5() != null || quote.getPreviousClaimsInLast5Years() != null) {
        wsFactor = new WsFactor();

        wsFactor.setCode(ENUMInternalWsProductFactors.FACTOR_3FRC5.value());
        if (isVehicleMopedMotorbike) {
            String prevClaimsInLast5Years = quote.getPreviousClaimsInLast5Years() ? "false" : "true";
            wsFactor.setValue(prevClaimsInLast5Years);
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getPreviousClaimsInLast5Years()"
                    + " = " + quote.getPreviousClaimsInLast5Years() + " --> " + wsFactor.getCode() + " = "
                    + wsFactor.getValue());
        } else {
            wsFactor.setValue(quote.getPreviousCleanIn5().toString());
            logger.debug("quoteToWsAssetInstance add factor : " + "quote.getPreviousCleanIn5()" + " = "
                    + quote.getPreviousCleanIn5() + " --> " + wsFactor.getCode() + " = " + wsFactor.getValue());
        }

        factAsset.add(wsFactor);
    }

    logger.debug("quoteToWsAssetInstance add " + factAsset.size() + " factors to assetInstance");
    assetInstanceResponse.getFactors().addAll(factAsset);

    List<WsFactor> listFactorFigures = getFactorForFigureFromRoleAssetInstance(quote.getFigures());
    logger.debug("quoteToWsAssetInstance add " + listFactorFigures.size()
            + " factors from figures to assetInstance");
    assetInstanceResponse.getFactors().addAll(listFactorFigures);

    listAssetInstResponse.add(assetInstanceResponse);

    logger.info("quoteToWsAssetInstance out with response : " + listAssetInstResponse);
    return listAssetInstResponse;
}

From source file:org.openstack.burrow.backend.http.BaseHttp.java

/**
 * Generates a List of Name/Value Pairs for a UpdateMessages to be carried out
 * /* w  w  w .ja v  a2s .  c o m*/
 * @param request A UpdateMessages object
 * @return A List of Name/Value Pairs
 */
private List<NameValuePair> getQueryParameters(UpdateMessages request) {
    String marker = request.getMarker();
    Long limit = request.getLimit();
    Boolean matchHidden = request.getMatchHidden();
    Long ttl = request.getTtl();
    Long hide = request.getHide();
    String detail = request.getDetail();
    Long wait = request.getWait();
    if ((marker != null) || (limit != null) || (matchHidden != null) || (ttl != null) || (hide != null)
            || (detail != null) || (wait != null)) {
        List<NameValuePair> params = new ArrayList<NameValuePair>(7);
        if (marker != null)
            params.add(new BasicNameValuePair("marker", marker));
        if (limit != null)
            params.add(new BasicNameValuePair("limit", limit.toString()));
        if (matchHidden != null)
            params.add(new BasicNameValuePair("match_hidden", matchHidden.toString()));
        if (ttl != null)
            params.add(new BasicNameValuePair("ttl", ttl.toString()));
        if (hide != null)
            params.add(new BasicNameValuePair("hide", hide.toString()));
        if (detail != null)
            params.add(new BasicNameValuePair("detail", detail));
        if (wait != null)
            params.add(new BasicNameValuePair("wait", wait.toString()));
        return params;
    } else {
        return null;
    }
}

From source file:cx.fbn.nevernote.Global.java

public static boolean isToolbarButtonVisible(String window, Boolean val) {
    settings.beginGroup("ToolbarButtonsVisible");
    try {/*from w w w . j a va2s  .  c  om*/
        String text = (String) settings.value(window, val.toString());
        settings.endGroup();
        if (text.equalsIgnoreCase("true"))
            return true;
        else
            return false;
    } catch (java.lang.ClassCastException e) {
        Boolean value = (Boolean) settings.value(window, val);
        settings.endGroup();
        return value;
    }
}