Package org.jitterbit.util

Examples of org.jitterbit.util.StorageSizeUnit


        if (r == null) {
            dataLimitField.setValue("");
            delayField.setValue("");
            sizeUnitCombo.setSelectedIndex(0);
        } else {
            StorageSizeUnit sizeUnit = r.getMaximumSizeUiUnit();
            if (sizeUnit == null) {
                dataLimitField.setValue(0);
            } else {
                dataLimitField.setValue(r.getMaximumSizeInBytes() / sizeUnit.inBytes());
            }
            delayField.setValue(r.getMinimumCallDelayInMilliSecs());
            sizeUnitCombo.setSelectedItem(sizeUnit);
        }
    }
View Full Code Here


     * Creates and returns a <tt>CallRestriction</tt> object corresponding to the current values
     * of the fields in this panel.
     */
    public CallRestrictions getCallRestrictions(WebServiceCall ws) throws IllegalStateException {
        Long delay = getCallDelay();
        StorageSizeUnit sizeUnit = (StorageSizeUnit) sizeUnitCombo.getSelectedItem();
        Long maxDataToPost = getMaxDataToPost(sizeUnit);
        CallRestrictions r = null;
        if (delay != null || maxDataToPost != null) {
            r = new CallRestrictions(ws);
            if (delay != null) {
View Full Code Here

        }
        return null;
    }

    private String getTextFor(long value) {
        StorageSizeUnit unit = getUnit(value);
        return unit.format(value);
    }
View Full Code Here

     * @return the <tt>StorageSize</tt> instance to use when displaying the max size property in
     *         the UI.
     */
    public StorageSizeUnit getMaximumSizeUiUnit() {
        String unitAbbrev = properties.get(MAX_SIZE_UI_UNIT);
        StorageSizeUnit unit = null;
        if (unitAbbrev != null) {
            unit = StorageSizeUnit.fromAbbreviation(unitAbbrev);
        }
        if (unit == null) {
            unit = StorageSizeUnit.Kilobytes;
View Full Code Here

TOP

Related Classes of org.jitterbit.util.StorageSizeUnit

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.