
com.worldpay.api.common.util.Constants Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2013 Worldpay
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*/
package com.worldpay.api.common.util;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
/**
* Constants
*/
public final class Constants {
/**
* Single empty string literal
*/
public static final String EMPTY_STRING = "";
/**
* Single underscore string literal
*/
public static final String UNDERSCORE = "_";
/**
* Constant for hyphen/dash
*/
public static final String HYPHEN = "-";
/**
* Constant for dash character
*/
public static final char DASH_CHAR = '-';
/**
* Constant for single apostrophe character
*/
public static final char SINGLE_APOSTROPHE_CHAR = '\'';
/**
* Max allowed length for string fields
*/
public static final int PERMISSIBLE_STRING_LENGTH = 255;
/**
* Length allowed for Statement Narrative
*/
public static final int PERMISSIBLE_STATEMENT_NARRATIVE_LENGTH = 24;
/**
* Fields can't be longer than 255 chars
*/
public static final String FIELD_LONGER_THAN_ALLOWED_LENGTH = "field can't be longer than 255 chars";
/**
* Number of decimal places allowed in fractional numbers
*/
public static final int DECIMAL_SCALE = 2;
/**
* Used to represent all possible values of an event
*/
public static final String ALL_EVENTS = "ALL";
/**
* Type for boolean input
*/
public static final String YES_NO_TYPE = "yes_no";
/**
* Date formatter, Deprecated, use {@code DateUtils.DATE_FORMAT_DDMMYYYY} instead
*/
@Deprecated
public static final DateFormat DATE_FORMAT_DDMMYYYY = new SimpleDateFormat("dd/MM/yyyy");
/**
* Hiding constructor for a utility class
*/
private Constants() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy