Package org.compiere.model
Class Obscure
java.lang.Object
org.compiere.model.Obscure
Obscure Strings (e.g. Credit Card Numbers).
Obscure Type defined in AD_Field
- Version:
- $Id: Obscure.java,v 1.4 2006/10/02 05:19:06 jjanke Exp $
- Author:
- Jorg Janke
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Obscure AlphaNumeric but first/last 4 = A44static final String
Obscure AlphaNumeric but last 4 = A04static final String
Obscure Digits but first/last 4 = 944static final String
Obscure Digits but last 4 = 904 (default)static final String
Obscure by max 10 asterisk characters, use for EncryptedField - internal, not in the list of obscure type field -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet Clear ValueGet Obscured ValuegetObscuredValue
(int maxlength) Get Obscured Value with a max lengthgetObscuredValue
(String clearValue) Get Obscured ValuegetObscuredValue
(String clearValue, int maxlength) Get Obscured ValuegetType()
Get Obscure Typestatic void
teststatic String
Obscure clear value.static String
Obscure clear valuevoid
setClearValue
(String clearValue) Set Clear Valuevoid
Set Type
-
Field Details
-
OBSCURETYPE_ObscureDigitsButLast4
Obscure Digits but last 4 = 904 (default)- See Also:
-
OBSCURETYPE_ObscureDigitsButFirstLast4
Obscure Digits but first/last 4 = 944- See Also:
-
OBSCURETYPE_ObscureAlphaNumericButFirstLast4
Obscure AlphaNumeric but first/last 4 = A44- See Also:
-
OBSCURETYPE_ObscureAlphaNumericButLast4
Obscure AlphaNumeric but last 4 = A04- See Also:
-
OBSCURETYPE_ObscureMaskMax10Asterisk
Obscure by max 10 asterisk characters, use for EncryptedField - internal, not in the list of obscure type field- See Also:
-
-
Constructor Details
-
Obscure
public Obscure()Obscure -
Obscure
Obscure. Obscure Digits but last 4- Parameters:
clearValue
- clear value
-
Obscure
Obscure- Parameters:
clearValue
- clear valueobscureType
- Obscure Type
-
-
Method Details
-
obscure
Obscure clear value. Obscure Digits but last 4- Parameters:
clearValue
- clear value- Returns:
- obscured value or "-"
-
obscure
Obscure clear value- Parameters:
clearValue
- clear valueobscureType
- Obscure Type- Returns:
- obscured value
-
setType
Set Type- Parameters:
obscureType
- Obscure Type
-
getType
Get Obscure Type- Returns:
- type
-
getClearValue
Get Clear Value- Returns:
- Returns the clear Value.
-
setClearValue
Set Clear Value- Parameters:
clearValue
- The clearValue to set.
-
getObscuredValue
Get Obscured Value- Parameters:
clearValue
- The clearValue to set.maxlength
- maximum length of the obscured value- Returns:
- Returns the obscuredValue.
-
getObscuredValue
Get Obscured Value- Parameters:
clearValue
- The clearValue to set.- Returns:
- Returns the obscuredValue.
-
getObscuredValue
Get Obscured Value with a max length- Parameters:
maxlength
- maximum length of the obscured value- Returns:
- Returns the obscuredValue.
-
getObscuredValue
Get Obscured Value- Returns:
- Returns the obscuredValue.
-
main
test- Parameters:
args
- ignored
-